[gtk/wip/baedert/for-master] Remove gtk_info_bar_get_content_area() uses



commit 26444ebe06b6a23681e995169483a1d981ef8d9b
Author: Timm Bäder <mail baedert org>
Date:   Fri Feb 14 18:22:59 2020 +0100

    Remove gtk_info_bar_get_content_area() uses
    
    We can just add() to the info bar directly.

 demos/gtk-demo/infobar.c | 10 +++++-----
 docs/tools/widgets.c     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index e70e162334..94d984060e 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -70,7 +70,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_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
+      gtk_container_add (GTK_CONTAINER (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);
@@ -82,7 +82,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_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
+      gtk_container_add (GTK_CONTAINER (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);
@@ -96,7 +96,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_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
+      gtk_container_add (GTK_CONTAINER (bar), label);
       gtk_info_bar_set_default_response (GTK_INFO_BAR (bar), GTK_RESPONSE_OK);
 
       button = gtk_toggle_button_new_with_label ("Question");
@@ -109,7 +109,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_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
+      gtk_container_add (GTK_CONTAINER (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);
@@ -122,7 +122,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_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
+      gtk_container_add (GTK_CONTAINER (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);
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 3f8009fbbe..a00c239258 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -375,7 +375,7 @@ create_info_bar (void)
   widget = gtk_info_bar_new ();
   gtk_info_bar_set_show_close_button (GTK_INFO_BAR (widget), TRUE);
   gtk_info_bar_set_message_type (GTK_INFO_BAR (widget), GTK_MESSAGE_INFO);
-  gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (widget))),
+  gtk_container_add (GTK_CONTAINER (widget),
                      gtk_label_new ("Info Bar"));
 
   gtk_widget_set_halign (widget, GTK_ALIGN_FILL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]