[accerciser] Fix for bug 723403 - Save window's properties at 'delete-event' time
- From: Javier Hernández Antúnez <jhernandez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] Fix for bug 723403 - Save window's properties at 'delete-event' time
- Date: Sun, 2 Mar 2014 08:48:15 +0000 (UTC)
commit 61e230a462e4448756a925f7ecf6ec14460a2ba2
Author: Javier Hernández <jhernandez emergya com>
Date: Sun Mar 2 09:30:21 2014 +0100
Fix for bug 723403 - Save window's properties at 'delete-event' time
src/lib/accerciser/accerciser.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/lib/accerciser/accerciser.py b/src/lib/accerciser/accerciser.py
index e092499..d3d6a07 100644
--- a/src/lib/accerciser/accerciser.py
+++ b/src/lib/accerciser/accerciser.py
@@ -57,6 +57,7 @@ class Main(Tools):
self.node = Node()
self.window = AccerciserMainWindow(self.node)
+ self.window.connect('delete-event', self._onDeleteEvent)
self.window.connect('destroy', self._onQuit)
# Start hotkey manager
@@ -114,7 +115,6 @@ class Main(Tools):
'''
Cleans up any object instances that need explicit shutdown.
'''
- self.window.saveState()
self.plugin_manager.close()
def _onQuit(self, obj, data=None):
@@ -163,4 +163,12 @@ class Main(Tools):
hotkeys_view = HotkeyTreeView(self.hotkey_manager)
dialog = AccerciserPreferencesDialog(plugins_view, hotkeys_view)
dialog.show_all()
-
+
+ def _onDeleteEvent(self, obj, data=None):
+ '''
+ Handles when a delete-event is triggered from the main window.
+
+ @param obj: The object that emitted the signal that this callback caught.
+ @type obj: L{gtk.Widget}
+ '''
+ self.window.saveState()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]