[gnome-games/wip/exalm/ds: 12/21] nintendo-ds: Add gsettings schema



commit b910605f143160a876a25242adac7af77e56e8e2
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Jan 6 20:45:03 2019 +0500

    nintendo-ds: Add gsettings schema
    
    Provide an option to change screen layout. For now the available values
    are 'top/bottom', 'left/right', 'right/left' and 'quick switch'.
    
    Also provide a key to store the quick switch state.

 plugins/nintendo-ds/data/meson.build                 |  8 ++++++++
 .../org.gnome.Games.plugins.nintendo-ds.gschema.xml  | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+)
---
diff --git a/plugins/nintendo-ds/data/meson.build b/plugins/nintendo-ds/data/meson.build
index 0d4b6c49..007c8981 100644
--- a/plugins/nintendo-ds/data/meson.build
+++ b/plugins/nintendo-ds/data/meson.build
@@ -1 +1,9 @@
 install_data (plugin_name + '.plugin', install_dir: plugins_dir)
+
+configure_file (
+  input: 'org.gnome.Games.plugins.nintendo-ds.gschema.xml',
+  output: 'org.gnome.Games.plugins.nintendo-ds.gschema.xml',
+  configuration: gsettings_conf,
+  install: true,
+  install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
+)
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
new file mode 100644
index 00000000..230e5398
--- /dev/null
+++ b/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml
@@ -0,0 +1,20 @@
+<schemalist>
+  <enum id="org.gnome.Games.plugins.nintendo-ds.screen-layouts">
+    <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”, 
“right/left” and “quick switch”.</description>
+    </key>
+    <key name='view-bottom-screen' type="b">
+      <default>false</default>
+      <summary>View bottom screen</summary>
+      <description>Whether to view top or bottom screen in quick switch mode.</description>
+    </key>
+  </schema>
+</schemalist>


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