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,16 +225,19 @@ class HistoryManager:
def on_history_manager_window_delete_event(self, widget, event):
if not self.AT_LEAST_ONE_DELETION_DONE:
Gtk.main_quit()
if __name__ == '__main__':
Gtk.main_quit()
return
def on_yes(clicked):
self.cur.execute('VACUUM')
self.con.commit()
Gtk.main_quit()
if __name__ == '__main__':
Gtk.main_quit()
def on_no():
Gtk.main_quit()
if __name__ == '__main__':
Gtk.main_quit()
dialog = dialogs.YesNoDialog(
_('Do you want to clean up the database? '