Mercurial > libervia-web
diff src/browser/sat_browser/menu.py @ 509:35ccb3ff8245
browser_side: add method GenericMenuBar.addCategory + fixes MenuNode.addMenuItem when callback argument is a sub-menu
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 21 Aug 2014 16:18:51 +0200 |
parents | 4aa627b059df |
children | 9bfd71e2b35c |
line wrap: on
line diff
--- a/src/browser/sat_browser/menu.py Thu Aug 21 11:21:47 2014 +0200 +++ b/src/browser/sat_browser/menu.py Thu Aug 21 16:18:51 2014 +0200 @@ -65,10 +65,13 @@ def addMenuItem(self, *args): self.menu_bar.addMenuItem(*args) + def addCategory(self, *args): + self.menu_bar.addCategory(*args) + def createMenus(self): self.addMenuItem("General", [_("General"), _("Web widget")], 'home', MenuCmd(self, "onWebWidget")) self.addMenuItem("General", [_("General"), _("Disconnect")], 'home', MenuCmd(self, "onDisconnect")) - self.addMenuItem("Contacts", [_("Contacts"), None], 'social') # save the position for this category + self.addCategory("Contacts", _("Contacts"), 'social') # save the position for this category self.addMenuItem("Groups", [_("Groups"), _("Discussion")], 'social', MenuCmd(self, "onJoinRoom")) self.addMenuItem("Groups", [_("Groups"), _("Collective radio")], 'social', MenuCmd(self, "onCollectiveRadio")) self.addMenuItem("Games", [_("Games"), _("Tarot")], 'games', MenuCmd(self, "onTarotGame"))