mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:10:04 +00:00
GtkStackSwitcher: Pick up the visible child from the stack
We forgot to synchronize the visible child when setting a stack on the switcher. Oops.
This commit is contained in:
parent
ba63f95a4a
commit
c53f4bb342
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user