Commit 9e89640b authored by Carlos Garnacho's avatar Carlos Garnacho

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
parent 9ad4f1e6
...@@ -410,16 +410,13 @@ gtk_color_plane_init (GtkColorPlane *plane) ...@@ -410,16 +410,13 @@ gtk_color_plane_init (GtkColorPlane *plane)
G_CALLBACK (plane_drag_gesture_update), plane); G_CALLBACK (plane_drag_gesture_update), plane);
g_signal_connect (plane->priv->drag_gesture, "drag-end", g_signal_connect (plane->priv->drag_gesture, "drag-end",
G_CALLBACK (plane_drag_gesture_end), plane); G_CALLBACK (plane_drag_gesture_end), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->drag_gesture), gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (plane->priv->drag_gesture), 0);
GTK_PHASE_BUBBLE);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->priv->drag_gesture),
FALSE);
plane->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (plane)); plane->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (plane));
g_signal_connect (plane->priv->long_press_gesture, "pressed", g_signal_connect (plane->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), plane); G_CALLBACK (hold_action), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture), gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->priv->drag_gesture),
GTK_PHASE_BUBBLE); TRUE);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment