core, quick_frontends: added an "extra" item in getMenus + use of new quick_menus module in QuickApp

This commit is contained in:
Goffi 2015-03-17 19:33:05 +01:00
commit 80e65d5b84

View file

@ -858,6 +858,7 @@ class SAT(service.Service):
def getMenus(self, language='', security_limit=C.NO_SECURITY_LIMIT):
"""Return all menus registered
@param language: language used for translation, or empty string for default
@param security_limit: %(doc_security_limit)s
@return: array of tuple with:
@ -865,7 +866,9 @@ class SAT(service.Service):
- menu type
- raw menu path (array of strings)
- translated menu path
- extra (dict(unicode, unicode)): extra data where key can be:
- icon: name of the icon to use (TODO)
- help_url: link to a page with more complete documentation (TODO)
"""
ret = []
for menu_id, menu_data in self._menus.iteritems():
@ -877,7 +880,8 @@ class SAT(service.Service):
languageSwitch(language)
path_i18n = [_(elt) for elt in path]
languageSwitch()
ret.append((menu_id, type_, path, path_i18n))
extra = {} # TODO: manage extra data like icon
ret.append((menu_id, type_, path, path_i18n, extra))
return ret