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()
评论列表
文章目录