edit.py 文件源码

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

项目:Circadia 作者: hooyah 项目源码 文件源码
def menu_loadTheme(self):
        """ callback for load_theme menu item """

        newTheme = tkFileDialog.askopenfilename(initialdir=self.themeRootPath, filetypes=[('Theme', '*.json')], title='Open Theme')
        if newTheme and not newTheme.startswith(self.themeRootPath):
            tkMessageBox.showerror(message='Theme not in root folder: '+self.themeRootPath)
            print newTheme, self.themeRootPath
            return

        if not newTheme or (self.theme and not tkMessageBox.askokcancel(title='Loading theme', message='current theme will be lost. continue?')):
            return

        pathname, filename = os.path.split(newTheme)
        basename, themename = os.path.split(pathname)
        self.loadTheme(themename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号