[gtk/kill-containers: 28/76] Use gtk_expander_set_child throughout
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-containers: 28/76] Use gtk_expander_set_child throughout
- Date: Sat, 9 May 2020 04:41:47 +0000 (UTC)
commit 0ab16440483af2cc58e5e714f76b2890008fac17
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 7 00:05:51 2020 -0400
Use gtk_expander_set_child throughout
Replace all uses of gtk_container_add on expanders
with gtk_expander_set_child.
tests/testexpander.c | 2 +-
tests/testflowbox.c | 4 ++--
tests/testgtk.c | 2 +-
tests/testscrolledwindow.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/testexpander.c b/tests/testexpander.c
index a56cddd10d..e9d6e7b745 100644
--- a/tests/testexpander.c
+++ b/tests/testexpander.c
@@ -69,7 +69,7 @@ main (int argc, char *argv[])
"innuendo, just to make you scroll down or "
"resize the window. Do it already !", -1);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), tv);
- gtk_container_add (GTK_CONTAINER (expander), sw);
+ gtk_expander_set_child (GTK_EXPANDER (expander), sw);
gtk_widget_set_hexpand (expander, TRUE);
gtk_widget_set_vexpand (expander, TRUE);
gtk_container_add (GTK_CONTAINER (area), expander);
diff --git a/tests/testflowbox.c b/tests/testflowbox.c
index f44cbed2d9..0b5386a214 100644
--- a/tests/testflowbox.c
+++ b/tests/testflowbox.c
@@ -423,7 +423,7 @@ create_window (void)
flowbox_cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_show (flowbox_cntl);
gtk_widget_show (expander);
- gtk_container_add (GTK_CONTAINER (expander), flowbox_cntl);
+ gtk_expander_set_child (GTK_EXPANDER (expander), flowbox_cntl);
gtk_container_add (GTK_CONTAINER (vbox), expander);
widget = gtk_check_button_new_with_label ("Homogeneous");
@@ -597,7 +597,7 @@ create_window (void)
items_cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_show (items_cntl);
gtk_widget_show (expander);
- gtk_container_add (GTK_CONTAINER (expander), items_cntl);
+ gtk_expander_set_child (GTK_EXPANDER (expander), items_cntl);
gtk_container_add (GTK_CONTAINER (vbox), expander);
/* Add Items control */
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 8f0cfe22ec..d1f43498aa 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -2234,7 +2234,7 @@ create_expander (GtkWidget *widget)
hidden = gtk_label_new ("Revealed!");
- gtk_container_add (GTK_CONTAINER (expander), hidden);
+ gtk_expander_set_child (GTK_EXPANDER (expander), hidden);
}
if (!gtk_widget_get_visible (window))
diff --git a/tests/testscrolledwindow.c b/tests/testscrolledwindow.c
index 6ea0fa354e..36aa92c5e9 100644
--- a/tests/testscrolledwindow.c
+++ b/tests/testscrolledwindow.c
@@ -127,7 +127,7 @@ scrollable_policy (void)
cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_show (cntl);
gtk_widget_show (expander);
- gtk_container_add (GTK_CONTAINER (expander), cntl);
+ gtk_expander_set_child (GTK_EXPANDER (expander), cntl);
gtk_container_add (GTK_CONTAINER (vbox), expander);
/* Add Horizontal policy control here */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]