# HG changeset patch # User Goffi # Date 1459005323 -3600 # Node ID 70ce9421c4d35f1a95505cb5e66afd06e6198ceb # Parent b603a3d516d30a699a55e84abb562d590c5a4129 quick frontend (QuickApp): added ui_show_cb in actionManager, so frontend can handle the display of the XMLUI itself diff -r b603a3d516d3 -r 70ce9421c4d3 frontends/src/quick_frontend/quick_app.py --- a/frontends/src/quick_frontend/quick_app.py Fri Mar 25 15:32:43 2016 +0100 +++ b/frontends/src/quick_frontend/quick_app.py Sat Mar 26 16:15:23 2016 +0100 @@ -751,14 +751,23 @@ 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')