[gnome-remote-desktop] clipboard-vnc: Also advertise the text/plain; charset=utf-8 mime-type
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] clipboard-vnc: Also advertise the text/plain; charset=utf-8 mime-type
- Date: Thu, 11 Mar 2021 08:22:01 +0000 (UTC)
commit 1c3ee0e8e5f89557dc62f5d5a15af1c833aca484
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Wed Mar 10 10:17:33 2021 +0100
clipboard-vnc: Also advertise the text/plain;charset=utf-8 mime-type
When copying text on the remote desktop client side, then
gnome-remote-desktop converts that text into a UTF-8 string and
advertises it with the mime-type UTF8_STRING.
GTK4 apps, however, ignore that mime-type and instead prefer the mime-
type text/plain;charset=utf-8.
So, advertise the UTF-8 string with the mime-type
text/plain;charset=utf-8 too, to be able to paste text into GTK4
applications on the server side too.
src/grd-clipboard-vnc.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/grd-clipboard-vnc.c b/src/grd-clipboard-vnc.c
index b8454fa..9e1ce04 100644
--- a/src/grd-clipboard-vnc.c
+++ b/src/grd-clipboard-vnc.c
@@ -150,6 +150,10 @@ grd_clipboard_vnc_set_clipboard_text (GrdClipboardVnc *clipboard_vnc,
return;
}
+ mime_type_table = g_malloc0 (sizeof (GrdMimeTypeTable));
+ mime_type_table->mime_type = GRD_MIME_TYPE_TEXT_PLAIN_UTF8;
+ mime_type_tables = g_list_append (mime_type_tables, mime_type_table);
+
mime_type_table = g_malloc0 (sizeof (GrdMimeTypeTable));
mime_type_table->mime_type = GRD_MIME_TYPE_TEXT_UTF8_STRING;
mime_type_tables = g_list_append (mime_type_tables, mime_type_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]