Commit 1670ba1d authored by Matthias Clasen's avatar Matthias Clasen

GtkBox: Ensure we only allow one center child

Glade was happily adding multiple center widgets. Oops.
parent adfb60df
......@@ -2619,10 +2619,14 @@ gtk_box_set_center_widget (GtkBox *box,
g_return_if_fail (GTK_IS_BOX (box));
if (priv->center)
{
gtk_box_remove (GTK_CONTAINER (box), priv->center->widget);
priv->center = NULL;
}
if (widget)
priv->center = gtk_box_pack (box, widget, FALSE, TRUE, 0, GTK_PACK_START);
else if (priv->center)
gtk_box_remove (GTK_CONTAINER (box), priv->center->widget);
}
/**
......
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