Commit 1bfbfbc5 authored by Bastien Nocera's avatar Bastien Nocera

GtkTreeView: Use GtkEntry private function to remove hack
parent ffbe7f6e
...@@ -11080,8 +11080,7 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view, ...@@ -11080,8 +11080,7 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view,
*/ */
GList *list; GList *list;
gboolean found_focus = FALSE; gboolean found_focus = FALSE;
GtkWidgetClass *entry_parent_class;
if (!tree_view->priv->enable_search && !keybinding) if (!tree_view->priv->enable_search && !keybinding)
return FALSE; return FALSE;
...@@ -11139,11 +11138,8 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view, ...@@ -11139,11 +11138,8 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view,
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout, (GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
tree_view); tree_view);
/* Grab focus will select all the text. We don't want that to happen, so we /* Grab focus without selecting all the text. */
* call the parent instance and bypass the selection change. This is probably _gtk_entry_grab_focus (GTK_ENTRY (tree_view->priv->search_entry), FALSE);
* 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);
/* send focus-in event */ /* send focus-in event */
send_focus_change (tree_view->priv->search_entry, device, TRUE); send_focus_change (tree_view->priv->search_entry, device, TRUE);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment