diff --git a/deluge/plugins/execute/execute/__init__.py b/deluge/plugins/execute/execute/__init__.py index 267a95668..887865a2c 100644 --- a/deluge/plugins/execute/execute/__init__.py +++ b/deluge/plugins/execute/execute/__init__.py @@ -25,10 +25,19 @@ from deluge.plugins.init import PluginInitBase class CorePlugin(PluginInitBase): - from core import Core as _plugin_cls + def __init__(self, plugin_name): + from core import Core as _plugin_cls + self._plugin_cls = _plugin_cls + super(CorePlugin, self).__init__(plugin_name) class GtkUIPlugin(PluginInitBase): - from gtkui import GtkUI as _plugin_cls + def __init__(self, plugin_name): + from gtkui import GtkUI as _plugin_cls + self._plugin_cls = _plugin_cls + super(GtkUIPlugin, self).__init__(plugin_name) class WebUIPlugin(PluginInitBase): - from webui import WebUI as _plugin_cls + def __init__(self, plugin_name): + from webui import WebUI as _plugin_cls + self._plugin_cls = _plugin_cls + super(WebUIPlugin, self).__init__(plugin_name) \ No newline at end of file diff --git a/deluge/plugins/execute/execute/gtkui.py b/deluge/plugins/execute/execute/gtkui.py index 71c8f8b9e..ac524ccda 100644 --- a/deluge/plugins/execute/execute/gtkui.py +++ b/deluge/plugins/execute/execute/gtkui.py @@ -23,6 +23,7 @@ # import os +import gtk import pkg_resources from deluge.log import LOG as log @@ -31,8 +32,6 @@ from deluge.plugins.pluginbase import GtkPluginBase import deluge.component as component import deluge.common -gtk = None - EXECUTE_ID = 0 EXECUTE_EVENT = 1 EXECUTE_COMMAND = 2 @@ -47,8 +46,6 @@ EVENTS = ["complete", "added"] class ExecutePreferences(object): def __init__(self, plugin): self.plugin = plugin - global gtk - import gtk def load(self): log.debug("Adding Execute Preferences page")