[gtk/kill-containers: 23/55] treepopover: Stop using container api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-containers: 23/55] treepopover: Stop using container api
- Date: Tue, 12 May 2020 02:41:39 +0000 (UTC)
commit a7769c9c88e4b03b9f4aa76a65cb56de2fab7d69
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]