[GTKUI] Remove old twisted and gnome code

* Can't see any issue removing the twisted similate call and it
   seems to already be done by gtk2reactor so duplicated.
 * The gnome die handled never appears to be called and most signals
   are handled by twisted so remove this code as well.
This commit is contained in:
Calum Lind 2015-11-15 12:44:15 +00:00
parent 0a3404fa55
commit 058b0e41d2
1 changed files with 2 additions and 17 deletions

View File

@ -159,22 +159,13 @@ class GtkUI(object):
if deluge.common.windows_check():
from win32api import SetConsoleCtrlHandler
SetConsoleCtrlHandler(on_die, True)
log.debug("Win32 'die' handler registered!")
log.debug("Win32 'die' handler registered")
elif deluge.common.osx_check():
if gtk.gdk.WINDOWING == "quartz":
import gtkosx_application
self.osxapp = gtkosx_application.gtkosx_application_get()
self.osxapp.connect("NSApplicationWillTerminate", on_die)
log.debug("OSX quartz 'die' handler registered!")
else:
import gnome.ui
# Suppress warning: 'Attempt to add property GnomeProgram::* after class was initialised'
with warnings.catch_warnings():
warnings.simplefilter("ignore")
self.gnome_prog = gnome.init("Deluge", deluge.common.get_version())
self.gnome_client = gnome.ui.master_client()
self.gnome_client.connect("die", on_die)
log.debug("GNOME session 'die' handler registered!")
log.debug("OSX quartz 'die' handler registered")
# Set process name again to fix gtk issue
setproctitle(getproctitle())
@ -427,12 +418,6 @@ class GtkUI(object):
break
if self.config["show_connection_manager_on_start"]:
# XXX: We need to call a simulate() here, but this could be a bug in twisted
try:
reactor._simulate()
except AttributeError:
# twisted < 12
reactor.simulate()
self.connectionmanager.show()
def __on_disconnect(self):