Prevent update() thread to start until all plugins are loaded and we are

ready to show the main window.
This commit is contained in:
Andrew Resch 2007-09-24 06:22:31 +00:00
parent 5043c8bf29
commit dd3ec750aa
2 changed files with 6 additions and 3 deletions

View File

@ -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()

View File

@ -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: