[pygtk] Mime types and associated icons

Daniel Tabas danieloop at gmail.com
Wed May 21 16:44:11 WST 2008


I'm trying to show a treeview of a tree directory. When a node is a folder,
I assert a pixbuf with the stock icon 'STOCK_DIRECTORY'. When the node is a
file, actually i do the same but with stock icon 'STOCK_FILE'.
I can retrieve the mime type of the file before drawing the treeview, and my
question is:
Can I obtain a string with the path of the icon associated to the mime type
of that file in order to create a pixbuf with it??
I've tried with this:
strArch=3D'/usr/share/icons/gnome/16x16/mimetypes/'+mime+'.png'
mime is the modified mime type of the file in order to match it with an icon
of that folder.
Something more beautiful?

Thanks in advanced (and sorry! my english is horrible)

-- =

Un saludo:
Daniel Tabas
------------ pr=F3xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20080521/2b44a55c/at=
tachment.htm


More information about the pygtk mailing list