[gtk/dnd-gestures-2: 201/242] testdnd2: Use gtk_widget_add_controller for drag source
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 201/242] testdnd2: Use gtk_widget_add_controller for drag source
- Date: Tue, 7 Jan 2020 20:00:17 +0000 (UTC)
commit a2f62f7c21ee00eda1c8514768ebf2de82f2968c
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 7 01:13:11 2020 -0500
testdnd2: Use gtk_widget_add_controller for drag source
tests/testdnd2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/testdnd2.c b/tests/testdnd2.c
index 693da26ee2..a9e4b8629a 100644
--- a/tests/testdnd2.c
+++ b/tests/testdnd2.c
@@ -307,7 +307,7 @@ make_image (const gchar *icon_name, int hotspot)
g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), NULL);
g_signal_connect (source, "drag-end", G_CALLBACK (drag_end), NULL);
g_signal_connect (source, "drag-failed", G_CALLBACK (drag_failed), NULL);
- gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK);
+ gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
dest = gtk_drop_target_new (formats, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_ASK);
g_signal_connect (dest, "drag-drop", G_CALLBACK (image_drag_drop), image);
@@ -347,7 +347,7 @@ make_spinner (void)
source = gtk_drag_source_new ();
gtk_drag_source_set_content (source, content);
g_signal_connect (source, "drag-begin", G_CALLBACK (spinner_drag_begin), spinner);
- gtk_drag_source_attach (source, spinner, GDK_BUTTON1_MASK);
+ gtk_widget_add_controller (spinner, GTK_EVENT_CONTROLLER (source));
g_object_unref (content);
g_value_unset (&value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]