Mime type to icon script

Josh guitarist198 at yahoo.com
Sun May 18 15:46:39 PDT 2008


I recently ran into a problem while doing some Qt programming.  The current
implementation of Qt4's QFileIconProvider does not provide a Linux user with
icons from their preferred theme.

I started looking into a way to provide a filetype's icon from its extension. 
I found out about /etc/mime.types and wrote a cross-DE script.  While writing
and testing the script I stumbled across the icon theme specification and
modified my script accordingly.

The script does not follow the icon lookup pseudo code line for line but does
not stray from the core ideas.  There are some additions for providing what Qt
calls standard pixmaps (eg. hd, folder, network, cd drive icons).

I am looking to get more eyes on this script for improvements.  Possibly this
script could be included as an xdg utility?  If this is not a an option I plan
to submit a task tracker report to Trolltech and send a copy of the script. 
Although I will wait until I get some feedback.

Thank you for your help.


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mimetoicon.sh
Type: application/octet-stream
Size: 7873 bytes
Desc: 4081286581-mimetoicon.sh
Url : http://lists.freedesktop.org/archives/xdg/attachments/20080518/6301949d/attachment.obj 


More information about the xdg mailing list