gtk.AboutDialog

gtk.AboutDialog — popup window displaying information about an application (new in PyGTK 2.6)

Synopsis

class gtk.AboutDialog(gtk.Dialog):
    gtk.AboutDialog()
def get_name()
def set_name(name)
def get_version()
def set_version(version)
def get_copyright()
def set_copyright(copyright)
def get_comments()
def set_comments(comments)
def get_license()
def set_license(license)
def get_wrap_license()
def set_wrap_license(license)
def get_website()
def set_website(website)
def get_website_label()
def set_website_label(website_label)
def get_authors()
def set_authors(authors)
def get_documenters()
def set_documenters(documenters)
def get_artists()
def set_artists(artists)
def get_translator_credits()
def set_translator_credits(translator_credits)
def get_logo()
def set_logo(logo)
def get_logo_icon_name()
def set_logo_icon_name(icon_name)
Functions
 
    def gtk.about_dialog_set_email_hook(func, data)
def gtk.about_dialog_set_url_hook(func, data)

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.Window
            +-- gtk.Dialog
              +--gtk.AboutDialog

gtk.AboutDialog Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.Window Properties

gtk.Dialog Properties

"artists"Read-WriteThe list of people who have contributed artwork to the program. This property is available in GTK+ 2.6 and above.
"authors"Read-WriteThe list of authors of the program. This property is available in GTK+ 2.6 and above.
"comments"Read-WriteA string containing comments about the program. Default value: None. This property is available in GTK+ 2.6 and above.
"copyright"Read-WriteA string containing copyright information for the program. Default value: None. This property is available in GTK+ 2.6 and above.
"documenters"Read-WriteThe list of people documenting the program. This property is available in GTK+ 2.6 and above.
"license"Read-WriteA string containing the license of the program. Default value: None. This property is available in GTK+ 2.6 and above.
"logo"Read-WriteA logo for the about box. If this is not set, it defaults to the default window icon list. This property is available in GTK+ 2.6 and above.
"logo-icon-name"Read-WriteThe name of an icon to use as the logo for the about box. Default value: None. This property is available in GTK+ 2.6 and above.
"name"Read-WriteThe name of the program. If this is not set, it defaults to g_get_application_name(). Default value: None. This property is available in GTK+ 2.6 and above.
"translator-credits"Read-WriteCredits to the translators. This string should be marked as translatable. Default value: None. This property is available in GTK+ 2.6 and above.
"version"Read-WriteA string containing the version of the program. Default value: None. This property is available in GTK+ 2.6 and above.
"website"Read-WriteThe URL for the link to the website of the program. Default value: None. This property is available in GTK+ 2.6 and above.
"website-label"Read-WriteThe label for the link to the website of the program. If this is not set, it defaults to the URL. Default value: None. This property is available in GTK+ 2.6 and above.
"wrap-license"Read-WriteIf TRUE the license text should be wrapped. Default value: FALSE. This property is available in GTK+ 2.6 and above.

gtk.AboutDialog Style Properties

gtk.Widget Style Properties

gtk.Dialog Style Properties

"link-color"ReadThe color of hyperlinks. This property is not available in GTK+ 2.10 and above.

gtk.AboutDialog Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.Window Signal Prototypes

gtk.Dialog Signal Prototypes

Description

Note

This widget is available in PyGTK 2.6 and above.

The gtk.AboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license. It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the HelpAbout menu. All parts of the dialog are optional.

About dialog often contain links and email addresses. gtk.AboutDialog supports this by offering global hooks, which are called when the user clicks on a link or email address, see the gtk.about_dialog_set_email_hook() and gtk.about_dialog_set_url_hook() functions. Email addresses in the authors, documenters and artists properties are recognized by looking for <user@host>, URLs are recognized by looking for http://url, with url extending to the next space, tab or line break.

Constructor

    gtk.AboutDialog()
Returns :a new gtk.AboutDialog

Note

This constructor is available in PyGTK 2.6 and above.

Creates a new gtk.AboutDialog with default property values.

Methods

gtk.AboutDialog.get_name

    def get_name()
Returns :The program name or None.

Note

This method is available in PyGTK 2.6 and above.

The get_name() method returns the value of the "name" property which is the program name displayed in the about dialog. get_name() returns None if the name is not set.

gtk.AboutDialog.set_name

    def set_name(name)
name :a string containing the program name or None to use the default name.

Note

This method is available in PyGTK 2.6 and above.

The set_name() method sets the "name" property to the string contained in name. The "name" property is used as the program name in the about dialog. If name is None, it defaults to g_get_application_name().

gtk.AboutDialog.get_version

    def get_version()
Returns :The version string or None.

Note

This method is available in PyGTK 2.6 and above.

The get_version() method returns the string contained in the "version" property.

gtk.AboutDialog.set_version

    def set_version(version)
version :the version string or None

Note

This method is available in PyGTK 2.6 and above.

The set_version() method sets the "version" property to the string in version.

gtk.AboutDialog.get_copyright

    def get_copyright()
Returns :the copyright string or None.

Note

This method is available in PyGTK 2.6 and above.

The get_copyright() method returns the string contained in the "copyright" property.

gtk.AboutDialog.set_copyright

    def set_copyright(copyright)
copyright :a string containing the copyright notice or None.

Note

This method is available in PyGTK 2.6 and above.

The set_copyright() method sets the "copyright" property to the string contained in copyright. If copyright is None, the copyright notice is hidden.

gtk.AboutDialog.get_comments

    def get_comments()
Returns :a string containing the comments or None

Note

This method is available in PyGTK 2.6 and above.

The get_comments() method returns the string contained in the "comments" property.

gtk.AboutDialog.set_comments

    def set_comments(comments)
comments :a string containing the comments or None.

Note

This method is available in PyGTK 2.6 and above.

The set_comments() method sets the "comments" property to the string contained in comments. If comments is None the comments label is hidden.

gtk.AboutDialog.get_license

    def get_license()
Returns :a string containing the license information or None

Note

This method is available in PyGTK 2.6 and above.

The get_license() method returns the string contained in the "license" property.

gtk.AboutDialog.set_license

    def set_license(license)
license :

Note

This method is available in PyGTK 2.6 and above.

The set_license() method sets the "license" property to the string contained in license. If license is None the license button is hidden.

gtk.AboutDialog.get_wrap_license

    def get_wrap_license()
Returns :TRUE if the license text should be wrapped

Note

This method is available in PyGTK 2.8 and above.

The get_wrap_license() method returns the value of the "wrap-license" property. If "wrap-license" is TRUE the license text should be automatically wrapped.

gtk.AboutDialog.set_wrap_license

    def set_wrap_license(wrap_license)
wrap_license :

Note

This method is available in PyGTK 2.8 and above.

The set_wrap_license() method sets the "wrap-license" property to the value of wrap_license. If wrap_license is TRUE the license text should be automatically wrapped.

gtk.AboutDialog.get_website

    def get_website()
Returns :a string containing the website URL or None

Note

This method is available in PyGTK 2.6 and above.

The get_website() method returns the string contained in the "website" property. The website should be a URL.

gtk.AboutDialog.set_website

    def set_website(website)
website :a string containing the URL of the program's website or None

Note

This method is available in PyGTK 2.6 and above.

The set_website() method sets the "website" property to the string contained in website. The string should be a valid URL.

gtk.AboutDialog.get_website_label

    def get_website_label()
Returns :a string containing the website link label

Note

This method is available in PyGTK 2.6 and above.

The get_website_label() method returns the contents of the "website_label" property. The website label is used if the url hook has been set using the gtk.about_dialog_set_url_hook() function.

gtk.AboutDialog.set_website_label

    def set_website_label(website_label)
website_label :

Note

This method is available in PyGTK 2.6 and above.

The set_website_label() method sets the "website_label" property to the string contained in website_label if the url hook has been set using the gtk.about_dialog_set_url_hook() function.

gtk.AboutDialog.get_authors

    def get_authors()
Returns :a list containing the names of the program authors

Note

This method is available in PyGTK 2.6 and above.

The get_authors() method returns the contents of the "authors" property. The "authors" property contains a list of the names of the authors of the program.

gtk.AboutDialog.set_authors

    def set_authors(authors)
authors :a list containing the names of the program authors.

Note

This method is available in PyGTK 2.6 and above.

The set_authors() method sets the "authors" property to the list contained in authors. The author names are displayed in the authors tab of the secondary credits dialog. set_authors() method will show the Credits button if it is not displayed.

gtk.AboutDialog.get_documenters

    def get_documenters()
Returns :a list of the program documenters

Note

This method is available in PyGTK 2.6 and above.

The get_documenters() method returns the contents of the "documenters" property which contains a list of the names of the program documenters.

gtk.AboutDialog.set_documenters

    def set_documenters(documenters)
documenters :a list of the names of the program documenters

Note

This method is available in PyGTK 2.6 and above.

The set_documenters() method sets the "documenters" property to the contents of documenters. The documenter names are displayed in the documenters tab of the secondary credits dialog. set_documenters() method will show the Credits button if it is not displayed.

gtk.AboutDialog.get_artists

    def get_artists()
Returns :a list of the names of the program artists

Note

This method is available in PyGTK 2.6 and above.

The get_artists() method returns the contents of the "artists" property which contains a list of the names of the program artists.

gtk.AboutDialog.set_artists

    def set_artists(artists)
artists :a list of the names of the program artists

Note

This method is available in PyGTK 2.6 and above.

The set_artists() method sets the "artists" property to the contents of artists. The artist names are displayed in the artists tab of the secondary credits dialog. set_artists() method will show the Credits button if it is not displayed.

gtk.AboutDialog.get_translator_credits

    def get_translator_credits()
Returns :a string containing the translator credits

Note

This method is available in PyGTK 2.6 and above.

The get_translator_credits() method returns the contents of the "translator-credits" property which contains the credits for the current translation.

gtk.AboutDialog.set_translator_credits

    def set_translator_credits(translator_credits)
translator_credits :a string containing the current translation credits

Note

This method is available in PyGTK 2.6 and above.

The set_translator_credits() method sets the "translator_credits" property to the value of translator_credits. The translator credits are displayed in the translators tab of the secondary credits dialog.

The intended use for this string is to display the translator of the language which is currently used in the user interface. Using the gettext() function, a simple way to achieve that is to mark the string for translation.

It is a good idea to use the customary msgid "translator-credits" for this purpose, since translators will already know the purpose of that msgid, and since gtk.AboutDialog will detect if "translator-credits" is untranslated and hide the tab.

gtk.AboutDialog.get_logo

    def get_logo()
Returns :the gtk.gdk.Pixbuf used as the logo

Note

This method is available in PyGTK 2.6 and above.

The get_logo() method returns the contents of the "logo" property which contains a gtk.gdk.Pixbuf that is used as the logo.

gtk.AboutDialog.set_logo

    def set_logo(logo)
logo :a gtk.gdk.Pixbuf to be used as the logo

Note

This method is available in PyGTK 2.6 and above.

The set_logo() method sets the "logo" property to the gtk.gdk.Pixbuf contained in logo. If logo is None, the default window icon set with the gtk.window_set_default_icon_list() function will be used.

gtk.AboutDialog.get_logo_icon_name

    def get_logo_icon_name()
Returns :the name of the icon used as the logo

Note

This method is available in PyGTK 2.6 and above.

The get_logo_name() method returns the contents of the "logo-icon-name" property which contains the name of the icon used as the logo.

gtk.AboutDialog.set_logo_icon_name

    def set_logo_icon_name(icon_name)
icon_name :the name of an icon or None

Note

This method is available in PyGTK 2.6 and above.

The set_logo_icon_name() method sets the "logo-icon-name" property to the value of icon_name. If icon_name is None, the default window icon set with the gtk.window_set_default_icon_list() function will be used.

Functions

gtk.about_dialog_set_email_hook

    def gtk.about_dialog_set_email_hook(func, data)
func : a function to call when an email link is activated.
data : data to pass to func

Note

This function is available in PyGTK 2.6 and above.

The gtk.about_dialog_set_email_hook function installs a global function (specified by func) to be called whenever the user activates an email link in an about dialog.

The signature of the callback function func is:

def func(dialog, link, user_data)

where link is the email address destination of the activated link, dialog is the gtk.AboutDialog containing link and user_data is the data argument passed to gtk.about_dialog_set_email_hook().

gtk.about_dialog_set_url_hook

    def gtk.about_dialog_set_url_hook(func, data)
func : a function to call when a URL link is activated.
data : data to pass to func

Note

This function is available in PyGTK 2.6 and above.

The gtk.about_dialog_set_url_hook function installs a global function (specified by func) to be called whenever the user activates a URL link in an about dialog.

The signature of the callback function func is:

def func(dialog, link, user_data)

where link is the URL destination of the activated link, dialog is the gtk.AboutDialog containing link and user_data is the data argument passed to gtk.about_dialog_set_url_hook().