forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
8d771eb26c
commit
e92e4c5728
@ -483,6 +483,34 @@ connection_closed (GDBusConnection *connection,
|
|||||||
static void
|
static void
|
||||||
finish_registration (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,
|
gdk_content_register_serializer (G_TYPE_FILE,
|
||||||
"application/vnd.portal.files",
|
"application/vnd.portal.files",
|
||||||
portal_file_serializer,
|
portal_file_serializer,
|
||||||
|
Loading…
Reference in New Issue
Block a user