comparison sat_frontends/jp/xmlui_manager.py @ 4041:2594e1951cf7

core (bridge): `action_new` now use serialised dict for extra data.
author Goffi <goffi@goffi.org>
date Mon, 15 May 2023 16:20:45 +0200
parents 524856bd7b19
children 4b842c1fb686
comparison
equal deleted inserted replaced
4040:1f967f85fc23 4041:2594e1951cf7
21 from sat.core.log import getLogger 21 from sat.core.log import getLogger
22 from sat_frontends.tools import xmlui as xmlui_base 22 from sat_frontends.tools import xmlui as xmlui_base
23 from sat_frontends.jp.constants import Const as C 23 from sat_frontends.jp.constants import Const as C
24 from sat.tools.common.ansi import ANSI as A 24 from sat.tools.common.ansi import ANSI as A
25 from sat.core.i18n import _ 25 from sat.core.i18n import _
26 from sat.tools.common import data_format
26 27
27 log = getLogger(__name__) 28 log = getLogger(__name__)
28 29
29 # workflow constants 30 # workflow constants
30 31
617 self._submit_cb() 618 self._submit_cb()
618 619
619 async def _xmlui_launch_action(self, action_id, data): 620 async def _xmlui_launch_action(self, action_id, data):
620 XMLUIPanel._actions += 1 621 XMLUIPanel._actions += 1
621 try: 622 try:
622 data = await self.host.bridge.action_launch( 623 data = data_format.deserialise(
623 action_id, 624 await self.host.bridge.action_launch(
624 data, 625 action_id,
625 self.profile, 626 data_format.serialise(data),
627 self.profile,
628 )
626 ) 629 )
627 except Exception as e: 630 except Exception as e:
628 self.disp(f"can't launch XMLUI action: {e}", error=True) 631 self.disp(f"can't launch XMLUI action: {e}", error=True)
629 self.host.quit(C.EXIT_BRIDGE_ERRBACK) 632 self.host.quit(C.EXIT_BRIDGE_ERRBACK)
630 else: 633 else: