summaryrefslogtreecommitdiff
path: root/tests/testtooltips.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/testtooltips.c
parent09361e76659bd1951a222cd64537abacc6a6f44a (diff)
downloadgtk+-bd71e744d2e5dbd853f0c719dd3ebe6abb2f72b6.tar.gz
Stop using gtk_box_pack_end
It might soon go away!
Diffstat (limited to 'tests/testtooltips.c')
-rw-r--r--tests/testtooltips.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/testtooltips.c b/tests/testtooltips.c
index f464a3142b..04eda125e1 100644
--- a/tests/testtooltips.c
+++ b/tests/testtooltips.c
@@ -313,7 +313,7 @@ main (int argc, char *argv[])
/* A check button using the tooltip-markup property */
button = gtk_check_button_new_with_label ("This one uses the tooltip-markup property");
gtk_widget_set_tooltip_text (button, "Hello, I am a static tooltip.");
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
text = gtk_widget_get_tooltip_text (button);
markup = gtk_widget_get_tooltip_markup (button);
@@ -326,13 +326,13 @@ main (int argc, char *argv[])
g_object_set (button, "has-tooltip", TRUE, NULL);
g_signal_connect (button, "query-tooltip",
G_CALLBACK (query_tooltip_cb), NULL);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
/* A label */
button = gtk_label_new ("I am just a label");
gtk_label_set_selectable (GTK_LABEL (button), FALSE);
gtk_widget_set_tooltip_text (button, "Label & and tooltip");
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
text = gtk_widget_get_tooltip_text (button);
markup = gtk_widget_get_tooltip_markup (button);
@@ -344,7 +344,7 @@ main (int argc, char *argv[])
button = gtk_label_new ("I am a selectable label");
gtk_label_set_selectable (GTK_LABEL (button), TRUE);
gtk_widget_set_tooltip_markup (button, "<b>Another</b> Label tooltip");
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
text = gtk_widget_get_tooltip_text (button);
markup = gtk_widget_get_tooltip_markup (button);
@@ -354,7 +354,7 @@ main (int argc, char *argv[])
/* Another one, with a custom tooltip window */
button = gtk_check_button_new_with_label ("This one has a custom tooltip window!");
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
tooltip_window = gtk_window_new (GTK_WINDOW_POPUP);
tooltip_button = gtk_label_new ("blaat!");
@@ -375,7 +375,7 @@ main (int argc, char *argv[])
button = gtk_button_new_with_label ("This one is insensitive");
gtk_widget_set_sensitive (button, FALSE);
g_object_set (button, "tooltip-text", "Insensitive!", NULL);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
/* Testcases from Kris without a tree view don't exist. */
tree_view = gtk_tree_view_new_with_model (create_model ());
@@ -398,7 +398,7 @@ main (int argc, char *argv[])
gtk_tree_view_column_set_clickable (column, TRUE);
g_object_set (gtk_tree_view_column_get_button (column), "tooltip-text", "Header", NULL);
- gtk_box_pack_start (GTK_BOX (box), tree_view);
+ gtk_container_add (GTK_CONTAINER (box), tree_view);
/* And a text view for Matthias */
buffer = gtk_text_buffer_new (NULL);
@@ -422,7 +422,7 @@ main (int argc, char *argv[])
g_signal_connect (text_view, "query-tooltip",
G_CALLBACK (query_tooltip_text_view_cb), tag);
- gtk_box_pack_start (GTK_BOX (box), text_view);
+ gtk_container_add (GTK_CONTAINER (box), text_view);
/* Drawing area */
drawing_area = gtk_drawing_area_new ();
@@ -433,7 +433,7 @@ main (int argc, char *argv[])
g_object_set (drawing_area, "has-tooltip", TRUE, NULL);
g_signal_connect (drawing_area, "query-tooltip",
G_CALLBACK (query_tooltip_drawing_area_cb), NULL);
- gtk_box_pack_start (GTK_BOX (box), drawing_area);
+ gtk_container_add (GTK_CONTAINER (box), drawing_area);
button = gtk_label_new ("Custom tooltip I");
label = gtk_label_new ("See, custom");
@@ -441,13 +441,13 @@ main (int argc, char *argv[])
g_object_set (button, "has-tooltip", TRUE, NULL);
g_signal_connect (button, "query-tooltip",
G_CALLBACK (query_tooltip_label_cb), label);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
button = gtk_label_new ("Custom tooltip II");
label = gtk_label_new ("See, custom, too");
g_object_ref_sink (label);
g_object_set (button, "has-tooltip", TRUE, NULL);
- gtk_box_pack_start (GTK_BOX (box), button);
+ gtk_container_add (GTK_CONTAINER (box), button);
g_signal_connect (button, "query-tooltip",
G_CALLBACK (query_tooltip_label_cb), label);