[gtk+] spinbutton: Make the swipe gesture only work on touch devices



commit b7412a1d9b6956edfdc976b63e1126ff58a5cef2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 11 21:54:39 2014 +0200

    spinbutton: Make the swipe gesture only work on touch devices
    
    This code was relying on the previous GtkGestureSingle::touch-only default
    value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734285

 gtk/gtkspinbutton.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index ddd4540..770f242 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -724,6 +724,7 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
   gtk_widget_add_events (GTK_WIDGET (spin_button), GDK_SCROLL_MASK);
 
   priv->swipe_gesture = gtk_gesture_swipe_new (GTK_WIDGET (spin_button));
+  gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->swipe_gesture), TRUE);
   gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->swipe_gesture),
                                               GTK_PHASE_CAPTURE);
   g_signal_connect (priv->swipe_gesture, "begin",


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