Bug 17809 - add field to specify substitutive icon name for mime type when the dedicated is unavailable
Summary: add field to specify substitutive icon name for mime type when the dedicated ...
Status: RESOLVED NOTABUG
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-27 16:30 UTC by Kamil Neczaj
Modified: 2008-09-27 19:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kamil Neczaj 2008-09-27 16:30:16 UTC
There are so many mime types that often the authors of icon themes do not make icons to every mime type. It cause that many MIMEs (often rare) don't have its icon. Many of them are audio, video or picture formats, sometimes documents. The problem exists especially when an application adds new mimes, which are not included in standard mime types from freedesktop.org. Obviously the application can add icons to new mime, but the new icons often don't match to using icon theme.

In my opinion good solution is to add field to scecify another icon if the dedicated is unavailable to shared-mime-info-spec. Also some generic icons may be added to icon-naming-spec (image-generic, audio-generic etc) to let new field point to icons which surely exist, but it's the problem for another report.

Egzample:
Program TuxGuitar (guitar tabulature editor) adds mime type audio/x-ptb, audio/x-gtp and audio/x-tuxguitar. Any icon theme does not contain icons to this file types. All of these mimes contain data similar to midi files so the best solution is using icons of audio/midi mime. If current icon theme doesn't contain icon for audio/midi, the audio/x-ptb would use audio-generic icon.
Comment 1 Bastien Nocera 2008-09-27 19:21:48 UTC
If you add a new mime-type, you can already use the "generic-icon" property to define an icon to use if no exactly matching icons are available. Possible values are listed in the freedesktop.org.xml file:
  <!ATTLIST generic-icon name (application-x-executable|audio-x-generic|font-x-generic|image-x-generic|package-x-generic|text-html|text-x-generic|text-x-generic-template|text-x-script|video-x-generic|x-office-address-book|x-office-calendar|x-office-document|x-office-presentation|x-office-spreadsheet) #IMPLIED>

For other mime-types, like audio/* and video/*, it's up to your icon theme to provide a generic icon for those types. The fallback mechanism is already available and used in different implementations.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.