[gtk+] Revert "file chooser: Don't start search too eagerly"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "file chooser: Don't start search too eagerly"
- Date: Sat, 4 Jul 2015 04:41:01 +0000 (UTC)
commit c0afb891c8ffeb90e67e8f947a7e7b9b3fff62ee
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 27 13:44:26 2015 -0400
Revert "file chooser: Don't start search too eagerly"
This reverts commit f126157bfa9e8a550067fa169de24697add028bb.
gtk/gtkfilechooserwidget.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 5a5acde..02d1093 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -434,6 +434,8 @@ 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,
@@ -1263,6 +1265,26 @@ 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,
@@ -7319,6 +7341,7 @@ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]