ui/gtk-clipboard: use existing macros

Hardcoding strings is error prone, use dedicated macros instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-4-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-08-05 17:57:00 +04:00
parent e7c55746f1
commit c311e8d7ff

View File

@ -177,11 +177,11 @@ void gd_clipboard_init(GtkDisplayState *gd)
qemu_clipboard_peer_register(&gd->cbpeer); qemu_clipboard_peer_register(&gd->cbpeer);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD] = gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD] =
gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE)); gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_PRIMARY] = gd->gtkcb[QEMU_CLIPBOARD_SELECTION_PRIMARY] =
gtk_clipboard_get(gdk_atom_intern("PRIMARY", FALSE)); gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gd->gtkcb[QEMU_CLIPBOARD_SELECTION_SECONDARY] = gd->gtkcb[QEMU_CLIPBOARD_SELECTION_SECONDARY] =
gtk_clipboard_get(gdk_atom_intern("SECONDARY", FALSE)); gtk_clipboard_get(GDK_SELECTION_SECONDARY);
g_signal_connect(gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD], g_signal_connect(gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD],
"owner-change", G_CALLBACK(gd_owner_change), gd); "owner-change", G_CALLBACK(gd_owner_change), gd);