diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 4d1a1f7d..a5d0ca2c 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -751,14 +751,23 @@ class QuickApp(object): def actionResultHandler(self, type, id, data, profile): raise NotImplementedError - def actionManager(self, action_data, callback=None, profile=C.PROF_KEY_NONE): + def actionManager(self, action_data, callback=None, ui_show_cb=None, profile=C.PROF_KEY_NONE): + """Handle backend action + + @param action_data(dict): action dict as sent by launchAction or returned by an UI action + @param callback(None, callback): if not None, callback to use on XMLUI answer + @param ui_show_cb(None, callback): if not None, method to call to show the XMLUI + """ try: xmlui = action_data.pop('xmlui') except KeyError: pass else: ui = self.xmlui.create(self, xml_data=xmlui, callback=callback, profile=profile) - ui.show() + if ui_show_cb is None: + ui.show() + else: + ui_show_cb(ui) try: progress_id = action_data.pop('progress')