示例#1
0
文件: tatlin.py 项目: jmil/tatlin
    def on_open(self, action=None):
        dialog = OpenDialog(self.current_dir)

        if dialog.run() == gtk.RESPONSE_ACCEPT:
            self.open_and_display_file(dialog.get_filename())

        dialog.destroy()
示例#2
0
    def on_file_open(self, event=None):
        if self.save_changes_dialog():
            show_again = True

            while show_again:
                dialog = OpenDialog(self.window, self.current_dir)
                fpath = dialog.get_path()
                if fpath:
                    show_again = not self.open_and_display_file(fpath, dialog.get_type())
                else:
                    show_again = False
示例#3
0
    def on_file_open(self, event=None):
        if self.save_changes_dialog():
            show_again = True

            while show_again:
                dialog = OpenDialog(self.window, self.current_dir)
                fpath = dialog.get_path()
                if fpath:
                    show_again = not self.open_and_display_file(
                        fpath, dialog.get_type())
                else:
                    show_again = False
示例#4
0
文件: tatlin.py 项目: Lenbok/tatlin
    def open_file_dialog(self, action=None):
        if self.save_changes_dialog():
            dialog = OpenDialog(self.current_dir)
            show_again = True

            while show_again:
                if dialog.run() == gtk.RESPONSE_ACCEPT:
                    dialog.hide()
                    fname = dialog.get_filename()
                    show_again = not self.open_and_display_file(fname)
                else:
                    show_again = False

            dialog.destroy()