[gedit] search: set focus to view under cursor
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] search: set focus to view under cursor
- Date: Sun, 18 Jan 2015 14:47:59 +0000 (UTC)
commit 5a20204ffde5b7dccee09566d93b3514a4f7c00d
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sat Jan 17 20:09:10 2015 +0100
search: set focus to view under cursor
https://bugzilla.gnome.org/show_bug.cgi?id=742790
gedit/gedit-view-frame.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index fb67e14..a4bfe0b 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -575,7 +575,9 @@ search_widget_key_press_event (GtkWidget *widget,
guint modifiers = gtk_accelerator_get_default_mod_mask ();
/* Close window */
- if (event->keyval == GDK_KEY_Tab)
+ if (event->keyval == GDK_KEY_Tab ||
+ event->keyval == GDK_KEY_Return ||
+ event->keyval == GDK_KEY_KP_Enter)
{
hide_search_widget (frame, FALSE);
gtk_widget_grab_focus (GTK_WIDGET (frame->priv->view));
@@ -1571,7 +1573,7 @@ gedit_view_frame_init (GeditViewFrame *frame)
G_CALLBACK (mark_set_cb),
frame);
- g_signal_connect (frame->priv->revealer,
+ g_signal_connect (frame->priv->search_entry,
"key-press-event",
G_CALLBACK (search_widget_key_press_event),
frame);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]