[gnome-logs] Use GtkShortcutsWindow



commit d067e289c98f5e682dbf747d318959b987683200
Author: David King <davidk gnome org>
Date:   Tue Dec 8 17:37:06 2015 +0000

    Use GtkShortcutsWindow

 configure.ac                      |    2 +-
 data/help-overlay.ui              |   42 +++++++++++++++++++++++++++++++++++++
 data/menus.ui                     |    4 +++
 data/org.gnome.Logs.gresource.xml |    1 +
 po/POTFILES.in                    |    1 +
 5 files changed, 49 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 10f0b31..bc5dae9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ AM_CONDITIONAL([LOGS_ENABLE_TESTS], [test "x$testing_utilities" = "xyes"])
 
 dnl Libraries
 GIO_REQUIRED="gio-unix-2.0 >= 2.43.90"
-GTK_REQUIRED="gtk+-3.0 >= 3.15.7"
+GTK_REQUIRED="gtk+-3.0 >= 3.19.3"
 SYSTEMD_REQUIRED="libsystemd"
 PKG_CHECK_MODULES([LOGS], [$GIO_REQUIRED $GTK_REQUIRED $SYSTEMD_REQUIRED])
 
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
new file mode 100644
index 0000000..80366e9
--- /dev/null
+++ b/data/help-overlay.ui
@@ -0,0 +1,42 @@
+<interface domain="gnome-logs">
+    <object class="GtkShortcutsWindow" id="help_overlay">
+        <child>
+            <object class="GtkShortcutsSection">
+                <property name="visible">True</property>
+                <child>
+                    <object class="GtkShortcutsGroup">
+                        <property name="title" translatable="yes">General</property>
+                        <property name="visible">True</property>
+                        <child>
+                            <object class="GtkShortcutsShortcut">
+                                <property name="accelerator">&lt;Primary&gt;n</property>
+                                <property name="title" translatable="yes">Open a new window</property>
+                                <property name="visible">True</property>
+                            </object>
+                        </child>
+                        <child>
+                            <object class="GtkShortcutsShortcut">
+                                <property name="accelerator">&lt;Primary&gt;w</property>
+                                <property name="title" translatable="yes">Close a window</property>
+                                <property name="visible">True</property>
+                            </object>
+                        </child>
+                    </object>
+                </child>
+                <child>
+                    <object class="GtkShortcutsGroup">
+                        <property name="title" translatable="yes">Search</property>
+                        <property name="visible">True</property>
+                        <child>
+                            <object class="GtkShortcutsShortcut">
+                                <property name="accelerator">&lt;Primary&gt;f</property>
+                                <property name="title" translatable="yes">Find</property>
+                                <property name="visible">True</property>
+                            </object>
+                        </child>
+                    </object>
+                </child>
+            </object>
+        </child>
+    </object>
+</interface>
diff --git a/data/menus.ui b/data/menus.ui
index bc9b17f..1655df4 100644
--- a/data/menus.ui
+++ b/data/menus.ui
@@ -14,6 +14,10 @@
                 <attribute name="action">app.help</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">_About</attribute>
                 <attribute name="action">app.about</attribute>
             </item>
diff --git a/data/org.gnome.Logs.gresource.xml b/data/org.gnome.Logs.gresource.xml
index 46d38a3..f91a628 100644
--- a/data/org.gnome.Logs.gresource.xml
+++ b/data/org.gnome.Logs.gresource.xml
@@ -10,6 +10,7 @@
     <file preprocess='xml-stripblanks'>gl-window.ui</file>
   </gresource>
   <gresource prefix='/org/gnome/Logs/gtk'>
+    <file preprocess='xml-stripblanks'>help-overlay.ui</file>
     <file preprocess='xml-stripblanks'>menus.ui</file>
   </gresource>
 </gresources>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 37a6ee8..d21988d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,6 +2,7 @@
 [type: gettext/glade]data/gl-eventtoolbar.ui
 [type: gettext/glade]data/gl-eventviewdetail.ui
 [type: gettext/glade]data/gl-window.ui
+[type: gettext/glade]data/help-overlay.ui
 [type: gettext/glade]data/menus.ui
 data/org.gnome.Logs.appdata.xml.in
 data/org.gnome.Logs.desktop.in


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