textview: Set up controllers on the GTK_PHASE_TARGET propagation phase

This way events are managed by gestures in the event handlers themselves,
respecting the execution order already assumed by subclasses around.
This commit is contained in:
Carlos Garnacho 2014-05-10 20:59:55 +02:00
parent dd164502f7
commit 24f20864b4

View File

@ -1555,7 +1555,7 @@ gtk_text_view_init (GtkTextView *text_view)
priv->multipress_gesture = gtk_gesture_multi_press_new (widget);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->multipress_gesture),
FALSE);
gtk_gesture_attach (priv->multipress_gesture, GTK_PHASE_BUBBLE);
gtk_gesture_attach (priv->multipress_gesture, GTK_PHASE_TARGET);
g_signal_connect (priv->multipress_gesture, "pressed",
G_CALLBACK (gtk_text_view_multipress_gesture_pressed),
widget);
@ -1563,7 +1563,7 @@ gtk_text_view_init (GtkTextView *text_view)
priv->drag_gesture = gtk_gesture_drag_new (widget);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->drag_gesture),
FALSE);
gtk_gesture_attach (priv->drag_gesture, GTK_PHASE_BUBBLE);
gtk_gesture_attach (priv->drag_gesture, GTK_PHASE_TARGET);
g_signal_connect (priv->drag_gesture, "drag-update",
G_CALLBACK (gtk_text_view_drag_gesture_update),
widget);