mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +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
2 changed files with 6 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue