[gtk+/gestures: 73/92] dnd: Update to gesture widget-level API changes



commit 34c5544a41383f01f3ed02bf9b7aa406448a9949
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Apr 8 21:00:26 2014 +0200

    dnd: Update to gesture widget-level API changes

 gtk/gtkdnd.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 9ef8bda..3723cc8 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -2789,7 +2789,9 @@ gtk_drag_source_set (GtkWidget            *widget,
       site->drag_gesture = gtk_gesture_drag_new (widget);
       gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (site->drag_gesture),
                                          FALSE);
-      gtk_widget_add_gesture (widget, site->drag_gesture, GTK_PHASE_NONE);
+      gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (site->drag_gesture),
+                                                  GTK_PHASE_NONE);
+      gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER (site->drag_gesture));
 
       g_signal_connect (widget, "button-press-event",
                        G_CALLBACK (gtk_drag_source_event_cb),
@@ -2832,7 +2834,8 @@ gtk_drag_source_unset (GtkWidget *widget)
       g_signal_handlers_disconnect_by_func (widget,
                                             gtk_drag_source_event_cb,
                                             site);
-      gtk_widget_remove_gesture (widget, site->drag_gesture);
+      gtk_widget_remove_controller (widget,
+                                    GTK_EVENT_CONTROLLER (site->drag_gesture));
       g_object_set_data (G_OBJECT (widget), I_("gtk-site-data"), NULL);
     }
 }


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