Icon naming spec suggestions - mimetypes
dfaure at trolltech.com
Mon Jan 21 11:01:14 PST 2008
On Friday 28 December 2007, Rodney Dawes wrote:
> On Fri, 2007-12-28 at 23:14 +0100, Jakob Petsovits wrote:
> > On Friday, 28. December 2007, Jan Claeys wrote:
> > > Op woensdag 26-12-2007 om 01:02 uur [tijdzone +0100], schreef Jakob
> > > Petsovits:
> > > > application-x-zerosize
> > > > The icon used for empty files.
> > >
> > > Why do those need a different icon?
> > Well, I wouldn't consider any other mimetype icon to be appropriate for empty
> > files. Imagine a file manager that displays the text-x-generic icon for an
> > empty file - this indicates that the file has contents, which is misleading.
> > Are there any examples of file managers (or file listings, like in the
> > file-open dialog) that do not use a separate icon for empty files?
> So then again, how is that different from unknown? If there is no
> content, how can you determine the type of content?
The size being 0 tells you the type of the file: it's a file of the "empty" kind :)
> Generally file
> managers guess the content type from the extension after looking
> at the content.
Technically it's the other way round, the mimetype standard says to look
at the extension first, and only if that's not enough information, to look at
the content. But when there's no content, we know that from the start without
having to open the file anyway (from the size of the file).
> If the file extension is .txt, it is acceptable to
> presume that the user wishes to insert text into the file, I think.
I don't agree. If I have a zero-size .rpm file, then this is no valid RPM, I cannot install it,
therefore showing a RPM icon is misleading. I I have a zero-size PNG file, it's not a valid PNG, etc.
.txt is a special case where an empty file is useable; for most other types of files, a zerosize
file is not the same as an "empty" file which would have correct headers and would open correctly
in the associated application.
Anyway, we can just use x-zerosize in kde if other environments don't agree
with that notion, I guess.
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the xdg