colorthemes.py 文件源码

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

项目:script.skin.helper.skinbackup 作者: marcelveldt 项目源码 文件源码
def daynightthemes(self, dayornight):
        '''allow user to set a specific theme during day/night time'''

        if dayornight not in ["day", "night"]:
            log_msg("Invalid parameter for day/night theme - must be day or night")
            return

        # show listing with themes
        listitems = self.get_skin_colorthemes()
        listitems += self.get_user_colorthemes()
        header = self.addon.getLocalizedString(32031)
        curvalue = xbmc.getInfoLabel("Skin.String(SkinHelper.ColorTheme.%s.theme)" % dayornight).decode("utf-8")
        dialog = DialogSelect("DialogSelect.xml", "", windowtitle=header,
                              richlayout=True, listing=listitems, autofocus=curvalue)
        dialog.doModal()
        result = dialog.result
        del dialog
        if result:
            themefile = result.getfilename().decode("utf-8")
            themename = result.getLabel().decode("utf-8")
            self.set_day_night_theme(dayornight, themename, themefile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号