[gnome-games] shortcuts-window: List the savestates shortcuts



commit ab5d40568a0cd22fb74736129afbdcf0f956e012
Author: Yetizone <andreii lisita gmail com>
Date:   Fri Aug 16 21:29:26 2019 +0300

    shortcuts-window: List the savestates shortcuts

 data/ui/shortcuts-window.ui  | 35 ++++++++++++++++++++++++++++-------
 src/ui/shortcuts-window.vala |  5 +++--
 2 files changed, 31 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/shortcuts-window.ui b/data/ui/shortcuts-window.ui
index 76a42e38..a3c6a92a 100644
--- a/data/ui/shortcuts-window.ui
+++ b/data/ui/shortcuts-window.ui
@@ -14,6 +14,13 @@
           <object class="GtkShortcutsGroup">
             <property name="title" translatable="yes">General</property>
             <property name="visible">True</property>
+            <child>
+              <object class="GtkShortcutsShortcut" id="general_shortcut_alt_left">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Go back</property>
+                <property name="accelerator">&lt;alt&gt;Left &lt;alt&gt;Right</property>
+              </object>
+            </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
@@ -88,22 +95,36 @@
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
-                <property name="title" translatable="yes" context="shortcut window">Toggle 
fullscreen</property>
-                <property name="accelerator">&lt;Primary&gt;F F11</property>
+                <property name="title" translatable="yes" context="shortcut window">Create new 
savestate</property>
+                <property name="accelerator">&lt;ctrl&gt;S F2</property>
               </object>
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
-                <property name="title" translatable="yes" context="shortcut window">Exit 
fullscreen</property>
-                <property name="accelerator">Escape</property>
+                <property name="title" translatable="yes" context="shortcut window">Load the latest 
savestate</property>
+                <property name="accelerator">&lt;ctrl&gt;D F3</property>
               </object>
             </child>
             <child>
-              <object class="GtkShortcutsShortcut" id="ingame_shortcut_alt_left">
+              <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>
+                <property name="title" translatable="yes" context="shortcut window">Show 
savestates</property>
+                <property name="accelerator">&lt;ctrl&gt;A F4</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">True</property>
+                <property name="title" translatable="yes" context="shortcut window">Toggle 
fullscreen</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">Exit 
fullscreen</property>
+                <property name="accelerator">Escape</property>
               </object>
             </child>
             <child>
diff --git a/src/ui/shortcuts-window.vala b/src/ui/shortcuts-window.vala
index b4dc2c0f..5c883467 100644
--- a/src/ui/shortcuts-window.vala
+++ b/src/ui/shortcuts-window.vala
@@ -3,7 +3,7 @@
 [GtkTemplate (ui = "/org/gnome/Games/ui/shortcuts-window.ui")]
 private class Games.ShortcutsWindow : Gtk.ShortcutsWindow {
        [GtkChild]
-       private Gtk.ShortcutsShortcut ingame_shortcut_alt_left;
+       private Gtk.ShortcutsShortcut general_shortcut_alt_left;
 
        construct {
                update_direction ();
@@ -11,6 +11,7 @@ private class Games.ShortcutsWindow : Gtk.ShortcutsWindow {
 
        [GtkCallback]
        private void update_direction () {
-               ingame_shortcut_alt_left.accelerator = get_direction () == Gtk.TextDirection.LTR ? 
"<alt>Left" : "<alt>Right";
+               general_shortcut_alt_left.accelerator = get_direction () == Gtk.TextDirection.LTR ? 
"<alt>Left" : "<alt>Right";
        }
 }
+


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