[gtk/kill-containers: 17/49] treepopover: Stop using container api



commit f84c820a7c63a557ccf06bd12201e94ed426ab28
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 9 21:03:10 2020 -0400

    treepopover: Stop using container api

 gtk/gtktreepopover.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtktreepopover.c b/gtk/gtktreepopover.c
index 268462ab5c..2c26ea8234 100644
--- a/gtk/gtktreepopover.c
+++ b/gtk/gtktreepopover.c
@@ -466,15 +466,14 @@ gtk_tree_popover_get_path_item (GtkTreePopover *popover,
 {
   GtkWidget *stack = gtk_popover_get_child (GTK_POPOVER (popover));
   GtkWidget *item = NULL;
-  GList *children, *l;
-
-  children = gtk_container_get_children (GTK_CONTAINER (stack));
+  GtkWidget *stackchild;
+  GtkWidget *child;
 
-  for (l = children; !item && l; l = l->next)
+  for (stackchild = gtk_widget_get_first_child (stack);
+       stackchild != NULL;
+       stackchild = gtk_widget_get_next_sibling (stackchild))
     {
-      GtkWidget *child;
-
-      for (child = gtk_widget_get_first_child (GTK_WIDGET (l->data));
+      for (child = gtk_widget_get_first_child (stackchild);
            !item && child;
            child = gtk_widget_get_next_sibling (child))
         {
@@ -510,8 +509,6 @@ gtk_tree_popover_get_path_item (GtkTreePopover *popover,
         }
     }
 
-  g_list_free (children);
-
   return item;
 }
 


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