mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Updates to the test plugin.
This commit is contained in:
parent
f1808a0cc3
commit
53ebbe011c
3 changed files with 15 additions and 11 deletions
|
@ -41,14 +41,14 @@ class CorePlugin(PluginBase):
|
||||||
try:
|
try:
|
||||||
from core import Core
|
from core import Core
|
||||||
self.plugin = Core(plugin_api, plugin_name)
|
self.plugin = Core(plugin_api, plugin_name)
|
||||||
except:
|
except Exception, e:
|
||||||
pass
|
log.debug("Did not load a Core plugin: %s", e)
|
||||||
|
|
||||||
class GtkUIPlugin(PluginBase):
|
class GtkUIPlugin(PluginBase):
|
||||||
def __init__(self, plugin_api, plugin_name):
|
def __init__(self, plugin_api, plugin_name):
|
||||||
# Load the GtkUI portion of the plugin
|
# Load the GtkUI portion of the plugin
|
||||||
try:
|
try:
|
||||||
from gtkui import GtkUI
|
from gtkui import GtkUI
|
||||||
self.plugin = GtkUI()
|
self.plugin = GtkUI(plugin_api, plugin_name)
|
||||||
except:
|
except Exception, e:
|
||||||
pass
|
log.debug("Did not load a GtkUI plugin: %s", e)
|
||||||
|
|
|
@ -35,9 +35,13 @@ from deluge.log import LOG as log
|
||||||
import ui
|
import ui
|
||||||
|
|
||||||
class GtkUI(ui.UI):
|
class GtkUI(ui.UI):
|
||||||
def __init__(self):
|
def __init__(self, plugin_api, plugin_name):
|
||||||
ui.UI.__init__(self)
|
log.debug("Calling UI init")
|
||||||
log.debug("gtkui plugin initialized..")
|
# 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
|
from deluge.log import LOG as log
|
||||||
|
|
||||||
class UI:
|
class UI:
|
||||||
def __init__(self):
|
def __init__(self, plugin_api, plugin_name):
|
||||||
pass
|
self.plugin = plugin_api
|
||||||
|
|
||||||
def enable(self):
|
def enable(self):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue