Commit c53f4bb3 authored by Matthias Clasen's avatar Matthias Clasen

GtkStackSwitcher: Pick up the visible child from the stack

We forgot to synchronize the visible child when setting a
stack on the switcher. Oops.
parent ba63f95a
......@@ -292,9 +292,17 @@ static void
populate_switcher (GtkStackSwitcher *self)
{
GtkStackSwitcherPrivate *priv;
GtkWidget *widget, *button;
priv = gtk_stack_switcher_get_instance_private (self);
gtk_container_foreach (GTK_CONTAINER (priv->stack), (GtkCallback)add_child, self);
widget = gtk_stack_get_visible_child (priv->stack);
if (widget)
{
button = g_hash_table_lookup (priv->buttons, widget);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
}
}
static void
......
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