[gnome-builder] prefs: let search bar handle keypress event
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] prefs: let search bar handle keypress event
- Date: Sat, 10 Jan 2015 22:56:13 +0000 (UTC)
commit b3ffa4ae1b190476c8cb673fbeaa4f1bfc8ec02d
Author: Florian <florian bae gmail com>
Date: Sat Jan 10 23:14:23 2015 +0100
prefs: let search bar handle keypress event
That way the first character typed shows in the search entry.
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=742695
Signed-off-by: Florian <florian bae gmail com>
src/preferences/gb-preferences-window.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/preferences/gb-preferences-window.c b/src/preferences/gb-preferences-window.c
index 0ae7555..593b32f 100644
--- a/src/preferences/gb-preferences-window.c
+++ b/src/preferences/gb-preferences-window.c
@@ -197,9 +197,11 @@ gb_preferences_window_key_press_event (GtkWidget *widget,
!is_space_event (event) &&
!is_tab_event (event))
{
- gtk_search_bar_set_search_mode (self->priv->search_bar, TRUE);
- gtk_widget_grab_focus (GTK_WIDGET (self->priv->search_entry));
- ret = TRUE;
+ if (gtk_search_bar_handle_event (GTK_SEARCH_BAR (self->priv->search_bar),
+ (GdkEvent*) event) == GDK_EVENT_STOP)
+ ret = TRUE;
+ else
+ ret = FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]