summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-05-13 11:04:49 +0200
committerAlexander Larsson <alexl@redhat.com>2020-05-13 11:04:49 +0200
commita02c588b191bbaa944767e4751877275b8e4e0c3 (patch)
treeff4aaeba8c9bbf7c8f341b5780f2afd4dc6e77b0 /demos
parentfede7cd81c623a2a18e7a77fa0f21b23e10e00d6 (diff)
downloadgtk+-a02c588b191bbaa944767e4751877275b8e4e0c3.tar.gz
gtk-demo: InfoBar is not a GtkBox anymore
Use gtk_info_bar_add_child to add children
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/infobar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index 786babbec6..3d12b26141 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -71,7 +71,7 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
- gtk_box_append (GTK_BOX (bar), label);
+ gtk_info_bar_add_child (GTK_INFO_BAR (bar), label);
button = gtk_toggle_button_new_with_label ("Message");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@@ -83,7 +83,7 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
- gtk_box_append (GTK_BOX (bar), label);
+ gtk_info_bar_add_child (GTK_INFO_BAR (bar), label);
button = gtk_toggle_button_new_with_label ("Warning");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@@ -97,7 +97,7 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
- gtk_box_append (GTK_BOX (bar), label);
+ gtk_info_bar_add_child (GTK_INFO_BAR (bar), label);
gtk_info_bar_set_default_response (GTK_INFO_BAR (bar), GTK_RESPONSE_OK);
button = gtk_toggle_button_new_with_label ("Question");
@@ -110,7 +110,7 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
- gtk_box_append (GTK_BOX (bar), label);
+ gtk_info_bar_add_child (GTK_INFO_BAR (bar), label);
button = gtk_toggle_button_new_with_label ("Error");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@@ -123,7 +123,7 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
gtk_label_set_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
- gtk_box_append (GTK_BOX (bar), label);
+ gtk_info_bar_add_child (GTK_INFO_BAR (bar), label);
button = gtk_toggle_button_new_with_label ("Other");
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);