Adding icon cache to kdelibs?

Rivo Laks rivolaks at hot.ee
Thu Jun 21 12:12:53 BST 2007


Ühel kenal päeval (neljapäev 21 juuni 2007) kirjutas Thiago Macieira:
> Stephan Kulow said:
> > Am Donnerstag 21 Juni 2007 schrieb Oswald Buddenhagen:
> >> On Tue, Jun 19, 2007 at 07:30:08PM +0300, Rivo Laks wrote:
> >> > There will also be some buildsystem changes (I think these should go
> >> > into 4.0 even if the cache itself won't). Whenever new icons are
> >> > installed, the icon theme dir's (e.g. share/icons/oxygen/) mtime has
> >> > to be updated, then the icon cache will pick up the changes.
> >>
> >> that's way too error prone. you don't really expect a random gnome theme
> >> developer to coply with this, do you? distributions would have to run
> >
> > Yeah, you can be pretty sure they already do:
> >   http://www.gtk.org/api/2.6/gtk/gtk-update-icon-cache.html
> >
> >> post-install scripts when installing themes.
> >
> > They already have. Thanks for worrying :)
>
> So says the icon theme spec:
> http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.htm
>l
>
> "This caching can make it impossible for users to add icons without having
> to restart applications. In order to handle this, any implementation that
> does caching is required to look at the mtime of the toplevel icon
> directories when doing a cache lookup, unless it already did so less than
> 5 seconds ago. This means that any icon editor or theme installation
> program need only to change the mtime of the the toplevel directory where
> it changed the theme to make sure that the new icons will eventually get
> used."

That's basically already in my todo list.

> This has met some resistance in the XDG mailing list. The arguments were:
> 1) lazy packagers forget to touch the directory
> 2) installing from tarballs doesn't offer such an opportunity.
>
> #2 is a real case. #1 isn't.

If a user can unpack the tarball into the right directory, couldn't we assume 
that he can also execute 'touch -m /usr/share/icons/hicolor' or similar? 
(sure, we'd need to make sure every icon provider ships those instructions 
with the icons then)

A better alternative might be to add a small icon installer to the KControl 
(we already have icon theme installer, so why not). It would take the 
tarball, unpack it to the correct dir and update the dir's mtime.

Rivo




More information about the kde-core-devel mailing list