summaryrefslogtreecommitdiff
path: root/tests/testheaderbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testheaderbar.c')
-rw-r--r--tests/testheaderbar.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c
index 3a8121d251..51f5a97a13 100644
--- a/tests/testheaderbar.c
+++ b/tests/testheaderbar.c
@@ -85,11 +85,11 @@ change_header (GtkButton *button, gpointer data)
gtk_style_context_add_class (gtk_widget_get_style_context (header), "header-bar");
g_object_set (header, "margin", 10, NULL);
label = gtk_label_new ("Label");
- gtk_box_pack_start (GTK_BOX (header), label);
+ gtk_container_add (GTK_CONTAINER (header), label);
widget = gtk_level_bar_new ();
gtk_level_bar_set_value (GTK_LEVEL_BAR (widget), 0.4);
gtk_widget_set_hexpand (widget, TRUE);
- gtk_box_pack_start (GTK_BOX (header), widget);
+ gtk_container_add (GTK_CONTAINER (header), widget);
}
else
{
@@ -142,6 +142,12 @@ main (int argc, char *argv[])
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), box);
+
+ content = gtk_image_new_from_icon_name ("start-here-symbolic");
+ gtk_image_set_pixel_size (GTK_IMAGE (content), 512);
+
+ gtk_container_add (GTK_CONTAINER (box), content);
+
footer = gtk_action_bar_new ();
gtk_action_bar_set_center_widget (GTK_ACTION_BAR (footer), gtk_check_button_new_with_label ("Middle"));
button = gtk_toggle_button_new_with_label ("Custom");
@@ -153,13 +159,7 @@ main (int argc, char *argv[])
button = gtk_button_new_with_label ("Fullscreen");
gtk_action_bar_pack_end (GTK_ACTION_BAR (footer), button);
g_signal_connect (button, "clicked", G_CALLBACK (toggle_fullscreen), window);
- gtk_box_pack_end (GTK_BOX (box), footer);
-
- content = gtk_image_new_from_icon_name ("start-here-symbolic");
- gtk_image_set_pixel_size (GTK_IMAGE (content), 512);
-
- gtk_box_pack_start (GTK_BOX (box), content);
-
+ gtk_container_add (GTK_CONTAINER (box), footer);
gtk_widget_show (window);
gtk_main ();