colorplane: Update to new GtkGestureSingle/GtkEventController defaults

GtkGestureSingle::button is set to 0, as multiple buttons are managed by
the same gesture. Also avoid some extra lines of code setting what nowadays
are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
This commit is contained in:
Carlos Garnacho 2014-08-11 21:45:51 +02:00
parent 9ad4f1e62c
commit 9e89640b0b

View File

@ -410,16 +410,13 @@ gtk_color_plane_init (GtkColorPlane *plane)
G_CALLBACK (plane_drag_gesture_update), plane);
g_signal_connect (plane->priv->drag_gesture, "drag-end",
G_CALLBACK (plane_drag_gesture_end), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->drag_gesture),
GTK_PHASE_BUBBLE);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->priv->drag_gesture),
FALSE);
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (plane->priv->drag_gesture), 0);
plane->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (plane));
g_signal_connect (plane->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture),
GTK_PHASE_BUBBLE);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->priv->drag_gesture),
TRUE);
}
static void