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
This commit is contained in:
Carlos Garnacho
2014-08-11 21:54:39 +02:00
parent 261bbd8d8e
commit b7412a1d9b

View File

@ -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",