[nautilus] Change focus to the view on down arrow
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Change focus to the view on down arrow
- Date: Fri, 20 Jul 2012 00:31:50 +0000 (UTC)
commit 9de06587d2e776ae08b1ff0b37941fea149b1183
Author: William Jon McCann <jmccann redhat com>
Date: Thu Jul 19 18:17:14 2012 -0400
Change focus to the view on down arrow
https://bugzilla.gnome.org/show_bug.cgi?id=680159
src/nautilus-query-editor.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index e8bb694..8d88fda 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -1058,6 +1058,17 @@ finish_first_line (NautilusQueryEditor *editor, GtkWidget *hbox, gboolean use_go
gtk_box_pack_start (GTK_BOX (hbox), editor->details->search_all_button, FALSE, FALSE, 0);
}
+static gboolean
+entry_key_press_event_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ NautilusQueryEditor *editor)
+{
+ if (event->keyval == GDK_KEY_Down) {
+ nautilus_window_grab_focus (NAUTILUS_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (widget))));
+ }
+ return FALSE;
+}
+
static void
setup_widgets (NautilusQueryEditor *editor)
{
@@ -1071,6 +1082,8 @@ setup_widgets (NautilusQueryEditor *editor)
editor->details->entry = gtk_search_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), editor->details->entry, TRUE, TRUE, 0);
+ g_signal_connect (editor->details->entry, "key-press-event",
+ G_CALLBACK (entry_key_press_event_cb), editor);
g_signal_connect (editor->details->entry, "activate",
G_CALLBACK (entry_activate_cb), editor);
g_signal_connect (editor->details->entry, "changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]