fix enabled plugins after connecting to a daemon

This commit is contained in:
Damien Churchill 2010-04-28 14:00:39 +01:00
parent 7df7f13e26
commit 67905b6f5b
1 changed files with 13 additions and 0 deletions

View File

@ -156,6 +156,10 @@ deluge.ui = {
this.running = setInterval(this.update, 2000);
this.update();
}
deluge.client.web.get_plugins({
success: this.onGotPlugins,
scope: this
});
},
/**
@ -166,6 +170,15 @@ deluge.ui = {
this.stop();
},
onGotPlugins: function(plugins) {
Ext.each(plugins.enabled_plugins, function(plugin) {
deluge.client.web.get_plugin_resources(plugin, {
success: this.onGotPluginResources,
scope: this
});
}, this);
},
onPluginEnabled: function(pluginName) {
if (deluge.plugins[pluginName]) {
deluge.plugins[pluginName].enable();