[gnome-games/wip/aplazas/app-menu] ui: Add ShortcutsWindow



commit 81359898661ccd99f022648237994fe8da9bbae3
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Jun 23 11:10:12 2018 +0200

    ui: Add ShortcutsWindow
    
    It will be used in the next commit to display the appliation's
    shortcuts.

 data/Makefile.am                   |  1 +
 data/org.gnome.Games.gresource.xml |  1 +
 data/ui/shortcuts-window.ui        | 72 ++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in                     |  1 +
 src/Makefile.am                    |  1 +
 src/ui/shortcuts-window.vala       |  5 +++
 6 files changed, 81 insertions(+)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 0d1c38f..d36c5fe 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -55,6 +55,7 @@ EXTRA_DIST = \
        ui/resume-dialog.ui \
        ui/resume-failed-dialog.ui \
        ui/search-bar.ui \
+       ui/shortcuts-window.ui \
        $(NULL)
 
 CLEANFILES = \
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index f371ccb..0f92782 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -34,5 +34,6 @@
     <file preprocess="xml-stripblanks">ui/resume-dialog.ui</file>
     <file preprocess="xml-stripblanks">ui/resume-failed-dialog.ui</file>
     <file preprocess="xml-stripblanks">ui/search-bar.ui</file>
+    <file preprocess="xml-stripblanks">ui/shortcuts-window.ui</file>
   </gresource>
 </gresources>
diff --git a/data/ui/shortcuts-window.ui b/data/ui/shortcuts-window.ui
new file mode 100644
index 0000000..cd3074d
--- /dev/null
+++ b/data/ui/shortcuts-window.ui
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <template class="GamesShortcutsWindow" parent="GtkShortcutsWindow">
+    <property name="modal">1</property>
+    <child>
+      <object class="GtkShortcutsSection">
+        <property name="max-height">12</property>
+        <property name="section-name">shortcuts</property>
+        <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="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Quit</property>
+                <property name="accelerator">&lt;Primary&gt;Q</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="title" translatable="yes">Collection</property>
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Search</property>
+                <property name="accelerator">&lt;Primary&gt;F</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Escape search</property>
+                <property name="accelerator">Escape</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="title" translatable="yes">In Game</property>
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Toggle 
ullscreen</property>
+                <property name="accelerator">&lt;Primary&gt;F F11</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Escape 
fullscreen</property>
+                <property name="accelerator">Escape</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Go back to the 
collection</property>
+                <property name="accelerator">&lt;alt&gt;Left &lt;alt&gt;Right</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 856ec9c..4d070c6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -22,6 +22,7 @@ data/org.gnome.Games.gschema.xml
 [type: gettext/glade]data/ui/reset-controller-mapping-dialog.ui
 [type: gettext/glade]data/ui/resume-dialog.ui
 [type: gettext/glade]data/ui/resume-failed-dialog.ui
+[type: gettext/glade]data/ui/shortcuts-window.ui
 plugins/desktop/src/desktop-plugin.vala
 plugins/dreamcast/src/dreamcast-header.vala
 plugins/game-cube/src/game-cube-header.vala
diff --git a/src/Makefile.am b/src/Makefile.am
index bd576d2..902ec24 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -144,6 +144,7 @@ gnome_games_SOURCES = \
        ui/resume-dialog.vala \
        ui/resume-failed-dialog.vala \
        ui/search-bar.vala \
+       ui/shortcuts-window.vala \
        ui/ui-state.vala \
        \
        utils/composite-cover.vala \
diff --git a/src/ui/shortcuts-window.vala b/src/ui/shortcuts-window.vala
new file mode 100644
index 0000000..bda9771
--- /dev/null
+++ b/src/ui/shortcuts-window.vala
@@ -0,0 +1,5 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/shortcuts-window.ui")]
+private class Games.ShortcutsWindow : Gtk.ShortcutsWindow {
+}


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