From 89f6209906a9991fd4e3918ccc380bc659bdb0bf 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 --- ChangeLog | 3 +++ src/ViewManager.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 834725315..946524f9a 100644 --- a/ChangeLog +++ b/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/src/ViewManager.py b/src/ViewManager.py index 068475802..6da9fc804 100644 --- a/src/ViewManager.py +++ b/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)