[seahorse/wip/nielsdg/keyboard-shortcuts: 2/2] Add Keyboard shortcuts window



commit 4789a413074d002ba7bd1d7d5710c66134f7bb7d
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Jan 30 08:58:01 2020 +0100

    Add Keyboard shortcuts window
    
    See https://gitlab.gnome.org/GNOME/Initiatives/issues/14

 data/gtk/help-overlay.ui    | 57 +++++++++++++++++++++++++++++++++++++++++++++
 data/seahorse.gresource.xml |  1 +
 po/POTFILES.in              |  1 +
 src/seahorse-key-manager.ui |  4 ++++
 4 files changed, 63 insertions(+)
---
diff --git a/data/gtk/help-overlay.ui b/data/gtk/help-overlay.ui
new file mode 100644
index 00000000..48e3dbad
--- /dev/null
+++ b/data/gtk/help-overlay.ui
@@ -0,0 +1,57 @@
+<interface>
+  <object class="GtkShortcutsWindow" id="help_overlay">
+    <child>
+      <object class="GtkShortcutsSection">
+        <property name="visible">1</property>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes" context="shortcut window">Overview</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F1</property>
+                <property name="title" translatable="yes" context="shortcut window">Help</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;n</property>
+                <property name="title" translatable="yes" context="shortcut window">Create a new 
item</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;i</property>
+                <property name="title" translatable="yes" context="shortcut window">Import item from 
file</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;f</property>
+                <property name="title" translatable="yes" context="shortcut window">Search</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;F1 &lt;Primary&gt;question</property>
+                <property name="title" translatable="yes" context="shortcut window">Shortcut list</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;q</property>
+                <property name="title" translatable="yes" context="shortcut window">Quit</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/data/seahorse.gresource.xml b/data/seahorse.gresource.xml
index b35007c0..796ef5b5 100644
--- a/data/seahorse.gresource.xml
+++ b/data/seahorse.gresource.xml
@@ -13,6 +13,7 @@
     <file alias="seahorse-change-passphrase.ui" 
preprocess="xml-stripblanks">../src/seahorse-change-passphrase.ui</file>
     <file alias="seahorse-key-manager-widgets.ui" 
preprocess="xml-stripblanks">../src/seahorse-key-manager-widgets.ui</file>
     <file alias="seahorse-key-manager.ui" preprocess="xml-stripblanks">../src/seahorse-key-manager.ui</file>
+    <file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
 
     <!-- GKR -->
     <file alias="seahorse-gkr-add-item.ui" 
preprocess="xml-stripblanks">../gkr/seahorse-gkr-add-item.ui</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index eb058a44..8e745f19 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,6 +12,7 @@ common/seahorse-add-keyserver.ui
 common/seahorse-prefs.ui
 common/util.vala
 common/validity.vala
+data/gtk/help-overlay.ui
 data/org.gnome.seahorse.gschema.xml
 data/org.gnome.seahorse.manager.gschema.xml
 data/org.gnome.seahorse.window.gschema.xml
diff --git a/src/seahorse-key-manager.ui b/src/seahorse-key-manager.ui
index b9ceadbb..8a2276bd 100644
--- a/src/seahorse-key-manager.ui
+++ b/src/seahorse-key-manager.ui
@@ -20,6 +20,10 @@
         <attribute name="action">app.preferences</attribute>
         <attribute name="hidden-when">action-disabled</attribute>
       </item>
+      <item>
+        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
+        <attribute name="action">win.show-help-overlay</attribute>
+      </item>
       <item>
         <attribute name="label" translatable="yes">_Help</attribute>
         <attribute name="action">app.help</attribute>


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