Updates to the test plugin.
This commit is contained in:
parent
f1808a0cc3
commit
53ebbe011c
|
@ -41,14 +41,14 @@ class CorePlugin(PluginBase):
|
|||
try:
|
||||
from core import Core
|
||||
self.plugin = Core(plugin_api, plugin_name)
|
||||
except:
|
||||
pass
|
||||
except Exception, e:
|
||||
log.debug("Did not load a Core plugin: %s", e)
|
||||
|
||||
class GtkUIPlugin(PluginBase):
|
||||
def __init__(self, plugin_api, plugin_name):
|
||||
# Load the GtkUI portion of the plugin
|
||||
try:
|
||||
from gtkui import GtkUI
|
||||
self.plugin = GtkUI()
|
||||
except:
|
||||
pass
|
||||
self.plugin = GtkUI(plugin_api, plugin_name)
|
||||
except Exception, e:
|
||||
log.debug("Did not load a GtkUI plugin: %s", e)
|
||||
|
|
|
@ -35,9 +35,13 @@ from deluge.log import LOG as log
|
|||
import ui
|
||||
|
||||
class GtkUI(ui.UI):
|
||||
def __init__(self):
|
||||
ui.UI.__init__(self)
|
||||
log.debug("gtkui plugin initialized..")
|
||||
|
||||
def __init__(self, plugin_api, plugin_name):
|
||||
log.debug("Calling UI init")
|
||||
# Call UI constructor
|
||||
ui.UI.__init__(self, plugin_api, plugin_name)
|
||||
log.debug("test plugin initialized..")
|
||||
self.plugin.register_hook("on_apply_prefs", self.apply_prefs)
|
||||
|
||||
|
||||
def apply_prefs(self):
|
||||
log.debug("applying prefs in test plugin!!")
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
from deluge.log import LOG as log
|
||||
|
||||
class UI:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, plugin_api, plugin_name):
|
||||
self.plugin = plugin_api
|
||||
|
||||
def enable(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue