summaryrefslogtreecommitdiff
path: root/tests/testheaderbar.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-12-26 08:20:34 +0100
committerMatthias Clasen <mclasen@redhat.com>2019-01-23 19:30:46 -0500
commitbd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6 (patch)
tree6478bd038c42a535caacf65f948892a9d0dfe5e9 /tests/testheaderbar.c
parent09361e76659bd1951a222cd64537abacc6a6f44a (diff)
downloadgtk+-bd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6.tar.gz
Stop using gtk_box_pack_end
It might soon go away!
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 ();