Displays information about a program.
The shown information includes the programs' 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.
<picture> <source srcset="aboutdialot-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example
GtkAboutDialog" src="aboutdialog.png"> </picture>
About dialogs often contain links and email addresses. `GtkAboutDialog` displays these as clickable links. By default, it calls [
method@Gtk.FileLauncher.launch] when a user clicks one. The behaviour can be overridden with the [signal@Gtk.AboutDialog:
GtkAboutDialog:activate-link] signal.
To specify a person with an email address, use a string like `Edgar Allan Poe
mailto:edgar@poe.com`. To specify a website with a title, use a string like `GTK team https://www.gtk.org`.
To make constructing an about dialog as convenient as possible, you can use the function [func@Gtk.show_about_dialog] which constructs
and shows a dialog and keeps it around so that it can be shown again.
Note that GTK sets a default title of `_("About s")` on the dialog window (where `
s` is replaced by the name of the application, but in order to ensure proper translation of the title,
applications should set the title property explicitly when constructing an about dialog, as shown in the following example:
```c GFile *logo_file = g_file_new_for_path ("./logo.png"); GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
g_object_unref (logo_file);
gtk_show_about_dialog (NULL, "program-name", "ExampleCode", "logo", example_logo, "title", _("About ExampleCode"), NULL); ```
Shortcuts and Gestures
`GtkAboutDialog` supports the following keyboard shortcuts:
- <kbd>Escape</kbd> closes the window.
CSS nodes
`GtkAboutDialog` has a single CSS node with the name `window` and style class `.aboutdialog`.
- public unowned string[] get_artists ()
Returns the names of the artists which are displayed in the credits
page.
- public unowned string[] get_authors ()
Returns the names of the authors which are displayed in the credits
page.
- public unowned string get_comments ()
Returns the comments string.
- public unowned string get_copyright ()
Returns the copyright string.
- public unowned string[] get_documenters ()
Returns the name of the documenters which are displayed in the credits
page.
- public unowned string get_license ()
Returns the license information.
- public unowned Pixbuf get_logo ()
Returns the paintable displayed as logo in the about dialog.
- public unowned string get_logo_icon_name ()
Returns the icon name displayed as logo in the about dialog.
- public unowned string get_program_name ()
Returns the program name displayed in the about dialog.
- public unowned string get_translator_credits ()
Returns the translator credits string which is displayed in the
credits page.
- public unowned string get_version ()
Returns the version string.
- public unowned string get_website ()
Returns the website URL.
- public unowned string get_website_label ()
Returns the label used for the website link.
- public bool get_wrap_license ()
Returns whether the license text in the about dialog is automatically
wrapped.
- public void set_artists (string[] artists)
Sets the names of the artists to be displayed in the "Credits" page.
- public void set_authors (string[] authors)
Sets the names of the authors which are displayed in the "Credits"
page of the about dialog.
- public void set_comments (string comments)
Sets the comments string to display in the about dialog.
- public void set_copyright (string copyright)
Sets the copyright string to display in the about dialog.
- public void set_documenters (string[] documenters)
Sets the names of the documenters which are displayed in the "Credits"
page.
- public void set_license (string license)
Sets the license information to be displayed in the about dialog.
- public void set_logo (Pixbuf logo)
Sets the logo in the about dialog.
- public void set_logo_icon_name (string icon_name)
Sets the icon name to be displayed as logo in the about dialog.
- public void set_program_name (string name)
Sets the name to display in the about dialog.
- public void set_translator_credits (string translator_credits)
Sets the translator credits string which is displayed in the credits
page.
- public void set_version (string version)
Sets the version string to display in the about dialog.
- public void set_website (string website)
Sets the URL to use for the website link.
- public void set_website_label (string website_label)
Sets the label to be used for the website link.
- public void set_wrap_license (bool wrap_license)
Sets whether the license text in the about dialog should be
automatically wrapped.