treepopover: Stop using container api

This commit is contained in:
Matthias Clasen 2020-05-09 21:03:10 -04:00
parent b490800949
commit a7769c9c88

View File

@ -466,15 +466,14 @@ gtk_tree_popover_get_path_item (GtkTreePopover *popover,
{ {
GtkWidget *stack = gtk_popover_get_child (GTK_POPOVER (popover)); GtkWidget *stack = gtk_popover_get_child (GTK_POPOVER (popover));
GtkWidget *item = NULL; GtkWidget *item = NULL;
GList *children, *l; GtkWidget *stackchild;
GtkWidget *child;
children = gtk_container_get_children (GTK_CONTAINER (stack)); for (stackchild = gtk_widget_get_first_child (stack);
stackchild != NULL;
for (l = children; !item && l; l = l->next) stackchild = gtk_widget_get_next_sibling (stackchild))
{ {
GtkWidget *child; for (child = gtk_widget_get_first_child (stackchild);
for (child = gtk_widget_get_first_child (GTK_WIDGET (l->data));
!item && child; !item && child;
child = gtk_widget_get_next_sibling (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; return item;
} }