summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid King <davidk@gnome.org>2015-12-08 17:37:06 +0000
committerDavid King <davidk@gnome.org>2015-12-08 17:37:26 +0000
commit2f343d474c434beec7cec68a39d86f8cc7ce12fc (patch)
tree6f6eeeeac2bc77595b25f52a41c882e8c667f9c0
parent1fa389af6d21ca4919b025ff020ebd2fbc8182e5 (diff)
downloadgnome-logs-wip/shortcuts.tar.gz
Use GtkShortcutsWindowwip/shortcuts
-rw-r--r--configure.ac2
-rw-r--r--data/help-overlay.ui42
-rw-r--r--data/menus.ui4
-rw-r--r--data/org.gnome.Logs.gresource.xml1
4 files changed, 48 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..68dd94c
--- /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="name" 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="name" 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>