finding directory icon

Thiago Macieira thiago at kde.org
Thu May 31 11:30:35 PDT 2007


Sebastian Gurin wrote:
>Mmmm... I think I'm talking about .desktop files that are mencioned in
>http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec. In
>fact, I have not kde installed on this machine

Ok. Those files have an Icon line. Just use the icon that is there.

What's the problem with that?

>For a given mimetype, I'm looking for its default application .desktop's
>file in  $XDG_DATA_HOME/applications/desfaults.list and in
>$XDG_DATA_DIRS/applications/desfaults.list[1]

Ok. But you shouldn't rely on that, because the default application may 
not be installed.

Also, that's not part of the MIME specification. The spec it is part of is 
in early stages (according to its homepage 
http://freedesktop.org/wiki/Specifications/mime-actions-spec)

>Once I've found the .desktop file of the application I can look up for
>its icon. Is this "algorithm" for finding a mimetype's icon right?

See above. You're relying on a non-stable spec.

>Well, my problem with directories is that there is no default
>application (in my machine) for opening files "x-directory/normal"
>registered in $XDG_DATA_HOME/applications/desfaults.list..

First of all, you'll have to spell the file name correctly.

Second, it's there in my system:
$ grep x-directory/normal /usr/share/applications/defaults.list
x-directory/normal=nautilus-folder-handler.desktop


>P/D: I'm tring to make a linux filemanager in java. At this moment my
>priority is to guess a standar way of finding an icon that represents a
>given mimetype.

There isn't one, as far as I know. Maybe someone else knows, but I don't 
think it's likely.

KDE 4 is not using that method and has no plans to use it.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070531/336b8450/attachment.pgp 


More information about the xdg mailing list