[simple-scan] General section in Keyboard shurtcuts



commit 273bacb9960d10515c7cb4753eabd9a5436d36c7
Author: Sabri Ünal <libreajans gmail com>
Date:   Sat Jan 4 22:46:33 2020 +0000

    General section in Keyboard shurtcuts
    
    This patch creates a shortcut (ctrl+f1) for help overlay and adds a general section.

 src/app-window.vala |  1 +
 src/help-overlay.ui | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index c82090a..e9cf74b 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -1740,6 +1740,7 @@ public class AppWindow : Gtk.ApplicationWindow
         app.set_accels_for_action ("app.print", { "<Ctrl>P" });
         app.set_accels_for_action ("app.help", { "F1" });
         app.set_accels_for_action ("app.quit", { "<Ctrl>Q" });
+        app.set_accels_for_action ("win.show-help-overlay", { "<Ctrl>F1" });
 
         var gear_menu = new Menu ();
         var section = new Menu ();
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
index dabec9f..8cc3e78 100644
--- a/src/help-overlay.ui
+++ b/src/help-overlay.ui
@@ -122,6 +122,33 @@
             </child>
           </object>
         </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes" context="shortcut window">General</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F1</property>
+                <property name="title" translatable="yes" context="shortcut window">Show help</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;F1</property>
+                <property name="title" translatable="yes" context="shortcut window">Keyboard 
shortcuts</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;q</property>
+                <property name="title" translatable="yes" context="shortcut window">Quit</property>
+              </object>
+            </child>
+          </object>
+        </child>        
       </object>
     </child>
   </object>


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