forked from AuroraMiddleware/gtk
file chooser: Don't start search too eagerly
We were trying to start search when the user types anything, but this is annoying more often than helpful, and interferes with the location entry. So, stick with explicitly enabled search (via the search button or Alt-S) for now.
This commit is contained in:
parent
6ed479e71c
commit
f126157bfa
@ -425,8 +425,6 @@ static void gtk_file_chooser_widget_hierarchy_changed (GtkWidget *w
|
||||
static void gtk_file_chooser_widget_style_updated (GtkWidget *widget);
|
||||
static void gtk_file_chooser_widget_screen_changed (GtkWidget *widget,
|
||||
GdkScreen *previous_screen);
|
||||
static gboolean gtk_file_chooser_widget_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
|
||||
static gboolean gtk_file_chooser_widget_set_current_folder (GtkFileChooser *chooser,
|
||||
GFile *folder,
|
||||
@ -1246,26 +1244,6 @@ browse_files_key_press_event_cb (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_file_chooser_widget_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) widget;
|
||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||
|
||||
if (gtk_search_entry_handle_event (GTK_SEARCH_ENTRY (priv->search_entry), (GdkEvent *)event))
|
||||
{
|
||||
if (priv->operation_mode != OPERATION_MODE_SEARCH)
|
||||
operation_mode_set (impl, OPERATION_MODE_SEARCH);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_CLASS (gtk_file_chooser_widget_parent_class)->key_press_event (widget, event))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Callback used when the file list's popup menu is detached */
|
||||
static void
|
||||
popup_menu_detach_cb (GtkWidget *attach_widget,
|
||||
@ -7121,7 +7099,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
||||
widget_class->hierarchy_changed = gtk_file_chooser_widget_hierarchy_changed;
|
||||
widget_class->style_updated = gtk_file_chooser_widget_style_updated;
|
||||
widget_class->screen_changed = gtk_file_chooser_widget_screen_changed;
|
||||
widget_class->key_press_event = gtk_file_chooser_widget_key_press_event;
|
||||
|
||||
/*
|
||||
* Signals
|
||||
|
Loading…
Reference in New Issue
Block a user