Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How to get the icon for a MIME type?
I don't want to use g_file_info_get_icon() because its input parameter is a file, not a MIME type.

My use case:

I have a wrapper file which embeds a media object, I can get the MIME type of the media object and want to find the icon of the MIME type. And I don't want to dump the media object to a separate file to use g_file_info_get_icon().

share|improve this question

1 Answer 1

Did you try g_content_type_get_icon ()?

You might need to call g_content_type_from_mime_type () first.

GContentType docs

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.