mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +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_prog = gnome.init("Deluge", deluge.common.get_version())
|
||||||
self.gnome_client = gnome.ui.master_client()
|
self.gnome_client = gnome.ui.master_client()
|
||||||
def on_die(*args):
|
def on_die(*args):
|
||||||
gtk.main_quit()
|
reactor.stop()
|
||||||
self.gnome_client.connect("die", on_die)
|
self.gnome_client.connect("die", on_die)
|
||||||
log.debug("GNOME session 'die' handler registered!")
|
log.debug("GNOME session 'die' handler registered!")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
@ -180,7 +180,7 @@ class GtkUI(object):
|
||||||
def win_handler(ctrl_type):
|
def win_handler(ctrl_type):
|
||||||
log.debug("ctrl_type: %s", ctrl_type)
|
log.debug("ctrl_type: %s", ctrl_type)
|
||||||
if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT):
|
if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT):
|
||||||
gtk.main_quit()
|
reactor.stop()
|
||||||
return 1
|
return 1
|
||||||
SetConsoleCtrlHandler(win_handler)
|
SetConsoleCtrlHandler(win_handler)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue