Mercurial > libervia-backend
diff frontends/primitivus/primitivus @ 117:1f0fd6f03e2b
misc fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 03 Jul 2010 12:01:01 +0800 |
parents | 7c482ecac0ff |
children | 76055a209ed9 |
line wrap: on
line diff
--- a/frontends/primitivus/primitivus Thu Jul 01 18:52:51 2010 +0800 +++ b/frontends/primitivus/primitivus Sat Jul 03 12:01:01 2010 +0800 @@ -66,7 +66,7 @@ QuickApp.__init__(self) #XXX: yes it's an unusual place for the constructor of a parent class, but the init order is important ## main loop setup ## - self.main_widget = self.__buildMainWidget() + self.main_widget = ProfileManager(self) self.loop = urwid.MainLoop(self.main_widget, const_PALETTE, event_loop=urwid.GLibEventLoop(), unhandled_input=self.key_handler) def start(self): @@ -77,14 +77,20 @@ raise urwid.ExitMainLoop() def __buildMainWidget(self): - #main_widget = urwid.Filler(ProfileManager(self)) - main_widget = ProfileManager(self) - return main_widget + self.contactList = ContactList(self, self.CM) + return self.contactList def plug_profile(self, profile_key='@DEFAULT@'): - self.loop.widget = self.contactList = ContactList(self, self.CM) + self.main_widget = self.loop.widget = self.__buildMainWidget() QuickApp.plug_profile(self, profile_key) - + + def removePopUp(self): + self.loop.widget = self.main_widget + + def showPopUp(self, pop_up_widget): + display_widget = urwid.Overlay(pop_up_widget, self.main_widget, 'center', ('relative', 40), 'middle', ('relative', 40)) + self.loop.widget = display_widget sat = PrimitivusApp() sat.start() +