[gtk/dnd-gestures-2: 136/150] gtk-demo: Use GDK content formats api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 136/150] gtk-demo: Use GDK content formats api
- Date: Tue, 7 Jan 2020 07:03:21 +0000 (UTC)
commit e6b81c268ca332d9ad6e131fc397d2cb2ed2454b
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 7 00:44:19 2020 -0500
gtk-demo: Use GDK content formats api
demos/gtk-demo/clipboard.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index 303ff313f6..578bc6d7bf 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -349,8 +349,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
/* accept drops on image */
- formats = gdk_content_formats_new (NULL, 0);
- formats = gtk_content_formats_add_image_targets (formats, FALSE);
+ formats = gdk_content_formats_new_for_gtype (GDK_TYPE_TEXTURE);
dest = gtk_drop_target_new (formats, GDK_ACTION_COPY);
gdk_content_formats_unref (formats);
g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
@@ -381,8 +380,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
/* accept drops on image */
- formats = gdk_content_formats_new (NULL, 0);
- formats = gtk_content_formats_add_image_targets (formats, FALSE);
+ formats = gdk_content_formats_new_for_gtype (GDK_TYPE_TEXTURE);
dest = gtk_drop_target_new (formats, GDK_ACTION_COPY);
gdk_content_formats_unref (formats);
g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]