core (menus): improvments:

- use the new convention for bridge names (getMenus ==> menusGet, etc.)
    - menu now use canonical path, which is the untranslated path with each element stripped and lowercase, it must be unique by menu type
    - added menuLaunch method to manually launch a menu like an action, canonical path is used instead of id
    - added SECURITY_LIMIT_MAX constant
This commit is contained in:
Goffi 2017-01-26 20:29:48 +01:00
commit d8b9c85cc0

View file

@ -514,7 +514,7 @@ class PrimitivusApp(QuickApp, InputHistory):
"""
def add_menu_cb(callback_id):
self.launchAction(callback_id, menu_data, profile=self.current_profile)
for id_, type_, path, path_i18n, extra in self.bridge.getMenus("", C.NO_SECURITY_LIMIT ): # TODO: manage extra
for id_, type_, path, path_i18n, extra in self.bridge.menusGet("", C.NO_SECURITY_LIMIT ): # TODO: manage extra
if type_ != type_filter:
continue
if len(path) != 2: