mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
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:
parent
9cbf764bcd
commit
696129d83c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user