Fix plugin __init__'s and update create_plugin script

This commit is contained in:
Andrew Resch 2009-03-23 21:03:43 +00:00
parent 5c5bc9a713
commit 3a558433b9
4 changed files with 48 additions and 12 deletions

View File

@ -26,10 +26,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)

View File

@ -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)

View File

@ -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)

View File

@ -135,13 +135,22 @@ INIT = """
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)
"""