From cece9cac07a34673156f9406b13929b13e96abe1 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 24 Mar 2014 14:45:55 +0100 Subject: [PATCH] scrolledwindow: Update gesture API change. --- gtk/gtkscrolledwindow.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index d0d3a49634..d4679b29c0 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -1247,24 +1247,21 @@ gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window, if (priv->kinetic_scrolling) { - gtk_widget_add_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->drag_gesture), - GTK_PHASE_CAPTURE); - gtk_widget_add_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->swipe_gesture), - GTK_PHASE_CAPTURE); - gtk_widget_add_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->long_press_gesture), - GTK_PHASE_CAPTURE); + gtk_widget_add_gesture (GTK_WIDGET (scrolled_window), + priv->drag_gesture, GTK_PHASE_CAPTURE); + gtk_widget_add_gesture (GTK_WIDGET (scrolled_window), + priv->swipe_gesture, GTK_PHASE_CAPTURE); + gtk_widget_add_gesture (GTK_WIDGET (scrolled_window), + priv->long_press_gesture, GTK_PHASE_CAPTURE); } else { - gtk_widget_remove_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->drag_gesture)); - gtk_widget_remove_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->swipe_gesture)); - gtk_widget_remove_controller (GTK_WIDGET (scrolled_window), - GTK_EVENT_CONTROLLER (priv->long_press_gesture)); + gtk_widget_remove_gesture (GTK_WIDGET (scrolled_window), + priv->drag_gesture); + gtk_widget_remove_gesture (GTK_WIDGET (scrolled_window), + priv->swipe_gesture); + gtk_widget_remove_gesture (GTK_WIDGET (scrolled_window), + priv->long_press_gesture); gtk_scrolled_window_cancel_deceleration (scrolled_window); }