1# -*- coding: utf-8 -*- 2 3''' 4Defines the about dialog. 5 6@author: Eitan Isaacson 7@organization: Mozilla Foundation 8@copyright: Copyright (c) 2006, 2007 Mozilla Foundation 9@license: BSD 10 11All rights reserved. This program and the accompanying materials are made 12available under the terms of the BSD which accompanies this distribution, and 13is available at U{http://www.opensource.org/licenses/bsd-license.php} 14''' 15 16import gi 17 18from gi.repository import Gtk as gtk 19from .i18n import _ 20 21class AccerciserAboutDialog(gtk.AboutDialog): 22 ''' 23 Creates a dialog with info about the program. 24 25 @cvar AUTHORS: List of authors. 26 @type AUTHORS: list of string 27 @cvar ARTISTS: List of artists. 28 @type ARTISTS:list of string 29 @cvar DOCUMENTERS: List of documenters. 30 @type DOCUMENTERS: list of string 31 @cvar TRANSLATORS: Translator. 32 @type TRANSLATORS: string 33 @cvar COMMENTS: Comments about program. 34 @type COMMENTS: string 35 @cvar COPYRIGHT: Copyright notice. 36 @type COPYRIGHT: string 37 @cvar LICENSE: License of program. 38 @type LICENSE: string 39 @cvar WEB_URL: URL to program's website. 40 @type WEB_URL: string 41 @cvar WEB_LABEL: Label of URL button. 42 @type WEB_LABEL: string 43 ''' 44 AUTHORS = ['Eitan Isaacson <eitan@ascender.com>', 45 'Peter Parente <pparente@us.ibm.com>', 46 'Brian Nitz <brian.nitz@oracle.com>', 47 'Javier Hernández <javi@raisingthefloor.org>'] 48 ARTISTS = ['Eitan Isaacson <eitan@ascender.com>', 49 'James Stipp <James_Stipp@us.ibm.com>', 50 'Vincent Geddes <vincent.geddes@gmail.com>'] 51 DOCUMENTERS = ['Eitan Isaacson <eitan@ascender.com>'] 52 TRANSLATORS = _('translator-credits') 53 COMMENTS = _('An interactive Python accessibility explorer') 54 COPYRIGHT = _('accerciser Copyright © 2006, 2007 IBM Corporation (BSD)') 55 LICENSE = \ 56 _('The New BSD License. See the COPYING and NOTICE files for details.') 57 WEB_URL = 'http://live.gnome.org/Accerciser' 58 WEB_LABEL = _('Web site') 59 def __init__(self): 60 ''' 61 Initialize dialog. 62 ''' 63 gtk.AboutDialog.__init__(self) 64 self.connect('response', self._onResponse) 65 gtk.AboutDialog.set_authors(self, self.AUTHORS) 66 gtk.AboutDialog.set_artists(self, self.ARTISTS) 67 gtk.AboutDialog.set_documenters(self, self.DOCUMENTERS) 68 gtk.AboutDialog.set_comments(self, self.COMMENTS) 69 gtk.AboutDialog.set_copyright(self, self.COPYRIGHT) 70 gtk.AboutDialog.set_license(self, self.LICENSE) 71 gtk.AboutDialog.set_logo_icon_name(self, 'accerciser') 72# gtk.AboutDialog.set_version(self, program.get_app_version()) 73 gtk.AboutDialog.set_website(self, self.WEB_URL) 74 gtk.AboutDialog.set_website_label(self, self.WEB_LABEL) 75 76 def _onResponse(self, dialog, response_id): 77 ''' 78 Callback for dialog responses, always destroy it. 79 80 @param dialog: This dialog. 81 @type dialog: L{AccerciserAboutDialog} 82 @param response_id: Response ID recieved. 83 @type response_id: integer 84 ''' 85 self.destroy() 86 87