diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-05-21 18:29:08 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-05-23 20:53:30 +0200 |
commit | 1bfbfbc50c6aad5f3dc578d87174fc9942e5e249 (patch) | |
tree | 54185cae91319c5d2b34c5a6babb5a8709aba400 /gtk/gtktreeview.c | |
parent | ffbe7f6eb6de2933478a14fc9d734570d7820c21 (diff) | |
download | gtk+-1bfbfbc50c6aad5f3dc578d87174fc9942e5e249.tar.gz |
GtkTreeView: Use GtkEntry private function to remove hack
https://bugzilla.gnome.org/show_bug.cgi?id=700787
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r-- | gtk/gtktreeview.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 52e36b1053..31f746aec3 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -11080,8 +11080,7 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view, */ GList *list; gboolean found_focus = FALSE; - GtkWidgetClass *entry_parent_class; - + if (!tree_view->priv->enable_search && !keybinding) return FALSE; @@ -11139,11 +11138,8 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view, (GSourceFunc) gtk_tree_view_search_entry_flush_timeout, tree_view); - /* Grab focus will select all the text. We don't want that to happen, so we - * call the parent instance and bypass the selection change. This is probably - * really non-kosher. */ - entry_parent_class = g_type_class_peek_parent (GTK_ENTRY_GET_CLASS (tree_view->priv->search_entry)); - (entry_parent_class->grab_focus) (tree_view->priv->search_entry); + /* Grab focus without selecting all the text. */ + _gtk_entry_grab_focus (GTK_ENTRY (tree_view->priv->search_entry), FALSE); /* send focus-in event */ send_focus_change (tree_view->priv->search_entry, device, TRUE); |