]> code.ossystems Code Review - openembedded-core.git/commitdiff
sato-icon-theme: use gtk-icon-cache helper class
authorRoss Burton <ross.burton@intel.com>
Thu, 4 Oct 2012 11:19:03 +0000 (12:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Oct 2012 13:04:03 +0000 (14:04 +0100)
Instead of explicitly updating the icon cache use the helper class that also
forces a loader update at the same time.  This eliminates the possibility of
updating the icon cache without any gdk-pixbuf loaders.

Also check that the Sato icon theme isn't already set to avoid appending to the
file every time the postinst runs.

[YOCTO #2399]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb

index 9fd10126c1eead05ea6327a9530e856d727ebbe5..0bd48143a945432f512b86d9a85a525d732b806c 100644 (file)
@@ -8,18 +8,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=56a830bbe6e4697fe6cbbae01bb7c2b2"
 SECTION = "x11"
 DEPENDS = ""
 
-inherit autotools pkgconfig allarch
+inherit autotools pkgconfig allarch gtk-icon-cache
 
 FILES_${PN} += "${datadir}"
 
 EXTRA_OECONF += "--with-iconmap=${STAGING_LIBDIR_NATIVE}/../libexec/icon-name-mapping"
 
-#explictly setting "Sato" as default icon theme to avoid icon missing due to
-#tricky race condition
+# Explictly setting "Sato" as the default icon theme to avoid flickering from
+# the desktop and settings daemon racing.  This shouldn't be done here but in the sato image
 pkg_postinst_${PN} () {
-        if [ "x$D" != "x" ]; then
-                exit 1
-        fi
-        gtk-update-icon-cache -q /usr/share/icons/Sato
-        echo 'gtk-icon-theme-name = "Sato"' >> /etc/gtk-2.0/gtkrc
+    mkdir -p $D/etc/gtk-2.0
+
+    grep -s -q -e ^gtk-icon-theme-name.*\"Sato\" $D/etc/gtk-2.0/gtkrc || \
+        echo 'gtk-icon-theme-name = "Sato"' >> $D/etc/gtk-2.0/gtkrc
 }
index 108f8e81aeabffdf249e82efde24e7cb0fc96a75..64053598bcb0841826004c0fe086a1e39541f083 100644 (file)
@@ -2,7 +2,7 @@ require sato-icon-theme.inc
 
 DEPENDS += "icon-naming-utils-native"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "http://pokylinux.org/releases/sato/${BPN}-${PV}.tar.gz \
            file://iconpath-option.patch \