Patchwork matchbox-session-sato: use a proper schema file

login
register
mail settings
Submitter Laurentiu Palcu
Date Dec. 18, 2012, 12:06 p.m.
Message ID <1355832412-1333-1-git-send-email-laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/41259/
State Accepted
Commit ccc394e7c6d3405b87fe862e50485f548b735da3
Headers show

Comments

Laurentiu Palcu - Dec. 18, 2012, 12:06 p.m.
Also, inheriting gconf.bbclass will allow for the schema registration to
be done at do_rootfs time.

[YOCTO #3603]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 .../matchbox-session-sato.schemas                  |   53 ++++++++++++++++++++
 .../matchbox-sato/matchbox-session-sato_0.1.bb     |   21 +++-----
 2 files changed, 60 insertions(+), 14 deletions(-)
 create mode 100644 meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas
Ross Burton - Dec. 18, 2012, 12:14 p.m.
On 18 December 2012 12:06, Laurentiu Palcu <laurentiu.palcu@intel.com> wrote:
> Also, inheriting gconf.bbclass will allow for the schema registration to
> be done at do_rootfs time.
>
> [YOCTO #3603]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>

Signed-off-by: Ross Burton <ross.burton@intel.com>

Ross

Patch

diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas b/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas
new file mode 100644
index 0000000..f5b770b
--- /dev/null
+++ b/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas
@@ -0,0 +1,53 @@ 
+<?xml version="1.0"?>
+<gconfschemafile>
+<schemalist>
+
+  <schema>
+    <key>/schemas/desktop/poky/interface/theme</key>
+    <applyto>/desktop/poky/interface/theme</applyto>
+    <type>string</type>
+    <owner>matchbox-session-sato</owner>
+    <default>Sato</default>
+    <locale name="C">
+      <short>Desktop theme</short>
+      <long>The theme name for Matchbox and Sato to use.</long>
+    </locale>
+  </schema>
+
+  <schema>
+    <key>/schemas/desktop/poky/interface/icon_theme</key>
+    <applyto>/desktop/poky/interface/icon_theme</applyto>
+    <type>string</type>
+    <owner>matchbox-session-sato</owner>
+    <default>Sato</default>
+    <locale name="C">
+      <short>Desktop icon theme</short>
+      <long>The icon theme name for Matchbox and Sato.</long>
+    </locale>
+  </schema>
+
+  <schema>
+    <key>/schemas/desktop/poky/interface/touchscreen</key>
+    <applyto>/desktop/poky/interface/touchscreen</applyto>
+    <type>bool</type>
+    <owner>matchbox-session-sato</owner>
+    <default>true</default>
+    <locale name="C">
+      <short>Activate touchscreen</short>
+    </locale>
+  </schema>
+
+  <schema>
+    <key>/schemas/desktop/poky/interface/font_name</key>
+    <applyto>/desktop/poky/interface/font_name</applyto>
+    <type>string</type>
+    <owner>matchbox-session-sato</owner>
+    <default>Sans 9</default>
+    <locale name="C">
+      <short>Font name</short>
+    </locale>
+  </schema>
+
+</schemalist>
+</gconfschemafile>
+
diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
index 10fd5b4..2d34754 100644
--- a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
+++ b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
@@ -16,7 +16,9 @@  PR = "r29"
 # based on the machine architecture.
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-SRC_URI = "file://session"
+SRC_URI = "file://session \
+           file://matchbox-session-sato.schemas \
+          "
 S = "${WORKDIR}"
 
 do_install() {
@@ -34,18 +36,9 @@  do_install() {
 	install -d ${D}/${sysconfdir}/matchbox
 	sed -f "$SCRIPT" ${S}/session > ${D}/${sysconfdir}/matchbox/session
         chmod +x ${D}/${sysconfdir}/matchbox/session
-}
-
-pkg_postinst_${PN} () {
-#!/bin/sh -e
-if [ "x$D" != "x" ]; then
-    exit 1
-fi
 
-. ${sysconfdir}/init.d/functions
-
-gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string --set /desktop/poky/interface/theme Sato
-gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string --set /desktop/poky/interface/icon_theme Sato
-gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type bool --set /desktop/poky/interface/touchscreen true
-gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string --set /desktop/poky/interface/font_name "Sans 9"
+	install -d ${D}/${sysconfdir}/gconf/schemas
+	install -m 664 ${S}/matchbox-session-sato.schemas ${D}/${sysconfdir}/gconf/schemas
 }
+
+inherit gconf