开发者

How can I get the full file path of an icon name?

开发者 https://www.devze.com 2023-03-08 02:24 出处:网络
How can I get the full file path from an开发者_运维技巧 icon name in GNOME?import gtk icon_theme = gtk.icon_theme_get_default()

How can I get the full file path from an开发者_运维技巧 icon name in GNOME?


import gtk
icon_theme = gtk.icon_theme_get_default()
icon_info = icon_theme.lookup_icon("my-icon-name", 48, 0)
print icon_info.get_filename()


Translation for Python 3:

from gi.repository import Gtk
icon_theme = Gtk.IconTheme.get_default()
icon_info = icon_theme.lookup_icon("my-icon-name", 48, 0)
print(icon_info.get_filename())
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号