[libgda] GdaTree related corrections



commit e4d365745a54a3597995f314eeecdb8243af1183
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Oct 19 20:31:22 2010 +0200

    GdaTree related corrections

 libgda/gda-attributes-manager.c |    2 +-
 libgda/gda-tree-manager.c       |    4 +++-
 libgda/gda-tree-node.c          |    3 ++-
 libgda/gda-tree.c               |    4 ++++
 4 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libgda/gda-attributes-manager.c b/libgda/gda-attributes-manager.c
index a591d66..2e59734 100644
--- a/libgda/gda-attributes-manager.c
+++ b/libgda/gda-attributes-manager.c
@@ -291,7 +291,7 @@ gda_attributes_manager_set_full (GdaAttributesManager *mgr, gpointer ptr,
  * gda_attributes_manager_get:
  * @mgr: a #GdaAttributesManager
  * @ptr: a pointer to the resources to which the attribute will apply
- * @att_name: an attribute's name, as a *static* string
+ * @att_name: an attribute's name
  *
  * Retrieves the value of an attribute previously set using gda_attributes_manager_set().
  *
diff --git a/libgda/gda-tree-manager.c b/libgda/gda-tree-manager.c
index 78c33df..8024b7b 100644
--- a/libgda/gda-tree-manager.c
+++ b/libgda/gda-tree-manager.c
@@ -412,6 +412,9 @@ gda_tree_manager_create_node (GdaTreeManager *manager, GdaTreeNode *parent, cons
  * of a #GdaTree. Note that a single #GdaTreeManager can be used by several #GdaTree objects
  * or several times in the same #GdaTree's structure.
  *
+ * Please note that it's possible for @mgr and @sub to be the same object, but beware of the possible
+ * infinite recursive behaviour in this case (depending on the actual implementation of the #GdaTreeManager)
+ *
  * Since: 4.2
  */
 void
@@ -419,7 +422,6 @@ gda_tree_manager_add_manager (GdaTreeManager *manager, GdaTreeManager *sub)
 {
 	g_return_if_fail (GDA_IS_TREE_MANAGER (manager));
 	g_return_if_fail (GDA_IS_TREE_MANAGER (sub));
-	g_return_if_fail (manager != sub);
 
 	manager->priv->sub_managers = g_slist_append (manager->priv->sub_managers, sub);
 	g_object_ref (sub);
diff --git a/libgda/gda-tree-node.c b/libgda/gda-tree-node.c
index 9091101..8fa0413 100644
--- a/libgda/gda-tree-node.c
+++ b/libgda/gda-tree-node.c
@@ -727,7 +727,8 @@ gda_tree_node_get_node_attribute (GdaTreeNode *node, const gchar *attribute)
  * @value: a #GValue, or %NULL
  * @destroy: a function to be called when @attribute is not needed anymore, or %NULL
  *
- * Set the value associated to a named attribute. The @attribute string is 'stolen' by this method, and
+ * Set the value associated to a named attribute. The @attribute string is used AS IT IS by this method (eg.
+ * no copy of it is made), and
  * the memory it uses will be freed using the @destroy function when no longer needed (if @destroy is %NULL,
  * then the string will not be freed at all).
  *
diff --git a/libgda/gda-tree.c b/libgda/gda-tree.c
index f9cd3c0..6c11a8a 100644
--- a/libgda/gda-tree.c
+++ b/libgda/gda-tree.c
@@ -170,6 +170,10 @@ gda_tree_class_init (GdaTreeClass *klass)
         object_class->set_property = gda_tree_set_property;
         object_class->get_property = gda_tree_get_property;
 
+	/**
+	 * GdaTree:is-list:
+	 * Tells if the GdaTree is a list or a tree.
+	 */
 	g_object_class_install_property (object_class, PROP_IS_LIST,
                                          g_param_spec_boolean ("is-list", _("Tells if the GdaTree is a list or a tree"), NULL,
 							       FALSE, G_PARAM_READABLE));



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