summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-01 13:41:22 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-04 17:01:18 -0400
commit1706b808156431dce49f49ff846f46937c85e8f7 (patch)
tree249e664fca0e93b8c24f49b1c12e31f000174066 /gtk/gtktreeviewcolumn.c
parent7f975472a7d9de73a664170f051d1e7f60690bd8 (diff)
downloadgtk+-1706b808156431dce49f49ff846f46937c85e8f7.tar.gz
Use gtk_frame_set_child throughout
Replace all uses of gtk_container_add for frames with gtk_frame_set_child.
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r--gtk/gtktreeviewcolumn.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 75dface61c..a9dc35e2bd 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -25,6 +25,7 @@
#include "gtkcellareacontext.h"
#include "gtkcelllayout.h"
#include "gtkdragsource.h"
+#include "gtkframe.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtklabel.h"
@@ -925,22 +926,16 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
if (priv->child)
{
if (current_child != priv->child)
- {
- gtk_container_remove (GTK_CONTAINER (frame),
- current_child);
- gtk_container_add (GTK_CONTAINER (frame),
- priv->child);
- }
+ gtk_frame_set_child (GTK_FRAME (frame), priv->child);
}
- else
+ else
{
if (current_child == NULL)
- {
- current_child = gtk_label_new (NULL);
- gtk_widget_show (current_child);
- gtk_container_add (GTK_CONTAINER (frame),
- current_child);
- }
+ {
+ current_child = gtk_label_new (NULL);
+ gtk_widget_show (current_child);
+ gtk_frame_set_child (GTK_FRAME (frame), current_child);
+ }
g_return_if_fail (GTK_IS_LABEL (current_child));