From 12396ed1c5024df9ee864cd028464d9aee96dc91 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Mon, 22 Oct 2001 19:19:27 +0000 Subject: [PATCH] Realized g_node_depth is broken, and that it's not worth being consistent Mon Oct 22 15:17:05 2001 Jonathan Blandford * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized g_node_depth is broken, and that it's not worth being consistent with it. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktreestore.c | 5 ++--- 8 files changed, 44 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index aed7aa0fba..fa6d343192 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Mon Oct 22 15:17:05 2001 Jonathan Blandford + + * gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized + g_node_depth is broken, and that it's not worth being consistent + with it. + 2001-10-22 Havoc Pennington * gtk/gtktextiter.c (gtk_text_iter_set_line): Clarify behavior in 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