Initial import
[gregoa/zavai.git] / zavai / app.py
1 import sys
2 import gtk
3
4 class Zavai(gtk.Window):
5     def __init__(self, registry, name):
6         super(Zavai, self).__init__()
7         self.registry = registry
8         self.add(registry.menu("main"))
9
10     def show_widget(self, name):
11         widget = self.registry.get_existing(name)
12         if widget is None:
13             widget = self.registry.menu("main")
14         self.remove(self.get_child())
15         self.add(widget)
16         widget.show_all()
17
18     def run(self):
19         self.fullscreen()
20         self.show_all()
21         gtk.main()
22