gtk-demo: Use GDK content formats api
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user