mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 00:18:39 +00:00
improve the WebPluginBase class, registering it with the json rpc-api and adding space for scripts/stylesheets
This commit is contained in:
parent
c333ad4f6a
commit
c0276a541c
1 changed files with 10 additions and 0 deletions
|
@ -56,6 +56,16 @@ class GtkPluginBase(PluginBase):
|
||||||
log.debug("GtkPlugin initialized..")
|
log.debug("GtkPlugin initialized..")
|
||||||
|
|
||||||
class WebPluginBase(PluginBase):
|
class WebPluginBase(PluginBase):
|
||||||
|
|
||||||
|
scripts = []
|
||||||
|
debug_scripts = []
|
||||||
|
|
||||||
|
stylesheets = []
|
||||||
|
debug_stylesheets = []
|
||||||
|
|
||||||
def __init__(self, plugin_name):
|
def __init__(self, plugin_name):
|
||||||
super(WebPluginBase, self).__init__("WebPlugin." + 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..")
|
log.debug("WebPlugin initialized..")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue