Icon / mime association..

Rodney Dawes dobey at novell.com
Thu Oct 12 21:56:49 EEST 2006


On Thu, 2006-10-12 at 17:24 +0200, Magnus Bergman wrote:
> On Wed, 11 Oct 2006 21:25:22 +0300
> Kustaa Nyholm <feedback2 at sparetimelabs.com> wrote:
> 
> > Magnus Bergman wrote:
> >   The icon for a mimetype is expected to be in
> > > DATADIR/icons/THEME/*/mimetypes. In other words, the icon used
> > > depends on the current theme [3]. 
> > First of all, thank you for taking the trouble to explain.
> > 
> > I'm almost there but after experimenting with Ubuntu for an hour now
> > I still do not get it to work for me.
> > 
> > Gnome shows the mime type correctly for my document files and when I
> > double click them the application launches correctly. And I've even
> > got a nice icon for my application showing up in the 'applications'
> > folder.
> > 
> > But I can't figure out the correct name / place for the icon for mime
> > types.
> > 
> > I think it should be in
> > /usr/share/icons/hicolor/48x48/mimetypes
> 
> Yes, that is correct. If you use autoconf it is a good idea to
> place it get the datadir from there instead of assuming it to
> be /usr/share.

This is actually a bad idea. If another application handles the type,
and wants to provide a custom icon for the mime type, and tries to
install it in the same place, we have a file conflict. See the related
mails from Alex L. to this same list, for a proposed solution, where the
MIME type XML file specifies a list of fallback icons to fall back
through.

> > but what is the correct file name  given my mime type
> > 'application/vnd.jdwg' ?
> 
> The spec implicitly says that the slashes and hyphens should be
> replaced by underscores. It doesn't seem to say anything about the dot
> thou. Looking at the Gnome icon theme you can see it has hyphens
> instead of underscores in the filenames so that seems to work too. But
> according to the spec I'd say I should be:

Which spec says this? I was to understand that the MIME spec had been
changed to match the Icon Naming spec, as previously the MIME spec had
been suggesting what RoX did, which was different from both GNOME and
KDE on a large level.

> application_vnd.jdwg.png

Actually, it should be application-vnd.jdwg.{png,svg} in this case.

-- dobey





More information about the xdg mailing list