From dd3ec750aa87df504432e890d289df7bff33f52a Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 24 Sep 2007 06:22:31 +0000 Subject: [PATCH] Prevent update() thread to start until all plugins are loaded and we are ready to show the main window. --- deluge/ui/gtkui/gtkui.py | 4 ++-- deluge/ui/gtkui/mainwindow.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index f3f4c3250..8669c4f5a 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -97,8 +97,8 @@ class GtkUI: # Initalize the plugins self.plugins = PluginManager(self) - # Show the main window - self.mainwindow.show() + # Start the mainwindow and show it + self.mainwindow.start() # Start the gtk main loop gtk.main() diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 6e36f4209..545c65f1c 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -81,8 +81,11 @@ class MainWindow: self.systemtray = SystemTray(self) self.statusbar = StatusBar(self) + def start(self): + """Start the update thread and show the window""" gobject.timeout_add(1000, self.update) - + self.show() + def update(self): # Don't update the UI if the the window is minimized. if self.is_minimized == True: