summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/etc_proposals.py4
-rw-r--r--plugins/gpytage.py3
-rw-r--r--plugins/notify.py12
3 files changed, 10 insertions, 9 deletions
diff --git a/plugins/etc_proposals.py b/plugins/etc_proposals.py
index 07f9a80..c32c8f3 100644
--- a/plugins/etc_proposals.py
+++ b/plugins/etc_proposals.py
@@ -20,9 +20,7 @@ class EtcProposals (Plugin):
__description__ = "Adds support for <b>etc-proposals</b>, a graphical etc-update replacement."
__dependency__ = ["app-portage/etc-proposals"]
- def __init__ (self):
- Plugin.__init__(self)
-
+ def init (self):
self.prog = ["/usr/sbin/etc-proposals"]
self.add_call("after_emerge", self.hook, type = "after")
self.add_menu("Et_c-Proposals", self.menu)
diff --git a/plugins/gpytage.py b/plugins/gpytage.py
index 33509e1..d8c2831 100644
--- a/plugins/gpytage.py
+++ b/plugins/gpytage.py
@@ -17,8 +17,7 @@ class GPytage (Plugin):
__description__ = "Adds a menu entry to directly start <b>gpytage</b>, a config editor."
__dependency__ = ["app-portage/gpytage"]
- def __init__ (self):
- Plugin.__init__(self)
+ def init (self):
self.add_menu("Config _Editor", self.menu)
def menu (self, *args):
diff --git a/plugins/notify.py b/plugins/notify.py
index bc1b2ea..6446812 100644
--- a/plugins/notify.py
+++ b/plugins/notify.py
@@ -10,7 +10,12 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-import pynotify
+disable = False
+
+try:
+ import pynotify
+except ImportError:
+ disable = True
from portato import get_listener
@@ -22,8 +27,7 @@ class Notify (Plugin):
__description__ = "Show notifications when an emerge process finishes."
__dependency__ = ["dev-python/notify-python"]
- def __init__ (self):
- Plugin.__init__(self)
+ def init (self):
self.add_call("after_emerge", self.notify)
def notify (self, retcode, **kwargs):
@@ -42,4 +46,4 @@ class Notify (Plugin):
get_listener().send_notify(base = text, descr = descr, icon = icon, urgency = urgency)
-register(Notify)
+register(Notify, disable)