3
GTK/pygtk를 사용하여 주어진 MIME 유형에 사용할 아이콘을 찾는 방법이 있습니까?GTK를 사용하여 MIME 유형이 지정된 파일 찾기
약 gio.File(filename).query_info("standard::icon").get_icon()
을 알고 있지만 파일을 읽지 않아도 아이콘을 찾아야합니다.
GTK/pygtk를 사용하여 주어진 MIME 유형에 사용할 아이콘을 찾는 방법이 있습니까?GTK를 사용하여 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>
니스, 감사 :) – Joril