[gtk+] treeview: Do not focus a path on model change
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Do not focus a path on model change
- Date: Thu, 12 Jan 2012 18:37:32 +0000 (UTC)
commit 133179fd257a7fe06bc5348328dca0a6f8b78a08
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 12 19:34:45 2012 +0100
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
gtk/gtktreeview.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index eb3afc8..091dc90 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]