[seahorse] When Ctrl-F pressed in the main window, focus the filter box



commit f67c294cadb936efd4766c222c7c99754db75d2b
Author: Stef Walter <stefw gnome org>
Date:   Fri Jun 29 14:10:13 2012 +0200

    When Ctrl-F pressed in the main window, focus the filter box
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677844

 src/seahorse-key-manager.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/seahorse-key-manager.c b/src/seahorse-key-manager.c
index 19defd8..a84431d 100644
--- a/src/seahorse-key-manager.c
+++ b/src/seahorse-key-manager.c
@@ -225,6 +225,15 @@ on_filter_changed (GtkEntry* entry,
 	}
 }
 
+static gboolean
+on_start_interactive_search (GtkTreeView *treeview,
+                             gpointer user_data)
+{
+	SeahorseKeyManager *self = SEAHORSE_KEY_MANAGER (user_data);
+	gtk_widget_grab_focus (GTK_WIDGET (self->pv->filter_entry));
+	return FALSE;
+}
+
 static void 
 import_files (SeahorseKeyManager* self,
               const gchar** uris)
@@ -768,7 +777,8 @@ seahorse_key_manager_constructed (GObject *object)
 	/* For the filtering */
 	g_signal_connect_object (GTK_EDITABLE (self->pv->filter_entry), "changed", 
 	                         G_CALLBACK (on_filter_changed), self, 0);
-
+	g_signal_connect (self->pv->view, "start-interactive-search",
+	                  G_CALLBACK (on_start_interactive_search), self);
 
 	/* Set focus to the current key list */
 	gtk_widget_grab_focus (GTK_WIDGET (self->pv->view));



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