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
This commit is contained in:
Matthias Clasen 2015-01-28 17:01:30 -05:00
parent 9cbf764bcd
commit 696129d83c

View File

@ -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;
}