Next: , Previous: GtkWindowGroup, Up: Top


7 GtkAboutDialog

Display information about an application

7.1 Overview

The <gtk-about-dialog> 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 ‘About’ option from the ‘Help’ menu. All parts of the dialog are optional.

About dialog often contain links and email addresses. <gtk-about-dialog> supports this by offering global hooks, which are called when the user clicks on a link or email address, see gtk-about-dialog-set-email-hook and gtk-about-dialog-set-url-hook. 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.

To make constructing a <gtk-about-dialog> as convenient as possible, you can use the function gtk-show-about-dialog which constructs and shows a dialog and keeps it around so that it can be shown again.

7.2 Usage

— Class: <gtk-about-dialog>

Derives from <gtk-dialog>.

This class defines the following slots:

program-name
The name of the program. If this is not set, it defaults to g_get_application_name()
version
The version of the program
copyright
Copyright information for the program
comments
Comments about the program
website
The URL for the link to the website of the program
website-label
The label for the link to the website of the program. If this is not set, it defaults to the URL
license
The license of the program
authors
List of authors of the program
documenters
List of people documenting the program
translator-credits
Credits to the translators. This string should be marked as translatable
artists
List of people who have contributed artwork to the program
logo
A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()
logo-icon-name
A named icon to use as the logo for the about box.
wrap-license
Whether to wrap the license text.
— Function: gtk-about-dialog-new ⇒  (ret <gtk-widget>)

Creates a new <gtk-about-dialog>.

ret
a newly created <gtk-about-dialog>

Since 2.6

— Function: gtk-about-dialog-get-name (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-name

Returns the program name displayed in the about dialog.

about
a <gtk-about-dialog>
ret
The program name. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-name (self <gtk-about-dialog>) (name mchars)
— Method: set-name

Sets the name to display in the about dialog. If this is not set, it defaults to g-get-application-name.

about
a <gtk-about-dialog>
name
the program name

Since 2.6

— Function: gtk-about-dialog-get-version (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-version

Returns the version string.

about
a <gtk-about-dialog>
ret
The version string. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-version (self <gtk-about-dialog>) (version mchars)
— Method: set-version

Sets the version string to display in the about dialog.

about
a <gtk-about-dialog>
version
the version string

Since 2.6

— Function: gtk-about-dialog-get-copyright (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-copyright

Returns the copyright string.

about
a <gtk-about-dialog>
ret
The copyright string. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-copyright (self <gtk-about-dialog>) (copyright mchars)
— Method: set-copyright

Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.

about
a <gtk-about-dialog>
copyright
the copyright string

Since 2.6

— Function: gtk-about-dialog-get-license (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-license

Returns the license information.

about
a <gtk-about-dialog>
ret
The license information. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-license (self <gtk-about-dialog>) (license mchars)
— Method: set-license

Sets the license information to be displayed in the secondary license dialog. If license is ‘#f’, the license button is hidden.

about
a <gtk-about-dialog>
license
the license information or ‘#f

Since 2.6

— Function: gtk-about-dialog-get-wrap-license (self <gtk-about-dialog>) ⇒  (ret bool)
— Method: get-wrap-license

Returns whether the license text in about is automatically wrapped.

about
a <gtk-about-dialog>
ret
#t’ if the license text is wrapped

Since 2.8

— Function: gtk-about-dialog-set-wrap-license (self <gtk-about-dialog>) (wrap_license bool)
— Method: set-wrap-license

Sets whether the license text in about is automatically wrapped.

about
a <gtk-about-dialog>
wrap-license
whether to wrap the license

Since 2.8

— Function: gtk-about-dialog-get-website (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-website

Returns the website URL.

about
a <gtk-about-dialog>
ret
The website URL. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-website (self <gtk-about-dialog>) (website mchars)
— Method: set-website

Sets the URL to use for the website link.

about
a <gtk-about-dialog>
website
a URL string starting with "http://"

Since 2.6

— Function: gtk-about-dialog-get-website-label (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-website-label

Returns the label used for the website link.

about
a <gtk-about-dialog>
ret
The label used for the website link. The string is owned by the about dialog and must not be modified.

Since 2.6

— Function: gtk-about-dialog-set-website-label (self <gtk-about-dialog>) (website_label mchars)
— Method: set-website-label

Sets the label to be used for the website link. It defaults to the website URL.

about
a <gtk-about-dialog>
website-label
the label used for the website link

Since 2.6

— Function: gtk-about-dialog-get-logo (self <gtk-about-dialog>) ⇒  (ret <gdk-pixbuf>)
— Method: get-logo

Returns the pixbuf displayed as logo in the about dialog.

about
a <gtk-about-dialog>
ret
the pixbuf displayed as logo. The pixbuf is owned by the about dialog. If you want to keep a reference to it, you have to call g-object-ref on it.

Since 2.6

— Function: gtk-about-dialog-set-logo (self <gtk-about-dialog>) (logo <gdk-pixbuf>)
— Method: set-logo

Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘#f’, the default window icon set with gtk-window-set-default-icon will be used.

about
a <gtk-about-dialog>
logo
a <gdk-pixbuf>, or ‘#f

Since 2.6

— Function: gtk-about-dialog-get-logo-icon-name (self <gtk-about-dialog>) ⇒  (ret mchars)
— Method: get-logo-icon-name

Returns the icon name displayed as logo in the about dialog.

about
a <gtk-about-dialog>
ret
the icon name displayed as logo. The string is owned by the dialog. If you want to keep a reference to it, you have to call g-strdup on it.

Since 2.6

— Function: gtk-about-dialog-set-logo-icon-name (self <gtk-about-dialog>) (icon_name mchars)
— Method: set-logo-icon-name

Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘#f’, the default window icon set with gtk-window-set-default-icon will be used.

about
a <gtk-about-dialog>
icon-name
an icon name, or ‘#f

Since 2.6