[gtk/kill-containers: 3/55] Use gtk_expander_set_child throughout
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-containers: 3/55] Use gtk_expander_set_child throughout
- Date: Tue, 12 May 2020 02:39:58 +0000 (UTC)
commit 1afc7494436dd509a33e641508bc9639e0f7ca90
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 e8b499bf6e..84a1603b39 100644
--- a/tests/testflowbox.c
+++ b/tests/testflowbox.c
@@ -412,7 +412,7 @@ create_window (void)
expander = gtk_expander_new ("Flow Box controls");
gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE);
flowbox_cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
- 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");
@@ -570,7 +570,7 @@ create_window (void)
expander = gtk_expander_new ("Test item controls");
gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE);
items_cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
- 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 645d2045c6..429c0de770 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -2214,7 +2214,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 31674219e6..ffbd26bae5 100644
--- a/tests/testscrolledwindow.c
+++ b/tests/testscrolledwindow.c
@@ -120,7 +120,7 @@ scrollable_policy (void)
expander = gtk_expander_new ("Controls");
gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE);
cntl = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
- 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]