Merged from stable.

Thu May 29 17:06:09 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (check_selection_helper): new function,
	(gtk_tree_view_row_deleted): traverse the tree from the
	deleted node to see whether the selection changed, instead of
	just checking this node. (Fixes #107400, reported by 'Duncan').
This commit is contained in:
Kristian Rietveld
2003-05-29 15:09:47 +00:00
committed by Kristian Rietveld
parent c906acd086
commit 4a03ea2334
6 changed files with 62 additions and 3 deletions

View File

@ -1,3 +1,12 @@
Thu May 29 17:06:09 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (check_selection_helper): new function,
(gtk_tree_view_row_deleted): traverse the tree from the
deleted node to see whether the selection changed, instead of
just checking this node. (Fixes #107400, reported by 'Duncan').
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,12 @@
Thu May 29 17:06:09 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (check_selection_helper): new function,
(gtk_tree_view_row_deleted): traverse the tree from the
deleted node to see whether the selection changed, instead of
just checking this node. (Fixes #107400, reported by 'Duncan').
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,12 @@
Thu May 29 17:06:09 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (check_selection_helper): new function,
(gtk_tree_view_row_deleted): traverse the tree from the
deleted node to see whether the selection changed, instead of
just checking this node. (Fixes #107400, reported by 'Duncan').
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,12 @@
Thu May 29 17:06:09 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (check_selection_helper): new function,
(gtk_tree_view_row_deleted): traverse the tree from the
deleted node to see whether the selection changed, instead of
just checking this node. (Fixes #107400, reported by 'Duncan').
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,12 @@
Thu May 29 17:06:09 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (check_selection_helper): new function,
(gtk_tree_view_row_deleted): traverse the tree from the
deleted node to see whether the selection changed, instead of
just checking this node. (Fixes #107400, reported by 'Duncan').
Thu May 29 16:31:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.

View File

@ -6332,6 +6332,19 @@ count_children_helper (GtkRBTree *tree,
(*((gint *)data))++;
}
static void
check_selection_helper (GtkRBTree *tree,
GtkRBNode *node,
gpointer data)
{
gint *value = (gint *)data;
*value = GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED);
if (node->children && !*value)
_gtk_rbtree_traverse (node->children, node->children->root, G_POST_ORDER, check_selection_helper, data);
}
static void
gtk_tree_view_row_deleted (GtkTreeModel *model,
GtkTreePath *path,
@ -6341,7 +6354,7 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
GtkRBTree *tree;
GtkRBNode *node;
GList *list;
gint selection_changed;
gint selection_changed = FALSE;
g_return_if_fail (path != NULL);
@ -6353,8 +6366,9 @@ gtk_tree_view_row_deleted (GtkTreeModel *model,
if (tree == NULL)
return;
/* Change the selection */
selection_changed = GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED);
/* check if the selection has been changed */
_gtk_rbtree_traverse (tree, node, G_POST_ORDER,
check_selection_helper, &selection_changed);
for (list = tree_view->priv->columns; list; list = list->next)
if (((GtkTreeViewColumn *)list->data)->visible &&