Show remaining time to last deadline
[gregoa/zavai.git] / plugins / 99_debug.py
index 6ddc17621f8359db2999dbafc1307cd287d369fd..f5015cd38bbeee7534096efd7fd6b1bf2c94acf4 100644 (file)
@@ -21,13 +21,17 @@ import sys
 from gettext import gettext as _
 import zavai
 
-class Quitter(gtk.Label, zavai.Applet):
-    def __init__(self, registry, name, **kw):
-        zavai.Applet.__init__(self, registry, name)
-        gtk.Label.__init__(self, _("Shutting down..."))
+class Useless(zavai.Applet):
+    def __init__(self, registry, **kw):
+        zavai.Applet.__init__(self, registry, "menu.main.debug.useless", _("Useless"))
+        self.add(gtk.Label(_("This has no use")))
 
-    def start(self, *args):
-        gtk.main_quit()
+class Quitter(gtk.Action):
+    def __init__(self, **kw):
+        super(Quitter, self).__init__("menu.main.debug.quit", _("Quit"), None, None)
+
+        self.connect("activate", gtk.main_quit)
 
 def init(conf = None, registry = None, **kw):
-    registry.register_factory("menu.main.debug.quit", Quitter, _("Quit"))
+    registry.register(Useless(registry))
+    registry.register(Quitter())