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



commit d6e7ed06558f2e652ab0412cf1bcaba35aa4cc7d
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 db211f9..a375e21 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -2801,7 +2801,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),
@@ -2844,7 +2846,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]