Commit ed50ebfb authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

Now we test we can unselect nodes before selecting new ones.

Wed Jan  9 19:10:07 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeselection.c
	(_gtk_tree_selection_internal_select_node): Now we test we can
	unselect nodes before selecting new ones.
	(gtk_tree_selection_real_select_node): be careful comparing booleans.
parent b9908897
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
......
......@@ -265,11 +265,14 @@ section.
</para>
<!-- ##### FUNCTION gdk_threads_leave ##### -->
<para>
Leaves a critical region begun with gdk_threads_enter().
</para>
<!-- ##### VARIABLE gdk_threads_mutex ##### -->
<para>
The #GMutex used to implement the critical region for
......
......@@ -102,6 +102,8 @@ struct _GtkTreeViewPrivate
GtkTreeViewColumn *drag_column;
/* bin_window offset */
GtkTreeRowReference *top_row;
gint top_row_dy;
gint dy;
gint drag_column_x;
......
......@@ -994,12 +994,30 @@ _gtk_tree_selection_internal_select_node (GtkTreeSelection *selection,
}
else
{
/* FIXME: We only want to select the new node if we can unselect the
* old one, and we can select the new one. We are currently
* unselecting the old one first, then trying the new one. */
if (anchor_path)
{
dirty = gtk_tree_selection_real_unselect_all (selection);
/* We only want to select the new node if we can unselect the old one,
* and we can select the new one. */
if (selection->user_func)
{
if ((*selection->user_func) (selection, selection->tree_view->priv->model, path,
GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED),
selection->user_data))
dirty = TRUE;
}
else
{
dirty = TRUE;
}
/* if dirty is FALSE, we weren't able to select the new one, otherwise, we try to
* unselect the new one
*/
if (dirty)
dirty = gtk_tree_selection_real_unselect_all (selection);
/* if dirty is TRUE at this point, we successfully unselected the
* old one, and can then select the new one */
if (dirty)
{
if (selection->tree_view->priv->anchor)
......@@ -1093,6 +1111,8 @@ gtk_tree_selection_real_select_node (GtkTreeSelection *selection,
gboolean selected = FALSE;
GtkTreePath *path = NULL;
select = !! select;
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED) != select)
{
path = _gtk_tree_view_find_path (selection->tree_view, tree, node);
......
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