Fixup for History Manager

Only call Gtk.main_quit() if History Manager is running standalone.
This commit is contained in:
Andrey Gursky 2018-03-18 14:05:51 +01:00 committed by Philipp Hörist
parent 57d4ddcd57
commit 8d583a1801
1 changed files with 6 additions and 3 deletions

View File

@ -225,15 +225,18 @@ class HistoryManager:
def on_history_manager_window_delete_event(self, widget, event): def on_history_manager_window_delete_event(self, widget, event):
if not self.AT_LEAST_ONE_DELETION_DONE: if not self.AT_LEAST_ONE_DELETION_DONE:
if __name__ == '__main__':
Gtk.main_quit() Gtk.main_quit()
return return
def on_yes(clicked): def on_yes(clicked):
self.cur.execute('VACUUM') self.cur.execute('VACUUM')
self.con.commit() self.con.commit()
if __name__ == '__main__':
Gtk.main_quit() Gtk.main_quit()
def on_no(): def on_no():
if __name__ == '__main__':
Gtk.main_quit() Gtk.main_quit()
dialog = dialogs.YesNoDialog( dialog = dialogs.YesNoDialog(