From: Matthias Clasen Date: Thu, 15 Sep 2022 18:55:55 +0000 (-0400) Subject: portal: Use the right mimetype for file transfers X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2~2^2~2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32f55a74b0ced2140a2158479a4dd719e1ab696e;p=gtk4.git portal: Use the right mimetype for file transfers The filetransfer protocol says to use application/vnd.portal.filetransfer, but I used application/vnd.portal.files when I implemented the protocol. Oops. This commit dds the correct mimetype, but we still support the old one to preserve interoperatibility with existing flatpaks using GTK 4.6. Fixes: #5182 --- diff --git a/gdk/filetransferportal.c b/gdk/filetransferportal.c index bf1e2e2be5..2904941e39 100644 --- a/gdk/filetransferportal.c +++ b/gdk/filetransferportal.c @@ -483,6 +483,34 @@ connection_closed (GDBusConnection *connection, static void finish_registration (void) { + gdk_content_register_serializer (G_TYPE_FILE, + "application/vnd.portal.filetransfer", + portal_file_serializer, + NULL, + NULL); + + gdk_content_register_serializer (GDK_TYPE_FILE_LIST, + "application/vnd.portal.filetransfer", + portal_file_serializer, + NULL, + NULL); + + gdk_content_register_deserializer ("application/vnd.portal.filetransfer", + GDK_TYPE_FILE_LIST, + portal_file_deserializer, + NULL, + NULL); + + gdk_content_register_deserializer ("application/vnd.portal.filetransfer", + G_TYPE_FILE, + portal_file_deserializer, + NULL, + NULL); + + /* FIXME: I missed up and used the wrong mime type here when + * I implemented my own protocol. Keep these around for a while + * so we can interoperate with existing flatpaks using GTK 4.6 + */ gdk_content_register_serializer (G_TYPE_FILE, "application/vnd.portal.files", portal_file_serializer,