[glade3] * gladeui/glade-widget.c: Added some clarification to the docs of glade_widget_get_children(), f
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-widget.c: Added some clarification to the docs of glade_widget_get_children(), f
- Date: Fri, 14 May 2010 22:03:33 +0000 (UTC)
commit cfcd778e68bb20a8bcf095fd88cb4551ff97947a
Author: Tristan Van Berkom <tvb gnome org>
Date: Fri May 14 17:00:35 2010 -0400
* gladeui/glade-widget.c: Added some clarification to the docs of glade_widget_get_children(),
fixed glade_widget_get_children() to not call g_list_append() in a loop.
ChangeLog | 5 +++++
gladeui/glade-widget.c | 13 ++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c78476e..75a6cf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-14 Tristan Van Berkom <tvb gnome org>
+
+ * gladeui/glade-widget.c: Added some clarification to the docs of glade_widget_get_children(),
+ fixed glade_widget_get_children() to not call g_list_append() in a loop.
+
2010-05-14 Johannes Schmid <jhs jsschmid de>
* gladeui/glade-app.c: Allow destruction/recreation of the GladeApp object
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index e2d3876..a9e0136 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -3442,10 +3442,17 @@ glade_widget_set_parent (GladeWidget *widget,
}
/**
- * glade_widget_get_children
+ * glade_widget_get_children:
* @widget: A #GladeWidget
*
+ * Fetches any wrapped children of @widget.
+ *
* Returns: The children of widget
+ *
+ * <note><para>This differs from a direct call to glade_widget_adaptor_get_children() as
+ * it only returns children which have an associated GladeWidget. This function will
+ * not return any placeholders or internal composite children that have not been
+ * exposed for Glade configuration</para></note>
*/
GList *
glade_widget_get_children (GladeWidget *widget)
@@ -3463,12 +3470,12 @@ glade_widget_get_children (GladeWidget *widget)
{
if (glade_widget_get_from_gobject (node->data))
{
- real_children = g_list_append (real_children, node->data);
+ real_children = g_list_prepend (real_children, node->data);
}
}
g_list_free (adapter_children);
- return real_children;
+ return g_list_reverse (real_children);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]