Commit 907e9f19 authored by Carlos Garnacho's avatar Carlos Garnacho

gtk: Update GtkGesture users to the GtkPropagationPhase semantics change

Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
parent 505efbb3
......@@ -653,7 +653,7 @@ gtk_button_init (GtkButton *button)
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->gesture), GDK_BUTTON_PRIMARY);
g_signal_connect (priv->gesture, "pressed", G_CALLBACK (multipress_pressed_cb), button);
g_signal_connect (priv->gesture, "released", G_CALLBACK (multipress_released_cb), button);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->gesture), GTK_PHASE_TARGET);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->gesture), GTK_PHASE_BUBBLE);
}
static void
......
......@@ -410,7 +410,7 @@ gtk_color_plane_init (GtkColorPlane *plane)
g_signal_connect (plane->priv->drag_gesture, "drag-end",
G_CALLBACK (plane_drag_gesture_end), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->drag_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->priv->drag_gesture),
FALSE);
......@@ -418,7 +418,7 @@ gtk_color_plane_init (GtkColorPlane *plane)
g_signal_connect (plane->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), plane);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
}
static void
......
......@@ -259,7 +259,7 @@ gtk_color_scale_init (GtkColorScale *scale)
g_signal_connect (scale->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), scale);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (scale->priv->long_press_gesture),
GTK_PHASE_BUBBLE);
GTK_PHASE_TARGET);
}
static void
......
......@@ -91,14 +91,14 @@ gtk_color_swatch_init (GtkColorSwatch *swatch)
g_signal_connect (swatch->priv->long_press_gesture, "pressed",
G_CALLBACK (hold_action), swatch);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (swatch->priv->long_press_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
swatch->priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (swatch));
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (swatch->priv->multipress_gesture), FALSE);
g_signal_connect (swatch->priv->multipress_gesture, "pressed",
G_CALLBACK (tap_action), swatch);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (swatch->priv->multipress_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
}
#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11)
......
......@@ -2702,7 +2702,7 @@ gtk_entry_init (GtkEntry *entry)
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_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->drag_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (entry));
g_signal_connect (priv->multipress_gesture, "pressed",
......@@ -2710,7 +2710,7 @@ gtk_entry_init (GtkEntry *entry)
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->multipress_gesture), FALSE);
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_TARGET);
GTK_PHASE_BUBBLE);
}
static void
......
......@@ -928,7 +928,7 @@ gtk_switch_init (GtkSwitch *self)
g_signal_connect (gesture, "released",
G_CALLBACK (gtk_switch_multipress_gesture_released), self);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
self->priv->multipress_gesture = gesture;
gesture = gtk_gesture_pan_new (GTK_WIDGET (self),
......@@ -940,7 +940,7 @@ gtk_switch_init (GtkSwitch *self)
g_signal_connect (gesture, "drag-end",
G_CALLBACK (gtk_switch_pan_gesture_drag_end), self);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
self->priv->pan_gesture = gesture;
}
......
......@@ -1556,7 +1556,7 @@ gtk_text_view_init (GtkTextView *text_view)
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->multipress_gesture),
FALSE);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->multipress_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
g_signal_connect (priv->multipress_gesture, "pressed",
G_CALLBACK (gtk_text_view_multipress_gesture_pressed),
widget);
......@@ -1565,7 +1565,7 @@ gtk_text_view_init (GtkTextView *text_view)
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->drag_gesture),
FALSE);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->drag_gesture),
GTK_PHASE_TARGET);
GTK_PHASE_BUBBLE);
g_signal_connect (priv->drag_gesture, "drag-update",
G_CALLBACK (gtk_text_view_drag_gesture_update),
widget);
......
......@@ -1842,7 +1842,7 @@ gtk_tree_view_init (GtkTreeView *tree_view)
g_signal_connect (tree_view->priv->multipress_gesture, "pressed",
G_CALLBACK (_tree_view_multipress_pressed), tree_view);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (tree_view->priv->multipress_gesture),
GTK_PHASE_BUBBLE);
GTK_PHASE_TARGET);
}
......
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