[glade3/project-tree-model] glade-widget: Don't list children without associated GladeWidget but do it in-place



commit 1434f6c2ba44cfc4ba0e4564c9d054dd1532403b
Author: Johannes Schmid <jhs gnome org>
Date:   Fri May 7 12:41:45 2010 +0200

    glade-widget: Don't list children without associated GladeWidget but do it in-place

 gladeui/glade-widget.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 124ba5f..61af7a1 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -3451,8 +3451,20 @@ GList *
 glade_widget_get_children (GladeWidget* widget)
 {
 	GladeWidgetAdaptor* adaptor = glade_widget_get_adaptor (widget);
+	GList* children = NULL;
+	GList* node;
 
-	return glade_widget_adaptor_get_children (adaptor, widget->object);
+	children = glade_widget_adaptor_get_children (adaptor, widget->object);
+	for (node = children; node != NULL; node = g_list_next (node))
+	{
+		if (!glade_widget_get_from_gobject (node->data))
+		{
+			children = g_list_delete_link (children, node);
+			node = children;
+		}
+	}
+	
+	return children;
 }
 	
 



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