From 77c4097c865338bf55a925e6f5470c0aac8a3d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 25 Nov 2023 03:47:28 +0100 Subject: [PATCH 1/2] [gtk4] GtkFileChooserNative: Fix portal close. This makes closing a portal file chooser work. Fixes the GTK4 bits of #6225. --- gtk/gtkfilechoosernativeportal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c index 4b964c2dfb..b84e4e9ed5 100644 --- a/gtk/gtkfilechoosernativeportal.c +++ b/gtk/gtkfilechoosernativeportal.c @@ -217,11 +217,9 @@ send_close (FilechooserPortalData *data) GError *error = NULL; message = g_dbus_message_new_method_call (PORTAL_BUS_NAME, - PORTAL_OBJECT_PATH, + data->portal_handle, PORTAL_REQUEST_INTERFACE, "Close"); - g_dbus_message_set_body (message, - g_variant_new ("(o)", data->portal_handle)); if (!g_dbus_connection_send_message (data->connection, message, From 68cf5f2cf31b5aff7dcfb0c161128b3ff006dcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 25 Nov 2023 03:49:58 +0100 Subject: [PATCH 2/2] [gtk4] gtkopenuriportal: Fix portal close signal. Same fix. The other instance of this pattern in gtkapplication-dbus.c does it right. --- gtk/gtkopenuriportal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtk/gtkopenuriportal.c b/gtk/gtkopenuriportal.c index 3d5bc76c33..1618ba3a87 100644 --- a/gtk/gtkopenuriportal.c +++ b/gtk/gtkopenuriportal.c @@ -237,10 +237,9 @@ send_close (OpenUriData *data) GError *error = NULL; message = g_dbus_message_new_method_call (PORTAL_BUS_NAME, - PORTAL_OBJECT_PATH, + data->handle, PORTAL_REQUEST_INTERFACE, "Close"); - g_dbus_message_set_body (message, g_variant_new ("(o)", data->handle)); if (!g_dbus_connection_send_message (data->connection, message,