Fix deluge-gtk hanging on shutdown (#1247) - thanks Jan Steffens
This commit is contained in:
parent
0857af98d0
commit
5766e04987
|
@ -5,6 +5,7 @@
|
|||
* Implement #1012 httpdownloader supports gzip decoding
|
||||
* #496: Remove deprecated functions in favour of get_session_status()
|
||||
* #1112: Fix renaming files in add torrent dialog
|
||||
* #1247: Fix deluge-gtk from hanging on shutdown
|
||||
|
||||
==== Blocklist ====
|
||||
* Implement local blocklist support
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ from deluge.ui.client import client
|
|||
import deluge.component as component
|
||||
from deluge.configmanager import ConfigManager
|
||||
from deluge.ui.gtkui.ipcinterface import process_args
|
||||
from twisted.internet import reactor
|
||||
|
||||
import deluge.common
|
||||
import common
|
||||
|
@ -152,7 +153,7 @@ class MainWindow(component.Component):
|
|||
return self.main_glade
|
||||
|
||||
def quit(self):
|
||||
gtk.main_quit()
|
||||
reactor.stop()
|
||||
|
||||
def load_window_state(self):
|
||||
x = self.config["window_x_pos"]
|
||||
|
@ -238,7 +239,6 @@ class MainWindow(component.Component):
|
|||
|
||||
def on_newversionavailable_event(self, new_version):
|
||||
if self.config["show_new_releases"]:
|
||||
from twisted.internet import reactor
|
||||
from deluge.ui.gtkui.new_release_dialog import NewReleaseDialog
|
||||
reactor.callLater(5.0, NewReleaseDialog().show, new_version)
|
||||
|
||||
|
|
Loading…
Reference in New Issue