summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-04-08 21:00:26 +0200
committerCarlos Garnacho <carlosg@gnome.org>2014-05-23 19:54:25 +0200
commit040c82f0e8c6e0ce92c885a4954cc99a22eaeef2 (patch)
treed1b5c511d46a29f1aeded0850d1dcd1bdef662d9 /gtk/gtkdnd.c
parent51b5fa3bf0d129d09b9236742e8f2cd5608f5abf (diff)
downloadgtk+-040c82f0e8c6e0ce92c885a4954cc99a22eaeef2.tar.gz
dnd: Update to gesture widget-level API changes
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index db211f9e89..a375e219f2 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);
}
}