mime-type icons, a proposal
Thomas Leonard
tal00r at ecs.soton.ac.uk
Sat Sep 25 18:02:25 EEST 2004
On Fri, Sep 24, 2004 at 12:22:43PM +0200, Alexander Larsson wrote:
> I've read all the mails in the mimetype icon thread, and I'd like to
> summarize what I think about this and give a possible solution to
> these issues.
[ snip lots of sensible stuff ]
> * We should strive to avoid adding new "false" mimetypes. I know we
> often add non-standard mimetypes to the database, but at least
> these are real types of real files. We shouldn't add mimetypes to
> the database, or in any way create them, if they aren't a possible
> type of an actual real world file or stream.
Why? I agree we might want to keep them distinct from 'real' MIME-types
(eg, by using new media types), but apart from that, do they cause any
problems?
[...]
> I propose we make up a list of common generic type of the form
> "mime-category-presentation", and "mime-category-spreadsheet". Then we
> add a new entry to the mime database where each mimetype can specify
> the generic mimetype icon to use. If none is specified we fall back to
> the old way. update-mime-database will extract this and put in the
> same file as the app-specific icon is stored in. (In the case of the
> old-style fallback we don't even put this in the file, to save memory.)
The problem with doing catagories this way is that it doesn't allow
grouping. Eg, GNOME doesn't just show a two-level tree of types, but
groups them. In gnome-control-center -> Advanced -> File types and
programs, you get a box that looks like this:
- Documents
- Diagrams
- Dia diagram
- Numeric
- StarOffice formula
- MathML document
etc
And if you want to allow this, you need translations and inheritance of
catagories, in addition to icons. Even though 'Catagory/Documents.Numeric'
isn't a 'real' MIME type, it behaves just like one. It has a translated
description, a parent class, an icon, and maybe some aliases.
Now, we can do this already, without changing any code. sub-class-of isn't
'inheritance of format', it's just 'inheritance'. So far, all the types
have a format, and since subclasses inherit all characteristics of their
parents, that currently means inheritance of format. But if we have a type
'Catagory/Documents.Numeric', for numeric documents, then subclasses of it
will inherit that meaning, not any particular format.
--
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