* [PATCH] sato-icon-theme: use gtk-icon-cache helper class
@ 2012-10-04 11:19 Ross Burton
2012-10-05 16:07 ` Saul Wold
0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2012-10-04 11:19 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc | 15 +++++++--------
.../sato-icon-theme/sato-icon-theme_0.4.1.bb | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
index 9fd1012..0bd4814 100644
--- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
+++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
@@ -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
}
diff --git a/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb b/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
index 108f8e8..6405359 100644
--- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
+++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
@@ -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 \
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] sato-icon-theme: use gtk-icon-cache helper class
2012-10-04 11:19 [PATCH] sato-icon-theme: use gtk-icon-cache helper class Ross Burton
@ 2012-10-05 16:07 ` Saul Wold
0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-10-05 16:07 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
On 10/04/2012 04:19 AM, Ross Burton wrote:
> 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>
> ---
> meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc | 15 +++++++--------
> .../sato-icon-theme/sato-icon-theme_0.4.1.bb | 2 +-
> 2 files changed, 8 insertions(+), 9 deletions(-)
>
Merged into OE-Core
Thanks
Sau!
> diff --git a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> index 9fd1012..0bd4814 100644
> --- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> +++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme.inc
> @@ -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
> }
> diff --git a/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb b/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
> index 108f8e8..6405359 100644
> --- a/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
> +++ b/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
> @@ -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 \
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-05 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-04 11:19 [PATCH] sato-icon-theme: use gtk-icon-cache helper class Ross Burton
2012-10-05 16:07 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox