Commit 4a03ea23 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

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').
parent c906acd0
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.
......
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.
......
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.
......
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.
......
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.
......
......@@ -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 &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment