[gnome-builder] editor-frame: make enter dismiss search entry

commit 566de71632157c2a86de0925b6037653582dc9e6
Author: Ray Strode <rstrode redhat com>
Date:   Sun Oct 11 16:07:22 2015 -0400

    editor-frame: make enter dismiss search entry
    It's a little unexpected that hitting enter keeps the search
    entry around. We already have up arrow and down arrow for
    going through search results.
    This commit makes enter just dismiss the entry.

 src/editor/gb-editor-frame.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index f670942..a8d85b5 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -484,10 +484,8 @@ gb_editor_frame__search_key_press_event (GbEditorFrame *self,
     case GDK_KEY_KP_Enter:
     case GDK_KEY_Return:
-      if ((event->state & GDK_SHIFT_MASK) == 0)
-        gb_widget_activate_action (GTK_WIDGET (self), "frame", "next-search-result", NULL);
-      else
-        gb_widget_activate_action (GTK_WIDGET (self), "frame", "previous-search-result", NULL);
+      gb_widget_activate_action (GTK_WIDGET (self), "frame", "next-search-result", NULL);
+      gtk_widget_grab_focus (GTK_WIDGET (self->source_view));
       return GDK_EVENT_STOP;
     case GDK_KEY_Down:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]