From 696129d83ca2006cd3fb69ebfb7c8fafee3f839b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 28 Jan 2015 17:01:30 -0500 Subject: [PATCH] file chooser: Don't switch too eagerly to search mode If the search entry doesn't consume the key event, don't change to search mode. Otherwise, we interfere e.g. with Ctrl and Shift keys for selection. https://bugzilla.gnome.org/show_bug.cgi?id=743660 --- gtk/gtkfilechooserwidget.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index bc9224ef47..f192ceb577 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -1246,11 +1246,12 @@ gtk_file_chooser_widget_key_press_event (GtkWidget *widget, GtkFileChooserWidget *impl = (GtkFileChooserWidget *) widget; GtkFileChooserWidgetPrivate *priv = impl->priv; - if (priv->operation_mode != OPERATION_MODE_SEARCH) - operation_mode_set (impl, OPERATION_MODE_SEARCH); - if (gtk_search_entry_handle_event (GTK_SEARCH_ENTRY (priv->search_entry), (GdkEvent *)event)) - return TRUE; + { + if (priv->operation_mode != OPERATION_MODE_SEARCH) + operation_mode_set (impl, OPERATION_MODE_SEARCH); + return TRUE; + } return FALSE; }