Don't try to activate a node if the cursor is not valid.

2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
	try to activate a node if the cursor is not valid.
This commit is contained in:
Matthias Clasen 2004-11-03 15:08:05 +00:00 committed by Matthias Clasen
parent 3eb76c0940
commit a3ff3fe048
5 changed files with 32 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
2004-11-03 James M. Cape <jcape@ignore-your.tv>
* gtk/gtkfilechooserbutton.c (update_dialog), (dialog_response_cb):

View File

@ -1,3 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
2004-11-03 James M. Cape <jcape@ignore-your.tv>
* gtk/gtkfilechooserbutton.c (update_dialog), (dialog_response_cb):

View File

@ -1,3 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
2004-11-03 James M. Cape <jcape@ignore-your.tv>
* gtk/gtkfilechooserbutton.c (update_dialog), (dialog_response_cb):

View File

@ -1,3 +1,8 @@
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
2004-11-03 James M. Cape <jcape@ignore-your.tv>
* gtk/gtkfilechooserbutton.c (update_dialog), (dialog_response_cb):

View File

@ -12354,7 +12354,7 @@ static void
gtk_tree_view_search_activate (GtkEntry *entry,
GtkTreeView *tree_view)
{
GtkTreePath *path = NULL;
GtkTreePath *path;
GtkRBNode *node;
GtkRBTree *tree;
@ -12364,15 +12364,17 @@ gtk_tree_view_search_activate (GtkEntry *entry,
/* If we have a row selected and it's the cursor row, we activate
* the row XXX */
if (gtk_tree_row_reference_valid (tree_view->priv->cursor))
path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
_gtk_tree_view_find_node (tree_view, path, &tree, &node);
if (node && GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED))
gtk_tree_view_row_activated (tree_view, path, tree_view->priv->focus_column);
if (path)
gtk_tree_path_free (path);
{
path = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
_gtk_tree_view_find_node (tree_view, path, &tree, &node);
if (node && GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED))
gtk_tree_view_row_activated (tree_view, path, tree_view->priv->focus_column);
if (path)
gtk_tree_path_free (path);
}
}
static gboolean