summaryrefslogtreecommitdiff
path: root/gtk/gtkentrycompletion.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-01-09 19:22:33 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-01-09 19:22:33 +0000
commit0d313b587b2161688d38dc897d93d0e7d09b0358 (patch)
tree398be0b42a0c45d48a1c159c2269a4b5903ae3dc /gtk/gtkentrycompletion.c
parentb3f14e09e49bf73ee801a2ccec001441f317738e (diff)
downloadgtk+-0d313b587b2161688d38dc897d93d0e7d09b0358.tar.gz
Prevent the first row being focused on map. (#137351, Niklas Knutsson)
2006-01-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Prevent the first row being focused on map. (#137351, Niklas Knutsson)
Diffstat (limited to 'gtk/gtkentrycompletion.c')
-rw-r--r--gtk/gtkentrycompletion.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 73505c8153..77dd5d9287 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1446,7 +1446,14 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
if (GTK_IS_WINDOW (toplevel))
gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)),
GTK_WINDOW (completion->priv->popup_window));
+
+ /* prevent the first row being focused */
+ gtk_widget_grab_focus (completion->priv->tree_view);
+
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view)));
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->action_view)));
+
gtk_widget_show (completion->priv->popup_window);
gtk_grab_add (completion->priv->popup_window);