def _on_dir_clicked(self, widget, labelToUpdate, command = ""):
"""@brief Get folder path from dialog."""
dialog = Gtk.FileChooserDialog("Please choose a directory", None,
Gtk.FileChooserAction.OPEN,
(Gtk.STOCK_CANCEL,
Gtk.ResponseType.CANCEL,
Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
self._add_dir_filters(dialog)
dialog.set_action(Gtk.FileChooserAction.SELECT_FOLDER)
response = dialog.run()
if response == Gtk.ResponseType.OK:
labelToUpdate.set_text(dialog.get_filename())
elif response == Gtk.ResponseType.CANCEL:
labelToUpdate.set_text("")
if "change output directory" in command:
self.output_directory = dialog.get_filename()
self.post_editing_output.set_text(self.output_directory)
self.evaluation_output.set_text(self.output_directory)
dialog.destroy()
if command == "change output directory and maybe create post edition table":
self._check_if_both_files_are_choosen_post_edition(None, "")
评论列表
文章目录