core, quick_frontends: added an "extra" item in getMenus + use of new quick_menus module in QuickApp
This commit is contained in:
parent
565c0b2b71
commit
80e65d5b84
1 changed files with 15 additions and 9 deletions
|
|
@ -25,7 +25,8 @@ from sat.core import exceptions
|
|||
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 @@ class QuickApp(object):
|
|||
@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 @@ class QuickApp(object):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue