make blocklist plugin loading not lock up the UI when the client is just starting
This commit is contained in:
parent
aad2c464e4
commit
edc7574a60
|
@ -63,10 +63,6 @@ class BlocklistImport:
|
|||
global_defaults=False)
|
||||
self.config.load()
|
||||
|
||||
# if not self.config.has_key('url'):
|
||||
# self.configure()
|
||||
# else:
|
||||
# self.loadlist(fetch=self.config.get('load_on_start'))
|
||||
if self.config.has_key('url'):
|
||||
self.loadlist(fetch=self.config.get('load_on_start'))
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import BlocklistImport
|
|||
class GTKConfig(gtk.Dialog):
|
||||
def __init__(self, plugin):
|
||||
gtk.Dialog.__init__(self, title="Blocklist Config",
|
||||
flags=gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
parent=None,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
|
||||
gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
|
||||
self.set_property("skip-taskbar-hint", True)
|
||||
|
@ -93,7 +93,7 @@ class GTKConfig(gtk.Dialog):
|
|||
class GTKProgress(gtk.Dialog):
|
||||
def __init__(self, plugin):
|
||||
gtk.Dialog.__init__(self, title="Loading Blocklist",
|
||||
flags=gtk.DIALOG_MODAL,
|
||||
parent=None,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT))
|
||||
self.plugin = plugin
|
||||
|
||||
|
@ -164,7 +164,7 @@ class GTKProgress(gtk.Dialog):
|
|||
class GTKError(gtk.Dialog):
|
||||
def __init__(self, message):
|
||||
gtk.Dialog.__init__(self, title="Error",
|
||||
flags=gtk.DIALOG_MODAL,
|
||||
parent=None,
|
||||
buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
|
||||
|
||||
# Setup
|
||||
|
|
|
@ -841,19 +841,21 @@ class DelugeGTK:
|
|||
|
||||
for torrent_file in cmd_line_torrents:
|
||||
self.interactive_add_torrent(torrent_file)
|
||||
|
||||
# Load plugins after we showed main window (if not started in tray)
|
||||
self.load_plugins()
|
||||
|
||||
|
||||
# Call update now so everything is up-to-date when the window gains
|
||||
# focus on startup
|
||||
self.update()
|
||||
gobject.timeout_add(1000, self.update)
|
||||
|
||||
# Load plugins after we showed main window (if not started in tray)
|
||||
self.load_plugins()
|
||||
|
||||
try:
|
||||
gtk.main()
|
||||
except KeyboardInterrupt:
|
||||
self.manager.quit()
|
||||
|
||||
|
||||
def load_plugins(self):
|
||||
enable_plugins = self.config.get('enabled_plugins').split(':')
|
||||
for plugin in enable_plugins:
|
||||
|
|
Loading…
Reference in New Issue