fix __init__ to stop gtk being imported in the core
This commit is contained in:
parent
0ed166647d
commit
5c5bc9a713
|
@ -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)
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue