diff --git a/frontends/src/quick_frontend/constants.py b/frontends/src/quick_frontend/constants.py index 8e9e035b..92c6d481 100644 --- a/frontends/src/quick_frontend/constants.py +++ b/frontends/src/quick_frontend/constants.py @@ -71,4 +71,4 @@ class Const(constants.Const): WIDGET_RAISE = 'RAISE' WIDGET_RECREATE = 'RECREATE' - LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus'} + LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus', 'menu'} diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 6fe4a515..04df767e 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -312,11 +312,18 @@ class QuickApp(object): /!\ don't forget to remove listener when not used anymore (e.g. if you delete a widget) @param type_: type of event, can be: - avatar: called when avatar data is updated - args: (entity, avatar file, profile) + args: (entity, avatar file, profile) - nick: called when nick data is updated - args: (entity, new_nick, profile) + args: (entity, new_nick, profile) - presence: called when a presence is received - args: (entity, show, priority, statuses, profile) + args: (entity, show, priority, statuses, profile) + - menu: called when a menu item is added or removed + args: (type_, path, path_i18n, item) were values are: + type_: same as in [sat.core.sat_main.SAT.importMenu] + path: same as in [sat.core.sat_main.SAT.importMenu] + path_i18n: translated path (or None if the item is removed) + item: instance of quick_menus.MenuItemBase or None if the item is removed + - gotMenus: called only once when menu are available (no arg) @param callback: method to call on event @param profiles_filter (set[unicode]): if set and not empty, the listener will be callable only by one of the given profiles.