desktop.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Icon-Requests 作者: bil-elmoussaoui 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号