Infer object name from 'name' property
[gregoa/zavai.git] / zavai / app.py
index dfa86cc4eaac613fb45deedf86a913e3d6d2e788..22be04e3cfafc85d002e75d0f660c6bde20d995e 100644 (file)
@@ -60,16 +60,20 @@ class Zavai(gtk.Window, zavai.Resource):
         gtk.main()
 
 class Applet(gtk.VBox):
         gtk.main()
 
 class Applet(gtk.VBox):
+    name = gobject.property(type=str)
     label = gobject.property(type=str)
 
     def __init__(self, registry, name, label = None):
         super(Applet, self).__init__()
     label = gobject.property(type=str)
 
     def __init__(self, registry, name, label = None):
         super(Applet, self).__init__()
+
         self.zavai_registry = registry
         self.zavai_registry = registry
-        self.zavai_name = name
+
+        self.props.name = name
         if label is None:
             self.props.label = zavai.default_label(name)
         else:
             self.props.label = label
         if label is None:
             self.props.label = zavai.default_label(name)
         else:
             self.props.label = label
+
         self.back_link = zavai.LinkButton(registry, zavai.get_parent(name), _("Back"))
         self.pack_end(self.back_link, False, False)
 
         self.back_link = zavai.LinkButton(registry, zavai.get_parent(name), _("Back"))
         self.pack_end(self.back_link, False, False)