* 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
This commit is contained in:
Alex Roitman 2006-08-12 21:13:45 +00:00
parent 400f1bde64
commit a2cf746c00
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,7 @@
2006-08-12 Alex Roitman <shura@gramps-project.org> 2006-08-12 Alex Roitman <shura@gramps-project.org>
* 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. * src/DataViews/_MediaView.py (drag_data_received): Stop emission.
2006-08-12 Don Allingham <don@gramps-project.org> 2006-08-12 Don Allingham <don@gramps-project.org>

View File

@ -304,7 +304,7 @@ class ViewManager:
""" """
connects the signals needed 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) self.notebook.connect('switch-page', self.change_page)
def _init_lists(self): def _init_lists(self):
@ -448,7 +448,7 @@ class ViewManager:
self.uistate.push_message(self.state,_('Ready')) self.uistate.push_message(self.state,_('Ready'))
def quit(self, obj=None): def quit(self, *obj):
self.state.db.close() self.state.db.close()
(width, height) = self.window.get_size() (width, height) = self.window.get_size()
Config.set(Config.WIDTH, width) Config.set(Config.WIDTH, width)