[gnome-games/wip/exalm/ds-popover: 10/10] Quick switch



commit 15f4c668a2e6c9ef1de5692159a74e13cf17701e
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Jan 8 02:58:26 2019 +0500

    Quick switch

 .../icons/screen-layout-quick-switch-symbolic.svg  | 82 ++++++++++++++++++++++
 plugins/nintendo-ds/data/nintendo-ds.gresource.xml |  1 +
 ...org.gnome.Games.plugins.nintendo-ds.gschema.xml |  3 +-
 .../src/nintendo-ds-layout-switcher.vala           |  9 ++-
 4 files changed, 93 insertions(+), 2 deletions(-)
---
diff --git a/plugins/nintendo-ds/data/icons/screen-layout-quick-switch-symbolic.svg 
b/plugins/nintendo-ds/data/icons/screen-layout-quick-switch-symbolic.svg
new file mode 100644
index 00000000..948de2cd
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/screen-layout-quick-switch-symbolic.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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";
+   width="16"
+   height="16"
+   version="1.1"
+   id="svg8"
+   sodipodi:docname="screen-layout-quick-switch-symbolic.svg"
+   inkscape:version="0.92.2 2405546, 2018-03-11">
+  <metadata
+     id="metadata14">
+    <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></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs12" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1016"
+     id="namedview10"
+     showgrid="true"
+     inkscape:zoom="22.627417"
+     inkscape:cx="4.8932382"
+     inkscape:cy="10.034779"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg8">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4526" />
+  </sodipodi:namedview>
+  <path
+     
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 8,1 c 0.942809,0 1.999979,1.057191 2,2 V 5 H 8 V 3 H 3 v 5 h 2 v 2 H 3 C 2.057191,10 
1.000021,8.942809 1,8 V 3 C 0.999979,2.057191 2.057191,1 3,1 Z"
+     id="path872"
+     inkscape:connector-curvature="0" />
+  <path
+     sodipodi:nodetypes="sccssccssccccc"
+     inkscape:connector-curvature="0"
+     id="path817"
+     d="m 13,6 c 0.942809,0 1.999979,1.057191 2,2 v 5 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 8 C 7.057191,15 
6.000021,13.942809 6,13 V 8 C 5.999979,7.057191 7.057191,6 8,6 Z m 0,2 H 8 v 5 h 5 z"
+     
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 />
+  <path
+     sodipodi:nodetypes="ccsccccc"
+     inkscape:connector-curvature="0"
+     id="path895"
+     d="M 24.277344,2 V 5 H 26 c 0.942809,0 2.000021,1.057191 2,2 v 2 h 3 V 2 Z"
+     
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:1.43412018;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
 />
+  <path
+     id="path897"
+     d="m 25,1 c -0.942809,0 -1.999979,1.057191 -2,2 v 2 h 2 V 3 h 5 v 5 h -2 v 2 h 2 c 0.942809,0 
1.999979,-1.057191 2,-2 V 3 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 z"
+     
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     inkscape:connector-curvature="0" />
+  <path
+     
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="m 20,6 c -0.942809,0 -1.999979,1.057191 -2,2 v 5 c -2.1e-5,0.942809 1.057191,2 2,2 h 5 c 0.942809,0 
1.999979,-1.057191 2,-2 V 8 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 z m 0,2 h 5 v 5 h -5 z"
+     id="path899"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="sccssccssccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/nintendo-ds.gresource.xml 
b/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
index a4f29c75..41429a0b 100644
--- a/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
+++ b/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
@@ -4,6 +4,7 @@
     <file>ui/nintendo-ds-layout-item.ui</file>
     <file>ui/nintendo-ds-layout-switcher.ui</file>
     <file>icons/screen-layout-left-right-symbolic.svg</file>
+    <file>icons/screen-layout-quick-switch-symbolic.svg</file>
     <file>icons/screen-layout-right-left-symbolic.svg</file>
     <file>icons/screen-layout-top-bottom-symbolic.svg</file>
   </gresource>
diff --git a/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml 
b/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml
index 0d48cc28..8e170f63 100644
--- a/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml
+++ b/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml
@@ -3,12 +3,13 @@
     <value nick="top/bottom" value="0"/>
     <value nick="left/right" value="1"/>
     <value nick="right/left" value="2"/>
+    <value nick="quick switch" value="3"/>
   </enum>
   <schema path="/org/gnome/Games/plugins/nintendo-ds/" id="org.gnome.Games.plugins.nintendo-ds" 
gettext-domain="gnome-games">
     <key name='screen-layout' enum='org.gnome.Games.plugins.nintendo-ds.screen-layouts'>
       <default>'top/bottom'</default>
       <summary>Screen layout</summary>
-      <description>Screen layout for Nintendo DS games. Allowed values are: “top/bottom”, “left/right” and 
"right/left".</description>
+      <description>Screen layout for Nintendo DS games. Allowed values are: “top/bottom”, “left/right”, 
“right/left” and “quick switch”.</description>
     </key>
   </schema>
 </schemalist>
diff --git a/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala 
b/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
index df0472dd..96c2c338 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
@@ -16,6 +16,7 @@ private class Games.NintendoDsLayoutSwitcher : Gtk.MenuButton {
                "top/bottom",
                "left/right",
                "right/left",
+               "quick switch",
        };
 
        static construct {
@@ -71,7 +72,10 @@ private class Games.NintendoDsLayoutSwitcher : Gtk.MenuButton {
                        return "screen-layout-left-right-symbolic";
 
                case "right/left":
-                       return "screen-layout-right/left-symbolic";
+                       return "screen-layout-right-left-symbolic";
+
+               case "quick switch":
+                       return "screen-layout-quick-switch-symbolic";
                }
 
                return "video-display-symbolic";
@@ -87,6 +91,9 @@ private class Games.NintendoDsLayoutSwitcher : Gtk.MenuButton {
 
                case "right/left":
                        return _("Right/Left");
+
+               case "quick switch":
+                       return _("Quick Switch");
                }
 
                return _("Unknown");


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