Search window: use control-enter to start/stop search
authorColin Clark <colin.clark@cclark.uk>
Tue, 3 Sep 2019 10:48:37 +0000 (11:48 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 3 Sep 2019 10:48:37 +0000 (11:48 +0100)
doc/docbook/GuideImageSearchSearch.xml
doc/docbook/GuideReferenceKeyboardShortcuts.xml
src/search.c

index fdf2d26..5065635 100644 (file)
@@ -19,7 +19,9 @@
         Find\r
       </guibutton>\r
     </code>\r
-    button. A search in progress can be stopped by activating the\r
+    button or press\r
+    <code>Ctrl + Enter</code>\r
+    . A search in progress can be stopped by activating the\r
     <code>\r
       <guibutton>\r
         <guiicon>\r
@@ -28,7 +30,9 @@
         Stop\r
       </guibutton>\r
     </code>\r
-    button.\r
+    button or press\r
+    <code>Ctrl + Enter</code>\r
+    .\r
   </para>\r
   <para>The progress of an active search is displayed as a progress bar at the bottom of the window. The progress bar will also display the total files that match the search parameters, and the total number of files searched.</para>\r
   <para>When a search is completed, the total number of files found and their total size will be displayed in the status bar.</para>\r
index 0a55378..f2f1230 100644 (file)
             <entry />\r
             <entry>Close window.</entry>\r
           </row>\r
+          <row>\r
+            <entry>\r
+              <code>\r
+                Ctrl +\r
+                <keycap>Enter</keycap>\r
+              </code>\r
+            </entry>\r
+            <entry />\r
+            <entry>Start/Stop search.</entry>\r
+          </row>\r
         </tbody>\r
       </tgroup>\r
     </table>\r
index 7a0dd85..ba60e01 100644 (file)
@@ -322,6 +322,7 @@ static gint search_result_count(SearchData *sd, gint64 *bytes);
 static void search_window_close(SearchData *sd);
 
 static void search_notify_cb(FileData *fd, NotifyType type, gpointer data);
+static void search_start_cb(GtkWidget *widget, gpointer data);
 
 /*
  *-------------------------------------------------------------------
@@ -1443,6 +1444,9 @@ static gboolean search_window_keypress_cb(GtkWidget *widget, GdkEventKey *event,
                        case 'W': case 'w':
                                search_window_close(sd);
                                break;
+                       case GDK_KEY_Return: case GDK_KEY_KP_Enter:
+                               search_start_cb(NULL, sd);
+                               break;
                        default:
                                stop_signal = FALSE;
                                break;