On Mon, 2011-12-05 at 10:48 -0800, Eric Smith wrote:
I just learned in a package review about the requirement to update
the
icon cache:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
I'm checking my other packages that have icons. I discovered that one
of my packages installs its icon into /usr/share/pixmap, rather than
under /usr/share/icons/<something>. This raises two questions:
1) Is putting the icon into /usr/share/pixmap OK?
Not really. That dir is obsolescent, effectively. I'm not sure if we'll
ever manage to throw it away, but if you have the opportunity to control
icon deployment for an app, it's really best to use the /usr/share/icons
hierarchy, as it provides a lot of advantages over the 'dump a single
picture in one huge directory' model.
I think I copied
this from another package, and certainly there are other applications
that have their icons there. If putting the icon into /usr/share/pixmap
isn't the best practice, how do I know which subdir of /usr/share/icons
to use? Is there a document that defines the purpose or requirements
for the various subdirs?
Yes, the icon theme specification:
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
Basically, when you're just shipping an icon for an application, it is
always going to go into hicolor. Other-named subdirectories are icon
themes: if you pick an icon theme, icons from that theme's directory
will be used in preference to the ones in hicolor, if they exist.
Hicolor is the 'universal fallback' for icons which don't specifically
exist in whatever theme the user may have chosen. So that's where you
put your app's default icon. As the spec puts it:
"In order to have a place for third party applications to install their
icons there should always exist a theme called "hicolor" [1]. The data
for the hicolor theme is available for download at:
http://www.freedesktop.org/software/icon-theme/. Implementations are
required to look in the "hicolor" theme if an icon was not found in the
current theme."
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net