main.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:MTTT 作者: roxana-lafuente 项目源码 文件源码
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, "")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号