From 058b0e41d22b4f62c3edbcf6069793587d7ff8e9 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 15 Nov 2015 12:44:15 +0000 Subject: [PATCH] [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. --- deluge/ui/gtkui/gtkui.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index deb8263e5..5c0eeeba4 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -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):