Ejemplo n.º 1
0
    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()
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 4
0
    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()