Mercurial > libervia-backend
changeset 145:c8b231abfe96
Primitivus: additionnal menus management
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jul 2010 19:51:17 +0800 (2010-07-28) |
parents | 80661755ea8d |
children | 7c00c4b0a5c2 |
files | frontends/primitivus/primitivus |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/primitivus/primitivus Mon Jul 26 19:43:44 2010 +0800 +++ b/frontends/primitivus/primitivus Wed Jul 28 19:51:17 2010 +0800 @@ -184,6 +184,18 @@ menu.addMenu(contact, _("Remove contact"), self.onRemoveContactRequest) communication = _("Communication") menu.addMenu(communication, _("Join room"), self.onJoinRoomRequest, 'meta j') + #additionals menus + #FIXME: do this in a more generic way (in quickapp) + add_menus = self.bridge.getMenus() + def add_menu_cb(menu): + category, item = menu + id = self.bridge.callMenu(category, item, "NORMAL") + self.current_action_ids.add(id) + for new_menu in add_menus: + category,item,type = new_menu + assert(type=="NORMAL") #TODO: manage other types + menu.addMenu(category, item, add_menu_cb) + menu_roller = custom_widgets.MenuRoller([(_('Main menu'),menu)]) return menu_roller