diff options
author | Timm Bäder <mail@baedert.org> | 2018-12-26 08:20:34 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-01-23 19:30:46 -0500 |
commit | bd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6 (patch) | |
tree | 6478bd038c42a535caacf65f948892a9d0dfe5e9 /tests/testboxcss.c | |
parent | 09361e76659bd1951a222cd64537abacc6a6f44a (diff) | |
download | gtk+-bd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6.tar.gz |
Stop using gtk_box_pack_end
It might soon go away!
Diffstat (limited to 'tests/testboxcss.c')
-rw-r--r-- | tests/testboxcss.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/testboxcss.c b/tests/testboxcss.c index fea3bbb903..e36db2ef58 100644 --- a/tests/testboxcss.c +++ b/tests/testboxcss.c @@ -169,10 +169,10 @@ main (gint argc, gchar **argv) toolbar = gtk_toolbar_new (); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_TEXT); - gtk_box_pack_start (GTK_BOX (main_box), toolbar); + gtk_container_add (GTK_CONTAINER (main_box), toolbar); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start (GTK_BOX (main_box), box); + gtk_container_add (GTK_CONTAINER (main_box), box); container = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (container), 200); @@ -194,28 +194,30 @@ main (gint argc, gchar **argv) gtk_text_view_get_buffer (GTK_TEXT_VIEW (child))); container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start (GTK_BOX (main_box), container); + gtk_container_add (GTK_CONTAINER (main_box), container); child = gtk_switch_new (); gtk_switch_set_active (GTK_SWITCH (child), gtk_widget_get_default_direction () == GTK_TEXT_DIR_LTR); g_signal_connect (child, "notify::active", G_CALLBACK (set_orientation), NULL); - gtk_box_pack_start (GTK_BOX (container), child); + gtk_container_add (GTK_CONTAINER (container), child); child = gtk_label_new ("left-to-right"); - gtk_box_pack_start (GTK_BOX (container), child); - child = gtk_button_new_with_label ("Add button"); - g_signal_connect_swapped (child, - "clicked", - G_CALLBACK (add_button), - box); - gtk_box_pack_end (GTK_BOX (container), child); + gtk_widget_set_hexpand (child, TRUE); + gtk_widget_set_halign (child, GTK_ALIGN_START); + gtk_container_add (GTK_CONTAINER (container), child); child = gtk_button_new_with_label ("Add toolbutton"); g_signal_connect_swapped (child, "clicked", G_CALLBACK (add_toolbutton), toolbar); - gtk_box_pack_end (GTK_BOX (container), child); + gtk_container_add (GTK_CONTAINER (container), child); + child = gtk_button_new_with_label ("Add button"); + g_signal_connect_swapped (child, + "clicked", + G_CALLBACK (add_button), + box); + gtk_container_add (GTK_CONTAINER (container), child); add_toolbutton (GTK_TOOLBAR (toolbar)); add_toolbutton (GTK_TOOLBAR (toolbar)); |