mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
Fix deluge-gtk hanging on shutdown (thanks Jan Steffens)
This commit is contained in:
parent
cc086917c1
commit
72fd3bd061
1 changed files with 2 additions and 2 deletions
|
@ -167,7 +167,7 @@ class GtkUI(object):
|
|||
self.gnome_prog = gnome.init("Deluge", deluge.common.get_version())
|
||||
self.gnome_client = gnome.ui.master_client()
|
||||
def on_die(*args):
|
||||
gtk.main_quit()
|
||||
reactor.stop()
|
||||
self.gnome_client.connect("die", on_die)
|
||||
log.debug("GNOME session 'die' handler registered!")
|
||||
except Exception, e:
|
||||
|
@ -180,7 +180,7 @@ class GtkUI(object):
|
|||
def win_handler(ctrl_type):
|
||||
log.debug("ctrl_type: %s", ctrl_type)
|
||||
if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT):
|
||||
gtk.main_quit()
|
||||
reactor.stop()
|
||||
return 1
|
||||
SetConsoleCtrlHandler(win_handler)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue