summaryrefslogtreecommitdiff
path: root/gtk/gtkrbtree.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-07-07 08:48:06 +0200
committerBenjamin Otte <otte@redhat.com>2011-11-16 04:31:06 +0100
commit320df163a270566db4ddd8b5422e3f32b76a867c (patch)
treeebfe938f1d8e9d0919f179df23f4458163d28b9b /gtk/gtkrbtree.h
parentc8e2cd27e9c6b6cb558121636d31a60d4d37edb5 (diff)
downloadgtk+-320df163a270566db4ddd8b5422e3f32b76a867c.tar.gz
treeview: Make the parity actually store the row number
Instead of just storing the least significant bit of the row number, store the full row number. This will soon be useful for accessibility. But CSS could like it, too.
Diffstat (limited to 'gtk/gtkrbtree.h')
-rw-r--r--gtk/gtkrbtree.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk/gtkrbtree.h b/gtk/gtkrbtree.h
index eec93a7fff..9958d55677 100644
--- a/gtk/gtkrbtree.h
+++ b/gtk/gtkrbtree.h
@@ -66,17 +66,11 @@ struct _GtkRBNode
{
guint flags : 14;
- /* We keep track of whether the aggregate count of children plus 1
- * for the node itself comes to an even number. The parity flag is
- * the total count of children mod 2, where the total count of
- * children gets computed in the same way that the total offset gets
- * computed. i.e. not the same as the "count" field below which
- * doesn't include children. We could replace parity with a
- * full-size int field here, and then take % 2 to get the parity flag,
- * but that would use extra memory.
+ /* count the number of total nodes beneath us, including nodes
+ * of children trees.
+ * i.e. node->left->count + node->right->count + node->children->root->count + 1
*/
-
- guint parity : 1;
+ guint parity;
GtkRBNode *left;
GtkRBNode *right;