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)
colorthemes.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录