Mercurial > libervia-backend
diff src/core/sat_main.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 | 33a21f06551d |
children | 0befb14ecf62 |
line wrap: on
line diff
--- a/src/core/sat_main.py Tue Mar 17 19:33:05 2015 +0100 +++ b/src/core/sat_main.py Tue Mar 17 19:33:05 2015 +0100 @@ -858,6 +858,7 @@ 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 @@ - 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 @@ 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