Remove test plugin
This commit is contained in:
parent
570b2df000
commit
b3d5a8a808
|
@ -1,52 +0,0 @@
|
||||||
# setup.py
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 3, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, write to:
|
|
||||||
# The Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
|
||||||
# library.
|
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
|
||||||
# this exception statement from your version. If you delete this exception
|
|
||||||
# statement from all source files in the program, then also delete it here.
|
|
||||||
|
|
||||||
"""
|
|
||||||
Test plugin
|
|
||||||
"""
|
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
__author__ = "Andrew Resch"
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name="Test Plugin",
|
|
||||||
version="1.0",
|
|
||||||
description=__doc__,
|
|
||||||
author=__author__,
|
|
||||||
packages=["testp"],
|
|
||||||
package_data = {"testp": ["glade/*.glade"]},
|
|
||||||
entry_points="""
|
|
||||||
[deluge.plugin.core]
|
|
||||||
Testp = testp:CorePlugin
|
|
||||||
[deluge.plugin.gtkui]
|
|
||||||
Testp = testp:GtkUIPlugin
|
|
||||||
"""
|
|
||||||
)
|
|
|
@ -1,54 +0,0 @@
|
||||||
#
|
|
||||||
# __init__.py
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
|
|
||||||
#
|
|
||||||
# Deluge is free software.
|
|
||||||
#
|
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License, as published by the Free Software
|
|
||||||
# Foundation; either version 3 of the License, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# deluge is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with deluge. If not, write to:
|
|
||||||
# The Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
|
||||||
# library.
|
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
|
||||||
# this exception statement from your version. If you delete this exception
|
|
||||||
# statement from all source files in the program, then also delete it here.
|
|
||||||
|
|
||||||
from deluge.log import LOG as log
|
|
||||||
|
|
||||||
from deluge.plugins.init import PluginBase
|
|
||||||
|
|
||||||
class CorePlugin(PluginBase):
|
|
||||||
def __init__(self, plugin_api, plugin_name):
|
|
||||||
# Load the Core portion of the plugin
|
|
||||||
try:
|
|
||||||
from core import Core
|
|
||||||
self.plugin = Core(plugin_api, plugin_name)
|
|
||||||
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(plugin_api, plugin_name)
|
|
||||||
except Exception, e:
|
|
||||||
log.debug("Did not load a GtkUI plugin: %s", e)
|
|
|
@ -1,43 +0,0 @@
|
||||||
#
|
|
||||||
# core.py
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
|
|
||||||
#
|
|
||||||
# Deluge is free software.
|
|
||||||
#
|
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License, as published by the Free Software
|
|
||||||
# Foundation; either version 3 of the License, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# deluge is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with deluge. If not, write to:
|
|
||||||
# The Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
|
||||||
# library.
|
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
|
||||||
# this exception statement from your version. If you delete this exception
|
|
||||||
# statement from all source files in the program, then also delete it here.
|
|
||||||
|
|
||||||
from deluge.log import LOG as log
|
|
||||||
from deluge.plugins.corepluginbase import CorePluginBase
|
|
||||||
|
|
||||||
class Core(CorePluginBase):
|
|
||||||
def enable(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def disable(self):
|
|
||||||
pass
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
#
|
|
||||||
# gtkui.py
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
|
|
||||||
#
|
|
||||||
# Deluge is free software.
|
|
||||||
#
|
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License, as published by the Free Software
|
|
||||||
# Foundation; either version 3 of the License, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# deluge is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with deluge. If not, write to:
|
|
||||||
# The Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
|
||||||
# library.
|
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
|
||||||
# this exception statement from your version. If you delete this exception
|
|
||||||
# statement from all source files in the program, then also delete it here.
|
|
||||||
|
|
||||||
from deluge.log import LOG as log
|
|
||||||
import ui
|
|
||||||
|
|
||||||
class GtkUI(object):
|
|
||||||
def __init__(self, plugin_api, plugin_name):
|
|
||||||
log.debug("Calling UI init")
|
|
||||||
self.plugin = plugin_api
|
|
||||||
|
|
||||||
def enable(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def disable(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def enable(self):
|
|
||||||
self.plugin.register_hook("on_apply_prefs", self.apply_prefs)
|
|
||||||
|
|
||||||
def disable(self):
|
|
||||||
self.plugin.deregister_hook("on_apply_prefs", self.apply_prefs)
|
|
||||||
|
|
||||||
def apply_prefs(self):
|
|
||||||
log.debug("applying prefs")
|
|
|
@ -1,44 +0,0 @@
|
||||||
#
|
|
||||||
# ui.py
|
|
||||||
#
|
|
||||||
# Copyright (C) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
|
|
||||||
#
|
|
||||||
# Deluge is free software.
|
|
||||||
#
|
|
||||||
# You may redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License, as published by the Free Software
|
|
||||||
# Foundation; either version 3 of the License, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# deluge is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with deluge. If not, write to:
|
|
||||||
# The Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor
|
|
||||||
# Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
|
||||||
# library.
|
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
|
||||||
# this exception statement from your version. If you delete this exception
|
|
||||||
# statement from all source files in the program, then also delete it here.
|
|
||||||
|
|
||||||
from deluge.log import LOG as log
|
|
||||||
|
|
||||||
class UI:
|
|
||||||
def __init__(self, plugin_api, plugin_name):
|
|
||||||
self.plugin = plugin_api
|
|
||||||
|
|
||||||
def enable(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def disable(self):
|
|
||||||
pass
|
|
Loading…
Reference in New Issue