Icon / mime association..

Magnus Bergman magnus.bergman at observer.net
Fri Oct 13 19:05:48 EEST 2006


On Thu, 12 Oct 2006 14:56:49 -0400
Rodney Dawes <dobey at novell.com> wrote:

> 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.

Is this is some spec yet? I understand the problem, and in the common
case I think the solution is to not ship mime-icons with applications
(but with themes instead), but a better solution is of course
interesting. In this case however it is a vendor specific mimetype and
I assume that the vendor is the sole provider of an icon.

> > > 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.

The icon theme spec, through the examples [1]. But now I see it
explicitly says hyphens (dashes) in the icon naming spec. I guess the
icon theme spec should be updated then.

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

[1]
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#example



More information about the xdg mailing list