Commit 133179fd authored by Benjamin Otte's avatar Benjamin Otte

treeview: Do not focus a path on model change

Instead, focus nothing and wait until we get focus before doing so. This
restores previous behaviour but still emits proper cursor-changed
events.

Fixes a bunch of bugs in the filechooser which populates the treeview
asynchronously.

https://bugzilla.gnome.org/show_bug.cgi?id=613728
parent feb1f8de
......@@ -11462,19 +11462,11 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
_gtk_tree_view_accessible_add (tree_view, tree_view->priv->tree, NULL);
}
if (search_first_focusable_path (tree_view, &path, TRUE, NULL, NULL))
{
gtk_tree_view_real_set_cursor (tree_view, path, CLEAR_AND_SELECT | CURSOR_INVALID);
gtk_tree_path_free (path);
}
else
gtk_tree_view_real_set_cursor (tree_view, NULL, CURSOR_INVALID);
/* FIXME: do I need to do this? gtk_tree_view_create_buttons (tree_view); */
install_presize_handler (tree_view);
}
else
gtk_tree_view_real_set_cursor (tree_view, NULL, CURSOR_INVALID);
gtk_tree_view_real_set_cursor (tree_view, NULL, CURSOR_INVALID);
g_object_notify (G_OBJECT (tree_view), "model");
......
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