From 249398489e13b156363471e64d1a5ee25b0f5453 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 15 Dec 2010 21:14:49 +0000 Subject: [PATCH] Removed problematic code. GTK2Reactor takes care of all that. --- deluge/ui/gtkui/gtkui.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 1efbda3ba..1d0208d14 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -205,10 +205,6 @@ class GtkUI(object): self.queuedtorrents = QueuedTorrents() self.ipcinterface = IPCInterface(args) - # Initialize gdk threading - gtk.gdk.threads_init() - gobject.threads_init() - # We make sure that the UI components start once we get a core URI client.set_disconnect_callback(self.__on_disconnect) @@ -238,11 +234,8 @@ class GtkUI(object): rpc_stats.start(10) reactor.callWhenRunning(self._on_reactor_start) - # Start the gtk main loop - gtk.gdk.threads_enter() + reactor.addSystemEventTrigger("before", "shutdown", self.shutdown) reactor.run() - self.shutdown() - gtk.gdk.threads_leave() def shutdown(self, *args, **kwargs): log.debug("gtkui shutting down..")