diff frontends/src/quick_frontend/quick_app.py @ 1093:11e2bb20e896

core, frontends (menus): MENU_ROOM and MENU_SINGLE are now managed
author Goffi <goffi@goffi.org>
date Thu, 26 Jun 2014 00:05:20 +0200
parents a47995155e55
children a096b8579a3c
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Wed Jun 25 20:54:15 2014 +0200
+++ b/frontends/src/quick_frontend/quick_app.py	Thu Jun 26 00:05:20 2014 +0200
@@ -133,8 +133,13 @@
             return
         self.profiles[profile] = {}
         if self.single_profile:
-            self.profile = profile
-
+            self.profile = profile # FIXME: must be refactored (multi profiles are not managed correclty)
+        raw_menus = self.bridge.getMenus("", C.NO_SECURITY_LIMIT )
+        menus = self.profiles[profile]['menus'] = {}
+        for raw_menu in raw_menus:
+            id_, type_, path, path_i18n  = raw_menu
+            menus_data = menus.setdefault(type_, [])
+            menus_data.append((id_, path, path_i18n))
         self.launchAction(C.AUTHENTICATE_PROFILE_ID, {'caller': 'plug_profile'}, profile_key=profile)
 
     def plug_profile_1(self, profile):