[gtk+] label: Update to new GtkGestureSingle/GtkEventController defaults
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] label: Update to new GtkGestureSingle/GtkEventController defaults
- Date: Fri, 15 Aug 2014 11:56:01 +0000 (UTC)
commit 261bbd8d8eedafd3b4d807d76eda09812bc33b80
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 11 21:52:59 2014 +0200
label: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0 on the multipress gesture, as several
buttons are managed by that gesture. Also avoid some extra lines of code
setting what nowadays are default values.
https://bugzilla.gnome.org/show_bug.cgi?id=734285
gtk/gtklabel.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 189a1ae..906d56e 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1284,21 +1284,15 @@ gtk_label_init (GtkLabel *label)
G_CALLBACK (gtk_label_drag_gesture_begin), label);
g_signal_connect (priv->drag_gesture, "drag-update",
G_CALLBACK (gtk_label_drag_gesture_update), label);
- gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->drag_gesture), FALSE);
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (priv->drag_gesture), TRUE);
- gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->drag_gesture), GDK_BUTTON_PRIMARY);
- 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 (label));
g_signal_connect (priv->multipress_gesture, "pressed",
G_CALLBACK (gtk_label_multipress_gesture_pressed), label);
g_signal_connect (priv->multipress_gesture, "released",
G_CALLBACK (gtk_label_multipress_gesture_released), label);
- 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]