Adding icon cache to kdelibs?
Lubos Lunak
l.lunak at kde.org
Thu Jun 21 22:07:52 BST 2007
On čt 21. června 2007, Rivo Laks wrote:
> Ühel kenal päeval (neljapäev 21 juuni 2007) kirjutas Rex Dieter:
> > Rivo, since an implementation of an icon cache already exists (gtk2), any
> > interest in coordinating a common implementation?
> >
> > I ask selfishly, since I've been trying for ages to make icon handling
> > "just work" for Fedora, but have been meeting with some resistance (ie,
> > *every* icon-installing pkg currently must run/use gtk-update-icon-cache,
> > which I think is utter silliness). See also:
> > http://fedoraproject.org/wiki/PackagingDrafts/ScriptletSnippets/iconcache
>
> I don't think what I'm working on would be compatible with the GTK
> implementation.
> GTK implementation seems to be about putting all of icontheme's icons into
> one file and then mmapping it so the icons would be shared between apps (I
> might be wrong though since I'm not that familiar with gtk's cache).
That is correct, AFAIK - the reasons for the gtk icon cache were that gtk for
some reason wastes quite some memory and mmaping the icon data as shared
memory helps. (BTW, your iconcache simply reading the data from QFile and not
using mmap is final solution? If yes, it might make sense to measure its
overhead.)
Moreover I think that something like a cache is rather toolkit-specific and
having something like a spec for the actual cache would hinder its
development.
> My implementation caches only icons which have actually been used, in a
> compressed form. It's also not strictly icontheme specific, e.g. if oxygen
> theme inherits hicolor theme then both icons will end up in one cache (not
> sure how gtk cache handles it). Also, in addition to png images, it can
> cache icons rendered from svg files.
>
> BTW, is running gtk-update-icon-cache really that painful?
Gtk-update-icon-cache discards and rebuilds the whole cache, so presumably it
can be rather costly. There should be no problems with icons in our case
though, as far as packagers are concerned - just doing what's already
required, i.e. touching the toplevel dir, should be enough.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http//www.suse.cz
More information about the kde-core-devel
mailing list