Exemplo n.º 1
0
    def destroy(self):
        self.pageview.save_changes()
        if self.page.modified:
            return  # Do not quit if page not saved
        self.pageview.page.set_ui_object(None)  # XXX

        self.save_uistate()

        self.hide()  # look more responsive
        self.notebook.index.stop_background_check()
        while Gtk.events_pending():
            Gtk.main_iteration_do(False)

        Window.destroy(self)  # gtk destroy & will also emit destroy signal
Exemplo n.º 2
0
    def destroy(self):
        self.pageview.save_changes()
        if self.page.modified:
            return  # Do not quit if page not saved

        self._do_close()

        while Gtk.events_pending():
            Gtk.main_iteration_do(False)

        self.notebook.index.stop_background_check()
        op = ongoing_operation(self.notebook)
        if op:
            op.wait()

        Window.destroy(self)  # gtk destroy & will also emit destroy signal