summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/etc_proposals.py4
-rw-r--r--plugins/exception.py4
-rw-r--r--plugins/new_version.py4
3 files changed, 8 insertions, 4 deletions
diff --git a/plugins/etc_proposals.py b/plugins/etc_proposals.py
index 7de83f3..83b38f7 100644
--- a/plugins/etc_proposals.py
+++ b/plugins/etc_proposals.py
@@ -15,7 +15,7 @@ from portato.helper import error
import os
from subprocess import Popen
-class EtcProposals (Plugin):
+class EtcProposals (WidgetPlugin):
__author__ = "René 'Necoro' Neumann"
__description__ = "Adds support for <b>etc-proposals</b>, a graphical etc-update replacement."
__dependency__ = ["app-portage/etc-proposals"]
@@ -23,6 +23,8 @@ class EtcProposals (Plugin):
def init (self):
self.prog = ["/usr/sbin/etc-proposals"]
self.add_call("after_emerge", self.hook, type = "after")
+
+ def widget_init(self):
self.create_widget("Plugin Menu", "Et_c-Proposals", activate = self.menu)
def launch (self, options = []):
diff --git a/plugins/exception.py b/plugins/exception.py
index 23065e6..3fe7287 100644
--- a/plugins/exception.py
+++ b/plugins/exception.py
@@ -13,8 +13,8 @@
def throw (*args, **kwargs):
raise Exception, "As requested, Sir!"
-p = Plugin()
+p = WidgetPlugin()
p.__name__ = "ExceptionThrower"
p.__author__ = "René 'Necoro' Neumann"
-p.create_widget("Plugin Menu", "Throw exception", activate = throw)
+p.widget_init = lambda: p.create_widget("Plugin Menu", "Throw exception", activate = throw)
register(p)
diff --git a/plugins/new_version.py b/plugins/new_version.py
index e741348..f8d5d3c 100644
--- a/plugins/new_version.py
+++ b/plugins/new_version.py
@@ -21,7 +21,7 @@ from portato import get_listener
from portato.constants import REPOURI, VERSION, APP_ICON, APP
from portato.gui.utils import GtkThread
-class NewVersionFinder(Plugin):
+class NewVersionFinder(WidgetPlugin):
"""
Checks for a new version of portato every 30 minutes and on startup.
"""
@@ -30,6 +30,8 @@ class NewVersionFinder(Plugin):
def init (self):
self.add_call("main", self.run)
+
+ def widget_init (self):
self.create_widget("Plugin Menu", "Check for new _versions", activate = self.menu)
def find_version (self, rev):
it/commit/portato/gui/windows/plugin.py?id=a32293a8bbb0a90512d4f8e0fbc385257b29e72a&follow=1'>Should show dependencies nowRené 'Necoro' Neumann2-82/+128 2008-07-03New plugin system - first hackRené 'Necoro' Neumann2-420/+683 2008-06-30Now the new design is able to do the same as the old oneRené 'Necoro' Neumann3-168/+182 2008-06-30First draft of the new plugin windowRené 'Necoro' Neumann1-8/+172 2008-06-30Added stuff to plugin.pyRené 'Necoro' Neumann1-2/+24 2008-06-25Now load 22 versions when running the correct portageRené 'Necoro' Neumann4-8/+18 2008-06-25Added Package_22 and System_22René 'Necoro' Neumann4-5/+63