Jor*_*ril 3 gtk pygtk mime-types
有没有办法使用GTK/pygtk找出用于给定MIME类型的图标?
我知道gio.File(filename).query_info("standard::icon").get_icon(),但我需要找到图标而不必阅读文件.
试试gio.content_type_get_icon().例如:
>>> gio.content_type_get_icon ('text/python')
<gio.ThemedIcon at 0xb7d0f734: text-python, gnome-mime-text-python, text-x-generic>
Run Code Online (Sandbox Code Playgroud)