From c0276a541c548e355925690f1b5f6f19b2a54a2e Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 9 Sep 2009 16:51:44 +0000 Subject: [PATCH] improve the WebPluginBase class, registering it with the json rpc-api and adding space for scripts/stylesheets --- deluge/plugins/pluginbase.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deluge/plugins/pluginbase.py b/deluge/plugins/pluginbase.py index 73203641b..0bf75e76c 100644 --- a/deluge/plugins/pluginbase.py +++ b/deluge/plugins/pluginbase.py @@ -56,6 +56,16 @@ class GtkPluginBase(PluginBase): log.debug("GtkPlugin initialized..") class WebPluginBase(PluginBase): + + scripts = [] + debug_scripts = [] + + stylesheets = [] + debug_stylesheets = [] + def __init__(self, plugin_name): super(WebPluginBase, self).__init__("WebPlugin." + plugin_name) + + # Register JSON rpc methods + component.get("JSON").register_object(self, plugin_name.lower()) log.debug("WebPlugin initialized..")