diff frontends/src/quick_frontend/quick_app.py @ 1365:ba87b940f07a frontends_multi_profiles

core, quick_frontends: added an "extra" item in getMenus + use of new quick_menus module in QuickApp
author Goffi <goffi@goffi.org>
date Tue, 17 Mar 2015 19:33:05 +0100
parents fa77e40eb17b
children 0befb14ecf62
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Tue Mar 17 19:33:05 2015 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Tue Mar 17 19:33:05 2015 +0100
@@ -25,7 +25,8 @@
 from sat.tools.misc import TriggerManager
 
 from sat_frontends.tools import jid
-from sat_frontends.quick_frontend.quick_widgets import QuickWidgetsManager
+from sat_frontends.quick_frontend import quick_widgets
+from sat_frontends.quick_frontend import quick_menus
 from sat_frontends.quick_frontend import quick_chat, quick_games
 from sat_frontends.quick_frontend.constants import Const as C
 
@@ -203,12 +204,13 @@
         @param create_bridge: method to use to create the Bridge
         @param check_options: method to call to check options (usually command line arguments)
         """
+        self.menus = quick_menus.QuickMenusManager(self)
         ProfileManager.host = self
         self.profiles = ProfilesManager()
         self.ready_profiles = set() # profiles which are connected and ready
         self.signals_cache = {} # used to keep signal received between start of plug_profile and when the profile is actualy ready
         self.contact_lists = {}
-        self.widgets = QuickWidgetsManager(self)
+        self.widgets = quick_widgets.QuickWidgetsManager(self)
         if check_options is not None:
             self.options = check_options()
         else:
@@ -656,7 +658,7 @@
     def actionResultHandler(self, type, id, data, profile):
         raise NotImplementedError
 
-    def launchAction(self, callback_id, data=None, callback=None, profile="@NONE@"):
+    def launchAction(self, callback_id, data=None, callback=None, profile=C.PROF_KEY_NONE):
         """Launch a dynamic action
         @param callback_id: id of the action to launch
         @param data: data needed only for certain actions