comparison src/cagou/core/cagou_main.py @ 112:d654bdfeb404

core: changes menu bridge call, to follow backend
author Goffi <goffi@goffi.org>
date Thu, 26 Jan 2017 20:39:07 +0100
parents 5d2289127bb7
children 1bbbe26846f4
comparison
equal deleted inserted replaced
111:c3952922ca56 112:d654bdfeb404
606 w.addTarget(t) 606 w.addTarget(t)
607 return w 607 return w
608 608
609 ## menus ## 609 ## menus ##
610 610
611 def _getMenusCb(self, backend_menus): 611 def _menusGetCb(self, backend_menus):
612 main_menu = self.app.root.root_menus 612 main_menu = self.app.root.root_menus
613 self.menus.addMenus(backend_menus) 613 self.menus.addMenus(backend_menus)
614 self.menus.addMenu(C.MENU_GLOBAL, (_(u"Help"), _(u"About")), callback=main_menu.onAbout) 614 self.menus.addMenu(C.MENU_GLOBAL, (_(u"Help"), _(u"About")), callback=main_menu.onAbout)
615 main_menu.update(C.MENU_GLOBAL) 615 main_menu.update(C.MENU_GLOBAL)
616 616
617 ## misc ## 617 ## misc ##
618 618
619 def plugging_profiles(self): 619 def plugging_profiles(self):
620 self.app.root.changeWidget(WidgetsHandler()) 620 self.app.root.changeWidget(WidgetsHandler())
621 self.bridge.getMenus("", C.NO_SECURITY_LIMIT, callback=self._getMenusCb) 621 self.bridge.menusGet("", C.NO_SECURITY_LIMIT, callback=self._menusGetCb)
622 622
623 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE): 623 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE):
624 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status)) 624 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status))
625 625
626 def addNote(self, title, message, level=C.XMLUI_DATA_LVL_INFO): 626 def addNote(self, title, message, level=C.XMLUI_DATA_LVL_INFO):