diff sat_frontends/jp/cmd_file.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 877145b4ba01
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_file.py	Mon May 15 16:20:38 2023 +0200
+++ b/sat_frontends/jp/cmd_file.py	Mon May 15 16:20:45 2023 +0200
@@ -387,12 +387,15 @@
             if self._overwrite_refused:
                 self.disp(_("File refused because overwrite is needed"), error=True)
                 await self.host.bridge.action_launch(
-                    xmlui_id, {"cancelled": C.BOOL_TRUE}, profile_key=profile
+                    xmlui_id, data_format.serialise({"cancelled": C.BOOL_TRUE}),
+                    profile_key=profile
                 )
                 return self.host.quit_from_signal(2)
             await self.set_progress_id(progress_id)
             xmlui_data = {"path": self.path}
-            await self.host.bridge.action_launch(xmlui_id, xmlui_data, profile_key=profile)
+            await self.host.bridge.action_launch(
+                xmlui_id, data_format.serialise(xmlui_data), profile_key=profile
+            )
 
     async def on_overwrite_action(self, action_data, action_id, security_limit, profile):
         xmlui_id = self.get_xmlui_id(action_data)
@@ -413,7 +416,9 @@
                 self._overwrite_refused = True
 
             xmlui_data = {"answer": C.bool_const(self.args.force)}
-            await self.host.bridge.action_launch(xmlui_id, xmlui_data, profile_key=profile)
+            await self.host.bridge.action_launch(
+                xmlui_id, data_format.serialise(xmlui_data), profile_key=profile
+            )
 
     async def on_not_in_roster_action(self, action_data, action_id, security_limit, profile):
         xmlui_id = self.get_xmlui_id(action_data)
@@ -443,7 +448,9 @@
             confirmed = await self.host.confirm(xmlui.dlg.message)
 
         xmlui_data = {"answer": C.bool_const(confirmed)}
-        await self.host.bridge.action_launch(xmlui_id, xmlui_data, profile_key=profile)
+        await self.host.bridge.action_launch(
+            xmlui_id, data_format.serialise(xmlui_data), profile_key=profile
+        )
         if not confirmed and not self.args.multiple:
             self.disp(_("Session refused for {from_jid}").format(from_jid=from_jid))
             self.host.quit_from_signal(0)