def get_icon_informations(self):
theme = Gtk.IconTheme.get_default()
self.is_hardcoded_icon()
self.icon_path = ""
icon_name = self.getIcon()
self.is_supported = self.get_is_supported()
self.supported_icons = None
full_path = False
if self.is_hardcoded:
self.icon_path = icon_name
if len(self.icon_path.split("/")) == 1:
icon_name = path.splitext(self.getIcon())[0]
else:
self.icon_path = self.getIcon()
full_path = True
icon = theme.lookup_icon(icon_name, 48, 0)
if icon and not full_path:
self.icon_path = icon.get_filename()
if self.is_hardcoded:
self.is_supported = True
if not self.icon_path or not path.exists(self.icon_path):
icon = theme.lookup_icon(
"image-missing", 48, 0)
if icon:
self.icon_path = icon.get_filename()
评论列表
文章目录