[gtk/dnd-gestures-2: 194/242] iconbrowser: Use gtk_widget_add_controller for drag source



commit 8ed5bdbec8e774cdf5ed89413b73e8f7e8ed2b19
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 7 01:07:02 2020 -0500

    iconbrowser: Use gtk_widget_add_controller for drag source

 demos/icon-browser/iconbrowserwin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 84ccb27259..f4c3f71d3a 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -428,7 +428,7 @@ setup_image_dnd (GtkWidget *image)
   gtk_drag_source_set_content (source, content);
   g_object_unref (content);
   g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), image);
-  gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK);
+  gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
 }
 
 static void
@@ -443,7 +443,7 @@ setup_scalable_image_dnd (GtkWidget *image)
   g_object_unref (content);
 
   g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), image);
-  gtk_drag_source_attach (source, image, GDK_BUTTON1_MASK);
+  gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
 }
 
 static void


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