[gnome-contacts] Add a shortcuts window.



commit 7cc93074d58dd138e12f83712d9a604236fbd9d6
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Dec 25 20:25:53 2017 +0100

    Add a shortcuts window.
    
    See also [bug 759582](https://bugzilla.gnome.org/show_bug.cgi?id=759582)

 data/contacts.gresource.xml |    1 +
 data/gtk/help-overlay.ui    |   50 +++++++++++++++++++++++++++++++++++++++++++
 data/gtk/menus.ui           |    4 +++
 po/POTFILES.in              |    1 +
 4 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/data/contacts.gresource.xml b/data/contacts.gresource.xml
index 2cca45b..ba45a0c 100644
--- a/data/contacts.gresource.xml
+++ b/data/contacts.gresource.xml
@@ -3,6 +3,7 @@
   <gresource prefix="/org/gnome/Contacts">
     <file compressed="true">ui/style.css</file>
     <file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
+    <file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-accounts-list.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-address-map.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-avatar-dialog.ui</file>
diff --git a/data/gtk/help-overlay.ui b/data/gtk/help-overlay.ui
new file mode 100644
index 0000000..044d910
--- /dev/null
+++ b/data/gtk/help-overlay.ui
@@ -0,0 +1,50 @@
+<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">Overview</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F1</property>
+                <property name="title">Help</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;n</property>
+                <property name="title">Create a new contact</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;f &lt;Primary&gt;s</property>
+                <property name="title">Search</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Primary&gt;question</property>
+                <property name="title">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">Quit</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/data/gtk/menus.ui b/data/gtk/menus.ui
index 178ea93..18676b5 100644
--- a/data/gtk/menus.ui
+++ b/data/gtk/menus.ui
@@ -8,6 +8,10 @@
     </section>
     <section>
       <item>
+        <attribute name="action">win.show-help-overlay</attribute>
+        <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
+      </item>
+      <item>
         <attribute name="action">app.help</attribute>
         <attribute name="label" translatable="yes">_Help</attribute>
       </item>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5ff5e04..0ce9a8f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,6 +2,7 @@
 # Please keep this file sorted alphabetically.
 data/org.gnome.Contacts.appdata.xml.in
 data/org.gnome.Contacts.desktop.in
+data/gtk/help-overlay.ui
 data/gtk/menus.ui
 data/ui/contacts-accounts-list.ui
 data/ui/contacts-avatar-dialog.ui


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