summaryrefslogtreecommitdiff
path: root/tests/testcombo.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-09 08:26:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-11 22:38:21 -0400
commit2a24b8c6534b58051135570399cba8a6b04d34ea (patch)
treec3b4690ed396ab2b2ca162641bd2008d0bd7630e /tests/testcombo.c
parent665edcba53bf2f2e854a95cdcc52a72c16a1a427 (diff)
downloadgtk+-2a24b8c6534b58051135570399cba8a6b04d34ea.tar.gz
Replace most remaining uses of container api
These are all on GtkBox or enumerating children.
Diffstat (limited to 'tests/testcombo.c')
-rw-r--r--tests/testcombo.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/testcombo.c b/tests/testcombo.c
index 2ae3ceb6e0..fc1a53bedc 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -958,7 +958,7 @@ main (int argc, char **argv)
/* GtkCellView */
tmp = gtk_frame_new ("GtkCellView");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -975,11 +975,11 @@ main (int argc, char **argv)
renderer,
TRUE);
g_object_set (renderer, "text", "la la la", NULL);
- gtk_container_add (GTK_CONTAINER (boom), cellview);
+ gtk_box_append (GTK_BOX (boom), cellview);
/* GtkComboBox list */
tmp = gtk_frame_new ("GtkComboBox (list)");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -987,7 +987,7 @@ main (int argc, char **argv)
model = create_list_blaat ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -1019,7 +1019,7 @@ main (int argc, char **argv)
/* GtkComboBox dynamic list */
tmp = gtk_frame_new ("GtkComboBox (dynamic list)");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1030,7 +1030,7 @@ main (int argc, char **argv)
G_CALLBACK (populate_list_blaat), combobox);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -1062,7 +1062,7 @@ main (int argc, char **argv)
/* GtkComboBox custom entry */
tmp = gtk_frame_new ("GtkComboBox (custom)");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1070,7 +1070,7 @@ main (int argc, char **argv)
model = create_list_blaat ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -1116,7 +1116,7 @@ main (int argc, char **argv)
/* GtkComboBox tree */
tmp = gtk_frame_new ("GtkComboBox (tree)");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1124,7 +1124,7 @@ main (int argc, char **argv)
model = create_tree_blaat ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -1159,7 +1159,7 @@ main (int argc, char **argv)
/* GtkComboBox (grid mode) */
tmp = gtk_frame_new ("GtkComboBox (grid mode)");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1167,19 +1167,19 @@ main (int argc, char **argv)
/* GtkComboBoxEntry */
tmp = gtk_frame_new ("GtkComboBox with entry");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
comboboxtext = gtk_combo_box_text_new_with_entry ();
setup_combo_entry (GTK_COMBO_BOX_TEXT (comboboxtext));
- gtk_container_add (GTK_CONTAINER (boom), comboboxtext);
+ gtk_box_append (GTK_BOX (boom), comboboxtext);
/* Phylogenetic tree */
tmp = gtk_frame_new ("What are you ?");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1187,7 +1187,7 @@ main (int argc, char **argv)
model = create_phylogenetic_tree ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -1201,7 +1201,7 @@ main (int argc, char **argv)
/* Capitals */
tmp = gtk_frame_new ("Where are you ?");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1209,7 +1209,7 @@ main (int argc, char **argv)
model = create_capital_tree ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
renderer,
@@ -1232,7 +1232,7 @@ main (int argc, char **argv)
/* Aligned Food */
tmp = gtk_frame_new ("Hungry ?");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1240,7 +1240,7 @@ main (int argc, char **argv)
model = create_food_list ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (combobox));
@@ -1266,7 +1266,7 @@ main (int argc, char **argv)
/* Ellipsizing growing combos */
tmp = gtk_frame_new ("Unconstrained Menu");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
boom = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_frame_set_child (GTK_FRAME (tmp), boom);
@@ -1274,7 +1274,7 @@ main (int argc, char **argv)
model = create_list_long ();
combobox = gtk_combo_box_new_with_model (model);
g_object_unref (model);
- gtk_container_add (GTK_CONTAINER (boom), combobox);
+ gtk_box_append (GTK_BOX (boom), combobox);
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
@@ -1285,7 +1285,7 @@ main (int argc, char **argv)
gtk_combo_box_set_popup_fixed_width (GTK_COMBO_BOX (combobox), FALSE);
tmp = gtk_frame_new ("Looong");
- gtk_container_add (GTK_CONTAINER (mainbox), tmp);
+ gtk_box_append (GTK_BOX (mainbox), tmp);
combobox = gtk_combo_box_text_new ();
for (i = 0; i < 200; i++)
{