From a2cf746c006b11a5bc6420376329f04b873645c5 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 12 Aug 2006 21:13:45 +0000 Subject: [PATCH] * src/ViewManager.py (_connect_signals): Connect to the proper event to cleanly quit on window manager's close action. (quit): Allow variable number of args (to work with signals). svn: r7161 --- gramps2/ChangeLog | 3 +++ gramps2/src/ViewManager.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 834725315..946524f9a 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,7 @@ 2006-08-12 Alex Roitman + * src/ViewManager.py (_connect_signals): Connect to the proper + event to cleanly quit on window manager's close action. + (quit): Allow variable number of args (to work with signals). * src/DataViews/_MediaView.py (drag_data_received): Stop emission. 2006-08-12 Don Allingham diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 068475802..6da9fc804 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -304,7 +304,7 @@ class ViewManager: """ connects the signals needed """ - self.window.connect('destroy', self.quit) + self.window.connect('delete-event', self.quit) self.notebook.connect('switch-page', self.change_page) def _init_lists(self): @@ -448,7 +448,7 @@ class ViewManager: self.uistate.push_message(self.state,_('Ready')) - def quit(self, obj=None): + def quit(self, *obj): self.state.db.close() (width, height) = self.window.get_size() Config.set(Config.WIDTH, width)