Show remaining time to last deadline
[gregoa/zavai.git] / plugins / 99_debug.py
index b7801e0e0d698a778ed09cb1a5335dea3a7cdb5a..f5015cd38bbeee7534096efd7fd6b1bf2c94acf4 100644 (file)
 
 import gtk
 import sys
-import gettext
-_ = gettext.gettext
+from gettext import gettext as _
 import zavai
 
-def init(conf = None, registry = None, **kw):
-    debug = registry.menu("main.debug")
+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")))
 
-    quit = zavai.MenuButton(_("Quit"))
-    quit.connect("clicked", gtk.main_quit)
-    debug.add_child(quit)
+class Quitter(gtk.Action):
+    def __init__(self, **kw):
+        super(Quitter, self).__init__("menu.main.debug.quit", _("Quit"), None, None)
 
-    registry.menu("main").add_child(registry.menu_link("main.debug", _("Debug")))
+        self.connect("activate", gtk.main_quit)
 
+def init(conf = None, registry = None, **kw):
+    registry.register(Useless(registry))
+    registry.register(Quitter())