[gnome-games/wip/aplazas/gamepad-shoulders-view: 12/12] shortcuts-window: Add the gamepad view selection shortcut



commit d14c9971cc3d09990647fc0ebb87a3f674c3bc8d
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Aug 3 19:53:33 2018 +0200

    shortcuts-window: Add the gamepad view selection shortcut

 data/gesture/shoulders-front-symbolic.svg | 154 ++++++++++++++++++++++++++++++
 data/org.gnome.Games.gresource.xml        |   1 +
 data/ui/shortcuts-window.ui               |   8 ++
 src/ui/shortcuts-window.vala              |   3 +
 4 files changed, 166 insertions(+)
---
diff --git a/data/gesture/shoulders-front-symbolic.svg b/data/gesture/shoulders-front-symbolic.svg
new file mode 100644
index 00000000..1e174c51
--- /dev/null
+++ b/data/gesture/shoulders-front-symbolic.svg
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   sodipodi:docname="shoulders-front-symbolic.svg"
+   height="64"
+   id="svg7384"
+   inkscape:version="0.92.2 2405546, 2018-03-11"
+   version="1.1"
+   width="64">
+  <metadata
+     id="metadata90">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title>Gnome Symbolic Icon Theme</dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     inkscape:bbox-paths="false"
+     bordercolor="#666666"
+     borderopacity="1"
+     inkscape:current-layer="layer11"
+     inkscape:cx="28.96304"
+     inkscape:cy="31.52473"
+     gridtolerance="10"
+     inkscape:guide-bbox="true"
+     guidetolerance="10"
+     id="namedview88"
+     inkscape:object-nodes="false"
+     inkscape:object-paths="false"
+     objecttolerance="10"
+     pagecolor="#555753"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     showborder="false"
+     showgrid="true"
+     showguides="true"
+     inkscape:snap-bbox="true"
+     inkscape:snap-bbox-midpoints="false"
+     inkscape:snap-global="true"
+     inkscape:snap-grids="true"
+     inkscape:snap-nodes="false"
+     inkscape:snap-others="false"
+     inkscape:snap-to-guides="true"
+     inkscape:window-height="1016"
+     inkscape:window-maximized="1"
+     inkscape:window-width="1920"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:zoom="11.313708">
+    <inkscape:grid
+       empspacing="2"
+       enabled="true"
+       id="grid4866"
+       snapvisiblegridlinesonly="true"
+       spacingx="1"
+       spacingy="1"
+       type="xygrid"
+       visible="true"
+       originx="0"
+       originy="0" />
+  </sodipodi:namedview>
+  <title
+     id="title9167">Gnome Symbolic Icon Theme</title>
+  <defs
+     id="defs7386" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer9"
+     inkscape:label="status"
+     style="display:inline"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer10"
+     inkscape:label="devices"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer11"
+     inkscape:label="apps"
+     transform="translate(-283,-601)">
+    <path
+       
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 289,638 c -2.82843,0 -6,3.17157 -6,6 v 3 c 0,2.82843 3.17157,6 6,6 h 21 v -15 z"
+       id="path829"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssssccs" />
+    <path
+       sodipodi:nodetypes="ssssccsscccsss"
+       inkscape:connector-curvature="0"
+       id="path878"
+       d="m 310,618 c 0,-2.82843 -3.17157,-6 -6,-6 h -9 c -2.82843,0 -6.31235,3.18887 -6,6 v 18 h 21 z m 
-3,0 v 15 h -15 v -15 c 0.27735,-1.38675 1.58579,-3 3,-3 h 9 c 1.41421,0 3,1.58579 3,3 z"
+       
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+    <path
+       sodipodi:nodetypes="ssssccs"
+       inkscape:connector-curvature="0"
+       id="path880"
+       d="m 341,638 c 2.82843,0 6,3.17157 6,6 v 3 c 0,2.82843 -3.17157,6 -6,6 h -21 v -15 z"
+       
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+    <path
+       
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 320,618 c 0,-2.82843 3.17157,-6 6,-6 h 9 c 2.82843,0 6.31235,3.18887 6,6 v 18 h -21 z m 3,0 v 15 
h 15 v -15 c -0.27735,-1.38675 -1.58579,-3 -3,-3 h -9 c -1.41421,0 -3,1.58579 -3,3 z"
+       id="path882"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssssccsscccsss" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer13"
+     inkscape:label="places"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer14"
+     inkscape:label="mimetypes"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer15"
+     inkscape:label="emblems"
+     style="display:inline"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="g71291"
+     inkscape:label="emotes"
+     style="display:inline"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="g4953"
+     inkscape:label="categories"
+     style="display:inline"
+     transform="translate(-283,-601)" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer12"
+     inkscape:label="actions"
+     style="display:inline"
+     transform="translate(-283,-601)" />
+</svg>
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 73e9baf0..dc309b63 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -8,6 +8,7 @@
     <file preprocess="xml-stripblanks">gesture/button-south-symbolic.svg</file>
     <file preprocess="xml-stripblanks">gesture/button-start-symbolic.svg</file>
     <file preprocess="xml-stripblanks">gesture/dpad-symbolic.svg</file>
+    <file preprocess="xml-stripblanks">gesture/shoulders-front-symbolic.svg</file>
     <file preprocess="xml-stripblanks">gesture/stick-symbolic.svg</file>
     <file preprocess="xml-stripblanks">ui/application-window.ui</file>
     <file preprocess="xml-stripblanks">ui/checkmark-item.ui</file>
diff --git a/data/ui/shortcuts-window.ui b/data/ui/shortcuts-window.ui
index 6e0d27a4..2b73d330 100644
--- a/data/ui/shortcuts-window.ui
+++ b/data/ui/shortcuts-window.ui
@@ -49,6 +49,14 @@
                 <property name="subtitle" translatable="yes" context="shortcut window">Directional 
pad</property>
               </object>
             </child>
+            <child>
+              <object class="GtkShortcutsShortcut" id="collection_shortcut_shoulders_front">
+                <property name="visible">True</property>
+                <property name="shortcut-type">gesture</property>
+                <property name="title" translatable="yes" context="shortcut window">Select view</property>
+                <property name="subtitle" translatable="yes" context="shortcut window">Front shoulder 
buttons</property>
+              </object>
+            </child>
             <child>
               <object class="GtkShortcutsShortcut" id="collection_shortcut_start">
                 <property name="visible">True</property>
diff --git a/src/ui/shortcuts-window.vala b/src/ui/shortcuts-window.vala
index 3d40be36..7a665bab 100644
--- a/src/ui/shortcuts-window.vala
+++ b/src/ui/shortcuts-window.vala
@@ -7,6 +7,8 @@ private class Games.ShortcutsWindow : Gtk.ShortcutsWindow {
        [GtkChild]
        private Gtk.ShortcutsShortcut collection_shortcut_dpad;
        [GtkChild]
+       private Gtk.ShortcutsShortcut collection_shortcut_shoulders_front;
+       [GtkChild]
        private Gtk.ShortcutsShortcut collection_shortcut_start;
        [GtkChild]
        private Gtk.ShortcutsShortcut collection_shortcut_south;
@@ -24,6 +26,7 @@ private class Games.ShortcutsWindow : Gtk.ShortcutsWindow {
 
                collection_shortcut_left_stick.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/stick-symbolic.svg");
                collection_shortcut_dpad.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/dpad-symbolic.svg");
+               collection_shortcut_shoulders_front.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/shoulders-front-symbolic.svg");
                collection_shortcut_start.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/button-start-symbolic.svg");
                collection_shortcut_south.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/button-south-symbolic.svg");
                ingame_shortcut_home.icon = icon_for_uri 
("resource:///org/gnome/Games/gesture/button-home-symbolic.svg");


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