change...
Content-type: text/plain

Author: damoxc

Revision: 5739

Log:
        fix enabling plugins when the UI is created
change Deluge.Plugin so it implements the enable/disable methods that merely 
fire events that the plugins can use

Diff:
Modified: trunk/deluge/ui/web/js/Deluge.Plugin.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Plugin.js     2009-09-14 10:07:56 UTC (rev 
5738)
+++ trunk/deluge/ui/web/js/Deluge.Plugin.js     2009-09-14 10:19:15 UTC (rev 
5739)
@@ -41,5 +41,15 @@
         this.isDelugePlugin = true;
         Deluge.Plugins[this.name] = this;
         Deluge.Plugin.superclass.constructor.call(this, config);
+    },
+    
+    disable: function() {
+       this.fireEvent("disabled", this);
+       if (this.onDisable) this.onDisable();
+    },
+    
+    enable: function() {
+       this.fireEvent("enable", this);
+       if (this.onEnable) this.onEnable();
     }
 });
\ No newline at end of file

Modified: trunk/deluge/ui/web/js/Deluge.UI.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.UI.js 2009-09-14 10:07:56 UTC (rev 5738)
+++ trunk/deluge/ui/web/js/Deluge.UI.js 2009-09-14 10:19:15 UTC (rev 5739)
@@ -74,10 +74,11 @@
                Deluge.Client = new Ext.ux.util.RpcClient({
                        url: '/json'
                });
-               
-               Ext.each(Deluge.Plugins, function(plugin) {
+
+               for (var plugin in Deluge.Plugins) {
+                   plugin = Deluge.Plugins[plugin];
                    plugin.enable();
-               });
+               }
                
                Deluge.Client.on('connected', function(e) {
                        Deluge.Login.show();



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to