Class

Gtk.AboutDialog

Description [src]

final class Gtk.AboutDialog : Gtk.Window {
  /* No available fields */
}

The GtkAboutDialog 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.

An example GtkAboutDialog

About dialogs often contain links and email addresses. GtkAboutDialog displays these as clickable links. By default, it calls gtk_show_uri() when a user clicks one. The behaviour can be overridden with the GtkAboutDialog::activate-link signal.

To specify a person with an email address, use a string like Edgar Allan Poe <edgar@poe.com>. 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 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 a GtkAboutDialog, as shown in the following example:

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.

Ancestors

Constructors

gtk_about_dialog_new

Creates a new GtkAboutDialog.

Instance methods

gtk_about_dialog_add_credit_section

Creates a new section in the “Credits” page.

gtk_about_dialog_get_artists

Returns the string which are displayed in the “Artists” tab of the secondary credits dialog.

gtk_about_dialog_get_authors

Returns the string which are displayed in the authors tab of the secondary credits dialog.

gtk_about_dialog_get_comments

Returns the comments string.

gtk_about_dialog_get_copyright

Returns the copyright string.

gtk_about_dialog_get_documenters

Returns the string which are displayed in the “Documenters” tab of the secondary credits dialog.

gtk_about_dialog_get_license

Returns the license information.

gtk_about_dialog_get_license_type

Retrieves the license set using gtk_about_dialog_set_license_type().

gtk_about_dialog_get_logo

Returns the paintable displayed as logo in the about dialog.

gtk_about_dialog_get_logo_icon_name

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

gtk_about_dialog_get_program_name

Returns the program name displayed in the about dialog.

gtk_about_dialog_get_system_information

Returns the system information that is shown in the about dialog.

gtk_about_dialog_get_translator_credits

Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog.

gtk_about_dialog_get_version

Returns the version string.

gtk_about_dialog_get_website

Returns the website URL.

gtk_about_dialog_get_website_label

Returns the label used for the website link.

gtk_about_dialog_get_wrap_license

Returns whether the license text in the about dialog is automatically wrapped.

gtk_about_dialog_set_artists

Sets the strings which are displayed in the “Artists” tab of the secondary credits dialog.

gtk_about_dialog_set_authors

Sets the strings which are displayed in the “Authors” tab of the secondary credits dialog.

gtk_about_dialog_set_comments

Sets the comments string to display in the about dialog.

gtk_about_dialog_set_copyright

Sets the copyright string to display in the about dialog.

gtk_about_dialog_set_documenters

Sets the strings which are displayed in the “Documenters” tab of the credits dialog.

gtk_about_dialog_set_license

Sets the license information to be displayed in the secondary license dialog.

gtk_about_dialog_set_license_type

Sets the license of the application showing the about dialog from a list of known licenses.

gtk_about_dialog_set_logo

Sets the logo in the about dialog.

gtk_about_dialog_set_logo_icon_name

Sets the icon name to be displayed as logo in the about dialog.

gtk_about_dialog_set_program_name

Sets the name to display in the about dialog.

gtk_about_dialog_set_system_information

Sets the system information to be displayed in the about dialog.

gtk_about_dialog_set_translator_credits

Sets the translator credits string which is displayed in the translators tab of the secondary credits dialog.

gtk_about_dialog_set_version

Sets the version string to display in the about dialog.

gtk_about_dialog_set_website

Sets the URL to use for the website link.

gtk_about_dialog_set_website_label

Sets the label to be used for the website link.

gtk_about_dialog_set_wrap_license

Sets whether the license text in the about dialog should be automatically wrapped.

Methods inherited from GtkWindow (52)
Methods inherited from GtkWidget (159)
Methods inherited from GtkBuildable (1)

Properties

Gtk.AboutDialog:artists

The people who contributed artwork to the program, as a NULL-terminated array of strings.

Gtk.AboutDialog:authors

The authors of the program, as a NULL-terminated array of strings.

Gtk.AboutDialog:comments

Comments about the program.

Gtk.AboutDialog:copyright

Copyright information for the program.

Gtk.AboutDialog:documenters

The people documenting the program, as a NULL-terminated array of strings.

Gtk.AboutDialog:license

The license of the program, as free form text.

Gtk.AboutDialog:license-type

The license of the program, as a value of the GtkLicense enumeration.

Gtk.AboutDialog:logo

A logo for the about box.

Gtk.AboutDialog:logo-icon-name

A named icon to use as the logo for the about box.

Gtk.AboutDialog:program-name

The name of the program.

Gtk.AboutDialog:system-information

Information about the system on which the program is running.

Gtk.AboutDialog:translator-credits

Credits to the translators. This string should be marked as translatable.

Gtk.AboutDialog:version

The version of the program.

Gtk.AboutDialog:website

The URL for the link to the website of the program.

Gtk.AboutDialog:website-label

The label for the link to the website of the program.

Gtk.AboutDialog:wrap-license

Whether to wrap the text in the license dialog.

Properties inherited from GtkAccessible (1)