[gtk+/gestures: 44/55] scrolledwindow: Update gesture API change.



commit 5624841677c91fb42fba3842b3c594a2e75bc192
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 24 14:45:55 2014 +0100

    scrolledwindow: Update gesture API change.

 gtk/gtkscrolledwindow.c |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index c77dce2..5b3e598 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1249,24 +1249,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);
     }


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