[gtk/dnd-gestures-2: 119/175] testtoolbar: Use gtk_widget_add_controller for drag source



commit 43dae4d1eb6f38e544e9e390f674bd0f96410758
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 7 01:13:51 2020 -0500

    testtoolbar: Use gtk_widget_add_controller for drag source

 tests/testtoolbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index ffbcacb7a5..2a9ab3afb3 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -622,7 +622,7 @@ main (gint argc, gchar **argv)
   gtk_drag_source_set_content (source, content);
   gtk_drag_source_set_actions (source, GDK_ACTION_MOVE);
   g_object_unref (content);
-  gtk_drag_source_attach (source, button, GDK_BUTTON1_MASK);
+  gtk_widget_add_controller (button, GTK_EVENT_CONTROLLER (source));
   dest = gtk_drop_target_new (targets, GDK_ACTION_MOVE);
   g_signal_connect (dest, "drag_motion", G_CALLBACK (toolbar_drag_motion), toolbar);
   g_signal_connect (dest, "drag_leave", G_CALLBACK (toolbar_drag_leave), toolbar);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]