r...
Content-type: text/plain

Author: damoxc

Revision: 5742

Log:
        add enable/disable methods to the JSON component
remove the empty enable/disable plugin methods from the web api

Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py     2009-09-14 10:26:59 UTC (rev 5741)
+++ trunk/deluge/ui/web/json_api.py     2009-09-14 10:36:40 UTC (rev 5742)
@@ -137,6 +137,16 @@
             component.get("Web").core_config.start()
         _d.addCallback(on_client_connected)
         return d
+    
+    def disable(self):
+        client.disconnect()
+    
+    def enable(self):
+        if component.get("DelugeWeb").config["deluge_daemon"]:
+            # Sort out getting the default daemon here
+            default = component.get("DelugeWeb").config["deluge_daemon"]
+            host = component.get("Web").get_host(default)
+            self.connect()
 
     def _on_client_disconnect(self, *args):
         component.get("Web.PluginManager").stop()
@@ -710,13 +720,4 @@
     
     @export
     def get_plugin_info(self, name):
-        return component.get("Web.PluginManager").get_plugin_info(name)
-    
-    @export
-    def enable_plugin(self, name):
-        pass
-    
-    @export
-    def disable_plugin(self, name):
-        pass
-    
\ No newline at end of file
+        return component.get("Web.PluginManager").get_plugin_info(name)
\ No newline at end of file



--~--~---------~--~----~------------~-------~--~----~
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