[evolution-patches] Fix to focus the search bar in mail using shortcut.



Hi,

I have attached the patch. '/' would just focus the search widget.

-Srini
Index: mail/em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.69
diff -u -p -r1.69 em-folder-browser.c
--- mail/em-folder-browser.c	11 Aug 2005 06:02:31 -0000	1.69
+++ mail/em-folder-browser.c	18 Oct 2005 04:15:21 -0000
@@ -765,6 +765,14 @@ emfb_tools_subscriptions(BonoboUICompone
 }
 
 static void
+emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path)
+{
+	EMFolderBrowser *emfb = data;
+
+	gtk_widget_grab_focus (((ESearchBar *)emfb->search)->entry);
+}
+
+static void
 emfb_tools_vfolders(BonoboUIComponent *uid, void *data, const char *path)
 {
 	/* FIXME: rename/refactor this */
@@ -799,6 +807,8 @@ static BonoboUIVerb emfb_verbs[] = {
 	BONOBO_UI_UNSAFE_VERB ("ToolsFilters", emfb_tools_filters),
 	BONOBO_UI_UNSAFE_VERB ("ToolsSubscriptions", emfb_tools_subscriptions),
 	BONOBO_UI_UNSAFE_VERB ("ToolsVFolders", emfb_tools_vfolders),
+	BONOBO_UI_UNSAFE_VERB ("FocusSearch", emfb_focus_search),
+	
 	/* ViewPreview is a toggle */
 
 	BONOBO_UI_VERB_END
Index: ui/evolution-mail-global.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-mail-global.xml,v
retrieving revision 1.35
diff -u -p -r1.35 evolution-mail-global.xml
--- ui/evolution-mail-global.xml	6 Oct 2005 18:21:50 -0000	1.35
+++ ui/evolution-mail-global.xml	18 Oct 2005 04:17:24 -0000
@@ -38,6 +38,10 @@
 
   </commands>
 
+  <keybindings>
+	  <accel name="slash" id="FocusSearch"/>
+  </keybindings>
+
   <menu>
 
     <submenu name="File">


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