[gnome-games/wip/exalm/ds: 5/8] nintendo-ds: Add gsettings schema



commit a12a29de3dbecb5da64c86a2add166d29c8ab5b7
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 just top/bottom and left/right.

 plugins/nintendo-ds/data/meson.build                       |  8 ++++++++
 .../data/org.gnome.Games.plugins.nintendo-ds.gschema.xml   | 14 ++++++++++++++
 2 files changed, 22 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..0d48cc28
--- /dev/null
+++ b/plugins/nintendo-ds/data/org.gnome.Games.plugins.nintendo-ds.gschema.xml
@@ -0,0 +1,14 @@
+<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"/>
+  </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>
+    </key>
+  </schema>
+</schemalist>


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