headerbar: Finish widget setup before showing it.

This commit is contained in:
Benjamin Otte 2015-07-15 01:51:01 +02:00
parent 792076e09b
commit a039fd1699

View File

@ -458,9 +458,6 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
continue;
}
gtk_widget_show (box);
gtk_widget_set_parent (box, GTK_WIDGET (bar));
gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0);
if (i == 1)
gtk_box_reorder_child (GTK_BOX (box), separator, 0);
@ -471,6 +468,9 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
else
gtk_style_context_add_class (gtk_widget_get_style_context (box), GTK_STYLE_CLASS_RIGHT);
gtk_widget_show (box);
gtk_widget_set_parent (box, GTK_WIDGET (bar));
if (i == 0)
priv->titlebar_start_box = box;
else