Is there a way to find out which icon to use for a given MIME type using GTK / pygtk?
I know about gio.File(filename).query_info("standard::icon").get_icon(), but I need to find the icon without having to read the file.
gio.File(filename).query_info("standard::icon").get_icon()
Give it a try gio.content_type_get_icon(). For instance:.
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>
Source: https://habr.com/ru/post/1745081/More articles:Reading ini file in C # - stringDisplay Options for Email - c #Can a Linux device driver wait for DMA to complete in device_remove ()? - linux-kernelJQuery resize event for children div - jqueryjava concurrency assignment - javaะะพะฑะฐะฒะธัั ัั ะตะผั XSLT 2 ะฒ Visual Studio 2010 ะดะปั intellisense - visual-studio-2010the margin-bottom property of the last div element does not "expand" the div - htmlPlugin for nervous animals Maven - javaConfiguring log4j log for sensitive data - javaHow to copy 110GB table with BLOB from one schema to another on ORACLE - sqlAll Articles