summaryrefslogtreecommitdiff
path: root/gtk/gtktreestore.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-10-22 19:19:27 +0000
committerJonathan Blandford <jrb@src.gnome.org>2001-10-22 19:19:27 +0000
commit12396ed1c5024df9ee864cd028464d9aee96dc91 (patch)
tree7132dc819ea09932f05ea1d74b6625dc583581f6 /gtk/gtktreestore.c
parent72e6566b0d3811b3d711bb6b077b33082f07379b (diff)
downloadgtk+-12396ed1c5024df9ee864cd028464d9aee96dc91.tar.gz
Realized g_node_depth is broken, and that it's not worth being consistent
Mon Oct 22 15:17:05 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized g_node_depth is broken, and that it's not worth being consistent with it.
Diffstat (limited to 'gtk/gtktreestore.c')
-rw-r--r--gtk/gtktreestore.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c
index 25cc9e32db..fca11bf7bb 100644
--- a/gtk/gtktreestore.c
+++ b/gtk/gtktreestore.c
@@ -1316,7 +1316,7 @@ gtk_tree_store_is_ancestor (GtkTreeStore *tree_store,
* @tree_store: A #GtkTreeStore
* @iter: A valid #GtkTreeIter
*
- * Returns the depth of @iter. This will be 1 for anything on the root level, 2
+ * Returns the depth of @iter. This will be 0 for anything on the root level, 1
* for anything down a level, etc.
*
* Return value: The depth of @iter
@@ -1328,10 +1328,9 @@ gtk_tree_store_iter_depth (GtkTreeStore *tree_store,
g_return_val_if_fail (GTK_IS_TREE_STORE (tree_store), 0);
g_return_val_if_fail (VALID_ITER (iter, tree_store), 0);
- return g_node_depth (G_NODE (iter->user_data)) - 1;
+ return g_node_depth (G_NODE (iter->user_data)) - 2;
}
-
/**
* gtk_tree_store_clear:
* @tree_store: @ #GtkTreeStore