entry: Update to new GtkGestureSingle/GtkEventController defaults

GtkGestureSingle::button is set to 0 on the drag/multipress gestures, as several
buttons are managed by these gestures. 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:51:50 +02:00
parent 8ca205af5d
commit 0c2da16c0e

View File

@ -2724,18 +2724,14 @@ gtk_entry_init (GtkEntry *entry)
G_CALLBACK (gtk_entry_drag_gesture_update), entry);
g_signal_connect (priv->drag_gesture, "drag-end",
G_CALLBACK (gtk_entry_drag_gesture_end), entry);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->drag_gesture), FALSE);
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->drag_gesture), 0);
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (priv->drag_gesture), TRUE);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->drag_gesture),
GTK_PHASE_BUBBLE);
priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (entry));
g_signal_connect (priv->multipress_gesture, "pressed",
G_CALLBACK (gtk_entry_multipress_gesture_pressed), entry);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->multipress_gesture), FALSE);
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->multipress_gesture), 0);
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (priv->multipress_gesture), TRUE);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->multipress_gesture),
GTK_PHASE_BUBBLE);
}
static void