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)