[hitori/jbicha/hitori-keyboard-shortcuts-dialog] Add Keyboard Shortcuts dialog
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hitori/jbicha/hitori-keyboard-shortcuts-dialog] Add Keyboard Shortcuts dialog
- Date: Mon, 13 May 2019 11:44:53 +0000 (UTC)
commit 7c6a20b628860b8b544c8e84572a1ddc0be3177e
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Tue Feb 19 16:36:38 2019 -0500
Add Keyboard Shortcuts dialog
This bumps the GTK dependency to 3.22.
(Tweaked by Philip Withnall to bump the GTK dependency.)
data/help-overlay.ui | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
data/hitori.ui | 4 +++
meson.build | 2 +-
po/POTFILES.in | 1 +
src/hitori.gresource.xml | 3 ++
5 files changed, 82 insertions(+), 1 deletion(-)
---
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
new file mode 100644
index 0000000..6ffdfbb
--- /dev/null
+++ b/data/help-overlay.ui
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.22 -->
+ <object class="GtkShortcutsWindow" id="help_overlay">
+ <property name="modal">1</property>
+ <child>
+ <object class="GtkShortcutsSection">
+ <property name="visible">1</property>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">1</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="action-name">app.new-game</property>
+ <property name="title" translatable="yes" context="shortcut window">Start a new
game</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator"><Ctrl> <Shift></property>
+ <property name="title" translatable="yes" context="shortcut window">Highlight a
cell</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="action-name">win.undo</property>
+ <property name="title" translatable="yes" context="shortcut window">Undo your last
move</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="action-name">win.redo</property>
+ <property name="title" translatable="yes" context="shortcut window">Redo a move</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="action-name">win.hint</property>
+ <property name="title" translatable="yes" context="shortcut window">Get a hint for your next
move</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="action-name">app.help</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"><Primary>question <Primary>F1</property>
+ <property name="title" translatable="yes" context="shortcut window">Show Keyboard
Shortcuts</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator"><Ctrl>Q</property>
+ <property name="title" translatable="yes" context="shortcut window">Quit</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/data/hitori.ui b/data/hitori.ui
index c53515a..e7a337c 100644
--- a/data/hitori.ui
+++ b/data/hitori.ui
@@ -46,6 +46,10 @@
</submenu>
</section>
<section>
+ <item>
+ <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
+ <attribute name="action">win.show-help-overlay</attribute>
+ </item>
<item>
<attribute name="action">app.help</attribute>
<attribute name="label" translatable="yes">_Help</attribute>
diff --git a/meson.build b/meson.build
index 087169b..3fae497 100644
--- a/meson.build
+++ b/meson.build
@@ -16,7 +16,7 @@ application_id = 'org.gnome.Hitori'
# Dependencies
glib_dependency = dependency('glib-2.0')
gio_dependency = dependency('gio-2.0', version: '>= 2.32')
-gtk_dependency = dependency('gtk+-3.0', version: '>= 3.15.0')
+gtk_dependency = dependency('gtk+-3.0', version: '>= 3.22.0')
gmodule_dependency = dependency('gmodule-2.0')
cairo_dependency = dependency('cairo', version: '>= 1.4')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7cfb5d0..7c025d1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
# List of source files containing translatable strings.
data/org.gnome.Hitori.desktop.in
data/org.gnome.Hitori.appdata.xml.in
+data/help-overlay.ui
data/hitori.ui
data/org.gnome.hitori.gschema.xml
src/interface.c
diff --git a/src/hitori.gresource.xml b/src/hitori.gresource.xml
index 9ad813a..b37ec15 100644
--- a/src/hitori.gresource.xml
+++ b/src/hitori.gresource.xml
@@ -4,4 +4,7 @@
<file preprocess="xml-stripblanks" alias="hitori.ui">./data/hitori.ui</file>
<file alias="hitori.css">./data/hitori.css</file>
</gresource>
+ <gresource prefix="/org/gnome/Hitori/gtk">
+ <file preprocess="xml-stripblanks" alias="help-overlay.ui">./data/help-overlay.ui</file>
+ </gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]