def save_as(self, *args): dialog = SaveFileDialog(app.list_extensions(), parent=self, filename=self.notebook.filename()) filename = dialog.get_filename() saved = False if filename != None: self.notebook.save_as(filename) saved = True return saved
def save_selection_as(self, *args): dialog = SaveSelectionFileDialog(app.list_extensions(), parent=self, filename=self.notebook.filename()) filename = dialog.get_filename() if filename != None: self.notebook.save_selection_as(filename)
def open(self, *args): dialog = OpenFileDialog(app.list_extensions(), parent=self, filename=self.notebook.filename()) filenames = dialog.get_filenames() for filename in filenames: self._do_open(filename)