[gtk/dnd-gestures-2: 108/150] linkbutton: Use gtk_widget_add_controller for drag source



commit fe7d4eec83d1f309e3961bf807853c82154c199a
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 7 01:08:11 2020 -0500

    linkbutton: Use gtk_widget_add_controller for drag source

 gtk/gtklinkbutton.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 5c113516c6..2621591a5e 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -337,7 +337,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
   GTK_LINK_CONTENT (content)->link = link_button;
   gtk_drag_source_set_content (source, content);
   g_object_unref (content);
-  gtk_drag_source_attach (source, GTK_WIDGET (link_button), GDK_BUTTON1_MASK);
+  gtk_widget_add_controller (GTK_WIDGET (link_button), GTK_EVENT_CONTROLLER (source));
 
   gesture = gtk_gesture_click_new ();
   gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), FALSE);


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