[yelp] [yelp-window] Ctrl+S keybinding to start search



commit e559db16dd7670d82c3bfca2ad4a4b511bcb2270
Author: Shaun McCance <shaunm gnome org>
Date:   Tue May 4 10:45:01 2010 -0500

    [yelp-window] Ctrl+S keybinding to start search

 src/yelp-window.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 1d8b524..2d489ef 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -62,6 +62,8 @@ static void          window_add_bookmark          (GtkAction          *action,
                                                    YelpWindow         *window);
 static void          window_load_bookmark         (GtkAction          *action,
                                                    YelpWindow         *window);
+static void          window_start_search          (GtkAction          *action,
+                                                   YelpWindow         *window);
 static void          window_open_location         (GtkAction          *action,
                                                    YelpWindow         *window);
 
@@ -168,6 +170,7 @@ static const gchar *YELP_UI =
     "<placeholder name='Bookmarks'/>"
     "</menu>"
     "</menubar>"
+    "<accelerator action='Search'/>"
     "<accelerator action='OpenLocation'/>"
     "</ui>";
 
@@ -221,6 +224,11 @@ static const GtkActionEntry entries[] = {
       "<Control>D",
       NULL,
       G_CALLBACK (window_add_bookmark) },
+    { "Search", NULL,
+      N_("Search"),
+      "<Control>S",
+      NULL,
+      G_CALLBACK (window_start_search) },
     { "OpenLocation", NULL,
       N_("Open Location"),
       "<Control>L",
@@ -699,6 +707,14 @@ window_set_bookmarks (YelpWindow  *window,
 }
 
 static void
+window_start_search (GtkAction *action, YelpWindow *window)
+{
+    YelpWindowPrivate *priv = GET_PRIV (window);
+
+    yelp_location_entry_start_search (priv->entry);
+}
+
+static void
 window_open_location (GtkAction *action, YelpWindow *window)
 {
     YelpUri *yuri = NULL;



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