The `GtkAboutDialog` offers a simple way to display 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.
![An example GtkAboutDialog](aboutdialog.png)
About dialogs often contain links and email addresses. `GtkAboutDialog` displays these as clickable links. By default, it calls [
[email protected]_uri] when a user clicks one. The behaviour can be overridden with the [[email protected]:
GtkAboutDialog:activate-link
] signal.
To specify a person with an email address, use a string like `Edgar Allan Poe
mailto:[email protected]`. To specify a website with a title, use a string like `GTK team https://www.gtk.org`.
To make constructing a `GtkAboutDialog` as convenient as possible, you can use the function [[email protected]_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 a `GtkAboutDialog`, 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); ```
CSS nodes
`GtkAboutDialog` has a single CSS node with the name `window` and style class `.aboutdialog`.
- public string[] artists { get; set; }
The people who contributed artwork to the program, as a
`NULL`-terminated array of strings.
- public string[] authors { get; set; }
The authors of the program, as a `NULL`-terminated array of strings.
- public string comments { get; set; }
Comments about the program.
- public string copyright { get; set; }
Copyright information for the program.
- public string[] documenters { get; set; }
The people documenting the program, as a `NULL`-terminated array of
strings.
- public string license { get; set; }
The license of the program, as free-form text.
- public License license_type { get; set; }
The license of the program.
- public Paintable logo { get; set; }
A logo for the about box.
- public string logo_icon_name { get; set; }
A named icon to use as the logo for the about box.
- public string program_name { get; set; }
The name of the program.
- public string system_information { get; set; }
Information about the system on which the program is running.
- public string translator_credits { get; set; }
Credits to the translators.
- public string version { get; set; }
The version of the program.
- public string website { get; set; }
The URL for the link to the website of the program.
- public string website_label { get; set; }
The label for the link to the website of the program.
- public bool wrap_license { get; set; }
Whether to wrap the text in the license dialog.
- public void add_credit_section (string section_name, string[] people)
Creates a new section in the "Credits" page.
- 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 License get_license_type ()
Retrieves the license type.
- public unowned Paintable? 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_system_information ()
Returns the system information that is shown 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_license_type (License license_type)
Sets the license of the application showing the about dialog from a
list of known licenses.
- public void set_logo (Paintable? 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_system_information (string? system_information)
Sets the system information to be displayed 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.