diff src/bridge/bridge_constructor/bridge_template.ini @ 773:eac23b1aad90

core: dynamics menus refactoring: - menu now use generic callback system, with extra data - asyncMenuCall is removed in favor of launchAction - menu_id (== callback_id) is used to identify menu instead of category/name/type tuple - i18n is managed throught deferred translation, and returned with _i18n suffix e.g.: menu (D_('File'), D_('Open')): (u'File', u'Open') is menu_path, (u'Fichier', u'Ouvrir') is french menu_path_i18n. - type actually can have the following values: - NORMAL: classical menu - JID_CONTEXT: contextual menu, used with any jid - ROSTER_JID_CONTEXT: like JID_CONTEXT, but restricted to jids in roster. - ROSTER_GROUP_CONTEXT: contextual menu, use with groups - security_limit is used, in the same way as for parameters - when using importMenu, callback can be an actual callback, or one already registered with registerCallback
author Goffi <goffi@goffi.org>
date Sun, 29 Dec 2013 17:10:14 +0100
parents 93bd868b8fb6
children 5642939d254e
line wrap: on
line diff
--- a/src/bridge/bridge_constructor/bridge_template.ini	Sun Dec 29 17:10:10 2013 +0100
+++ b/src/bridge/bridge_constructor/bridge_template.ini	Sun Dec 29 17:10:14 2013 +0100
@@ -1,6 +1,7 @@
 [DEFAULT]
 doc_profile=profile: Name of the profile.
 doc_profile_key=profile_key: Profile key which can be either a magic (eg: @DEFAULT@) or the name of an existing profile.
+doc_security_limit=security_limit: -1 means no security then the higher the most secure
 
 ;signals
 
@@ -410,7 +411,7 @@
 doc_param_0=name: Name of the parameter to change
 doc_param_1=value: New Value of the parameter
 doc_param_2=category: Category of the parameter to change
-doc_param_3=security_limit: -1 means no security then the higher the most secure
+doc_param_3=%(doc_security_limit)s
 doc_param_4=%(doc_profile_key)s
 
 [getParamA]
@@ -439,7 +440,7 @@
 doc_param_0=name: as for [setParam]
 doc_param_1=category: as for [setParam]
 doc_param_2=attribute: Name of the attribute
-doc_param_3=security_limit: -1 means no security then the higher the most secure
+doc_param_3=%(doc_security_limit)s
 doc_param_4=%(doc_profile_key)s
 
 [getParamsUI]
@@ -451,7 +452,7 @@
 param_0_default=-1
 param_1_default="@DEFAULT@"
 doc=Return a SàT XMLUI for parameters
-doc_param_0=security_limit: -1 means no security then the higher the most secure
+doc_param_0=%(doc_security_limit)s
 doc_param_1=%(doc_profile_key)s
 
 [getParams]
@@ -463,7 +464,7 @@
 param_0_default=-1
 param_1_default="@DEFAULT@"
 doc=Return XML of parameters
-doc_param_0=security_limit: -1 means no security then the higher the most secure
+doc_param_0=%(doc_security_limit)s
 doc_param_1=%(doc_profile_key)s
 
 [getParamsForCategory]
@@ -476,7 +477,7 @@
 param_2_default="@DEFAULT@"
 doc=Return a xml of all params in a category
 doc_param_0=category: Category to get
-doc_param_1=security_limit: -1 means no security then the higher the most secure
+doc_param_1=%(doc_security_limit)s
 doc_param_2=%(doc_profile_key)s
 
 [getParamsCategories]
@@ -576,36 +577,26 @@
 [getMenus]
 type=method
 category=core
-sig_in=
-sig_out=a(sss)
+sig_in= si
+sig_out=a(ssasas)
 doc=Get all additional menus
+doc_param_0=language: language in which the menu should be translated (empty string for default)
+doc_param_1=security_limit: %(doc_security_limit)s
 doc_return=list of tuple with the following value:
+ - menu_id: menu id (same as callback id)
  - menu_type: Type which can be:
     * NORMAL: Classical application menu
- - category: Category of the menu
- - name: Name of the menu
+ - menu_path: raw path of the menu
+ - menu_path_i18n: translated path of the menu
 
 [getMenuHelp]
 type=method
 category=core
-sig_in=sss
+sig_in=ss
 sig_out=s
 param_2="NORMAL"
 doc=Get help information for a menu
-doc_param_0=category: Category of the menu
-doc_param_1=name: Name of the menu
-doc_param_2=menu_type: Type of the menu as in [getMenus] return value
-doc_return=Help string
+doc_param_0=menu_id: id of the menu (same as callback_id)
+doc_param_1=language: language in which the menu should be translated (empty string for default)
+doc_return=Translated help string
 
-[asyncCallMenu]
-async=
-type=method
-category=core
-sig_in=ssss
-sig_out=s
-doc=Execute action associated with a menu
-doc_param_0=category: as in [getMenuHelp]
-doc_param_1=name: as in [getMenuHelp]
-doc_param_2=menu_type: as in [getMenuHelp]
-doc_param_3=%(doc_profile_key)s
-doc_return=return a XMLUI or empty string if it is a one shot action