[tali] Add Keyboard Shortcuts overlay
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tali] Add Keyboard Shortcuts overlay
- Date: Mon, 10 Dec 2018 19:49:16 +0000 (UTC)
commit d80c1b62c2efc56726ae4712e50825ce657eacb9
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Mon Dec 10 12:57:38 2018 -0500
Add Keyboard Shortcuts overlay
data/help-overlay.ui | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++
data/tali-menus.ui | 4 +++
po/POTFILES.in | 1 +
src/tali.gresource.xml | 3 ++
4 files changed, 102 insertions(+)
---
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
new file mode 100644
index 0000000..ff903f1
--- /dev/null
+++ b/data/help-overlay.ui
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.17 -->
+ <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="accelerator"><Ctrl>N</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>R</property>
+ <property name="title" translatable="yes" context="shortcut window">Roll the dice</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">1</property>
+ <property name="title" translatable="yes" context="shortcut window">Toggle the first
die</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">2</property>
+ <property name="title" translatable="yes" context="shortcut window">Toggle the second
die</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">3</property>
+ <property name="title" translatable="yes" context="shortcut window">Toggle the third
die</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">4</property>
+ <property name="title" translatable="yes" context="shortcut window">Toggle the fourth
die</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">5</property>
+ <property name="title" translatable="yes" context="shortcut window">Toggle the fifth
die</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator"><Ctrl>Z</property>
+ <property name="title" translatable="yes" context="shortcut window">Undo move</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator">F1</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/tali-menus.ui b/data/tali-menus.ui
index 20f4149..bf02785 100644
--- a/data/tali-menus.ui
+++ b/data/tali-menus.ui
@@ -17,6 +17,10 @@
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</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>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index edd1d5b..1f00ad8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file in alphabetical order.
+data/help-overlay.ui
data/tali.appdata.xml.in
data/tali.desktop.in
data/tali-menus.ui
diff --git a/src/tali.gresource.xml b/src/tali.gresource.xml
index a88deba..6fc7b92 100644
--- a/src/tali.gresource.xml
+++ b/src/tali.gresource.xml
@@ -7,4 +7,7 @@
<gresource prefix="/org/gnome/tali/ui">
<file preprocess="xml-stripblanks" alias="menus.ui">../data/tali-menus.ui</file>
</gresource>
+ <gresource prefix="/org/gnome/tali/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]