mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 03:55:43 +00:00
Prevent update() thread to start until all plugins are loaded and we are
ready to show the main window.
This commit is contained in:
parent
5043c8bf29
commit
dd3ec750aa
@ -97,8 +97,8 @@ class GtkUI:
|
|||||||
# Initalize the plugins
|
# Initalize the plugins
|
||||||
self.plugins = PluginManager(self)
|
self.plugins = PluginManager(self)
|
||||||
|
|
||||||
# Show the main window
|
# Start the mainwindow and show it
|
||||||
self.mainwindow.show()
|
self.mainwindow.start()
|
||||||
|
|
||||||
# Start the gtk main loop
|
# Start the gtk main loop
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
@ -81,8 +81,11 @@ class MainWindow:
|
|||||||
self.systemtray = SystemTray(self)
|
self.systemtray = SystemTray(self)
|
||||||
self.statusbar = StatusBar(self)
|
self.statusbar = StatusBar(self)
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
"""Start the update thread and show the window"""
|
||||||
gobject.timeout_add(1000, self.update)
|
gobject.timeout_add(1000, self.update)
|
||||||
|
self.show()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
# Don't update the UI if the the window is minimized.
|
# Don't update the UI if the the window is minimized.
|
||||||
if self.is_minimized == True:
|
if self.is_minimized == True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user