3

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().

2

Did you try g_content_type_get_icon ()?

You might need to call g_content_type_from_mime_type () first.

GContentType docs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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