summaryrefslogtreecommitdiff
path: root/gtk/gtkrbtree.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-02-28 00:35:25 +0000
committerJonathan Blandford <jrb@src.gnome.org>2001-02-28 00:35:25 +0000
commitc82dc58f7fceed9878181b50783ebfc80a5a3ae8 (patch)
tree7d9d4fa9d0b659167cdf80eecb82ee2c453a16fb /gtk/gtkrbtree.c
parent75d79abf9801195a0241b02ed7974fafa8278f5c (diff)
downloadgtk+-c82dc58f7fceed9878181b50783ebfc80a5a3ae8.tar.gz
Proxy out to _gtk_tree_row_reference_deleted. (inserted_callback): Proxy
Tue Feb 27 19:32:53 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreemodel.c (deleted_callback): Proxy out to _gtk_tree_row_reference_deleted. (inserted_callback): Proxy out to _gtk_tree_row_reference_inserted. (_gtk_tree_row_reference_new_from_view): Somewhat yukky hack to get around signal emission ordering problem. * gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all): fix to work with SINGLE (_gtk_tree_selection_internal_select_node): Major sanitization on selections. SINGLE now seems to work. * tests/Makefile.am: add testtreecolumn.c: * tests/testtreecolumn.c: New test. Mostly points out selection bugs currently, but will test columns later. * gtk/gtkrbtree.c (_gtk_rbtree_remove_node): Fix really nasty selection bug. I hate touching this code -- it's scary.
Diffstat (limited to 'gtk/gtkrbtree.c')
-rw-r--r--gtk/gtkrbtree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c
index 2765599a5d..f4e7a17936 100644
--- a/gtk/gtkrbtree.c
+++ b/gtk/gtkrbtree.c
@@ -914,7 +914,14 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
tree->root = x;
if (y != node)
- node->children = y->children;
+ {
+ /* Copy the node over */
+ if (GTK_RBNODE_GET_COLOR (node) == GTK_RBNODE_BLACK)
+ node->flags = ((y->flags & (GTK_RBNODE_NON_COLORS)) | GTK_RBNODE_BLACK);
+ else
+ node->flags = ((y->flags & (GTK_RBNODE_NON_COLORS)) | GTK_RBNODE_RED);
+ node->children = y->children;
+ }
if (GTK_RBNODE_GET_COLOR (y) == GTK_RBNODE_BLACK)
_gtk_rbtree_remove_node_fixup (tree, x);