Associating mime types with icons - broken?

Thomas Leonard tal at ecs.soton.ac.uk
Mon Mar 21 22:11:44 EET 2005


On Mon, Mar 21, 2005 at 07:18:41PM +0000, Mike Hearn wrote:
> Hi,
> 
> I've spent the last few hours trying to figure out how you can add an icon
> for a MIME type for some 3rd party software. Unfortunately there are a few
> problems:
> 
> - Firstly the icon theme spec is extremely vague about this, it doesn't
>   mention mime types explicitly anywhere, nor does it mention how
>   a mimetype like application/x-foo is translated to an icon theme name
> 
> - Secondly GNOME apparently refuses to use any icon that doesn't start
>   with gnome-mime- so that is what I have to call my icon. I haven't
>   tested this in KDE. 
> 
> - Thirdly adding a new icon seems to require doing a "killall nautilus"
>   to have it detected. I tried touching /usr/share/icons which is what I
>   guessed the spec meant by "top level directory" but no cigar.
> 
> Can anybody help me? The spec certainly needs clarifying on the matter,
> but before I can write a patch I need to know what the intended behaviour
> is!

It certainly does. The method ROX uses is documented only at the bottom
of the shared MIME spec page:

	"The icon name is of the form mime-media:subtype (for example:
	mime-text:plain). If no specific icon is found, fallback to
	mime-media (eg, mime-text). Note that there is an older
	(GNOME-specific) set of icon names. These do not correspond to
	the MIME names used in this new database, although they may be
	useful as a fallback. See the 'Mime Icons and weak aliases
	thread' for the discussion leading to this. However, the colon
	character has been reported to cause problems for users of
	Windows and MacOS X systems."

If we can agree on some naming scheme (preferably one that doesn't have
all the names starting with "gnome-", and doesn't annoy Windows/Mac
users) then I'll update ROX to use that.


-- 
Thomas Leonard                  http://rox.sourceforge.net
tal at ecs.soton.ac.uk          tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1



More information about the xdg mailing list