From 0c2da16c0e1ad32447e3c5fc872646f8d3e8dc39 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 11 Aug 2014 21:51:50 +0200 Subject: [PATCH] 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 --- gtk/gtkentry.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 5cdb3d9761..1e60849038 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -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