main.py 文件源码

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

项目:sleep-inhibit 作者: mssever 项目源码 文件源码
def on_about(*args): # *args: was menuitem
        '''Builds and shows the about dialog.'''
        config = get_config()
        with open(config.program_dir + '/data/credits.json') as f:
            credits = json.loads(f.read())
        about = Gtk.AboutDialog()
        about.set_program_name("Sleep Inhibitor")
        about.set_version(config.version)
        about.set_comments("Prevent your computer from going to sleep.")
        #about.set_website("http://www.learngtk.org/")
        #about.set_website_label("LearnGTK Website")
        about.set_authors(credits['authors'])
        about.set_artists(credits['artists'])
        about.set_copyright('\n'.join(['© {} by {}'.format(i['years'], i['name']) for i in credits['copyright']]))
        about.set_license_type(Gtk.License.GPL_3_0)

        about.run()
        about.destroy()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号