Author: andar
Revision: 5605
Log:
Fix shutdown handler with GNOME session manager
Diff:
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-31 23:53:23 UTC (rev 5604)
+++ trunk/ChangeLog 2009-08-01 00:15:05 UTC (rev 5605)
@@ -17,6 +17,7 @@
* Fix #518 remove header in add torrent dialog to save vertical space
* Add a Cache preferences page to adjust cache settings and examine cache
status
* Add ability to rename files prior to adding them
+ * Fix shutdown handler with GNOME session manager
==== ConsoleUI ====
* Changed to use curses for a more interactive client
Modified: trunk/deluge/ui/gtkui/gtkui.py
===================================================================
--- trunk/deluge/ui/gtkui/gtkui.py 2009-07-31 23:53:23 UTC (rev 5604)
+++ trunk/deluge/ui/gtkui/gtkui.py 2009-08-01 00:15:05 UTC (rev 5605)
@@ -159,10 +159,15 @@
# Setup signals
try:
import gnome.ui
- self.gnome_client = gnome.ui.Client()
- self.gnome_client.connect("die", gtk.main_quit)
- except:
- pass
+ import gnome
+ self.gnome_prog = gnome.init("Deluge", deluge.common.get_version())
+ self.gnome_client = gnome.ui.master_client()
+ def on_die(*args):
+ gtk.main_quit()
+ self.gnome_client.connect("die", on_die)
+ log.debug("GNOME session 'die' handler registered!")
+ except Exception, e:
+ log.warning("Unable to register a 'die' handler with the GNOME
session manager: %s", e)
if deluge.common.windows_check():
from win32api import SetConsoleCtrlHandler
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---