gtk.about_dialog

Module for [AboutDialog] class

Types 3

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.

About dialogs often contain links and email addresses. GtkAboutDialog displays these as clickable links. By default, it calls [gtk.global.showUriOnWindow] 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 http://www.gtk.org".

To make constructing a GtkAboutDialog as convenient as possible, you can use the function [gtk.global.showAboutDialog] 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:

GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
gtk_show_about_dialog (NULL,
                      "program-name", "ExampleCode",
                      "logo", example_logo,
                      "title", _("About ExampleCode"),
                      NULL);

It is also possible to show a #GtkAboutDialog like any other #GtkDialog, e.g. using [gtk.dialog.Dialog.run]. In this case, you might need to know that the “Close” button returns the #GTK_RESPONSE_CANCEL response id.

Methods
GType _gType() @property
AboutDialog self()Returns `this`, for use in `with` statements.
AboutDialogGidBuilder builder()Get builder for [gtk.about_dialog.AboutDialog] Returns: New builder object
string comments() @propertyGet `comments` property. Returns: Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a...
void comments(string propval) @propertySet `comments` property. Params: propval = Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the progr...
string copyright() @propertyGet `copyright` property. Returns: Copyright information for the program.
void copyright(string propval) @propertySet `copyright` property. Params: propval = Copyright information for the program.
string license() @propertyGet `license` property. Returns: The license of the program. This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note that the te...
void license(string propval) @propertySet `license` property. Params: propval = The license of the program. This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note th...
gtk.types.License licenseType() @propertyGet `licenseType` property. Returns: The license of the program, as a value of the [gtk.types.License] enumeration.
void licenseType(gtk.types.License propval) @propertySet `licenseType` property. Params: propval = The license of the program, as a value of the [gtk.types.License] enumeration.
gdkpixbuf.pixbuf.Pixbuf logo() @propertyGet `logo` property. Returns: A logo for the about box. If it is null, the default window icon set with [gtk.window.Window.setDefaultIcon] will be used.
void logo(gdkpixbuf.pixbuf.Pixbuf propval) @propertySet `logo` property. Params: propval = A logo for the about box. If it is null, the default window icon set with [gtk.window.Window.setDefaultIcon] will be used.
string logoIconName() @propertyGet `logoIconName` property. Returns: A named icon to use as the logo for the about box. This property overrides the #GtkAboutDialog:logo property.
void logoIconName(string propval) @propertySet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box. This property overrides the #GtkAboutDialog:logo property.
string programName() @propertyGet `programName` property. Returns: The name of the program. If this is not set, it defaults to [glib.global.getApplicationName].
void programName(string propval) @propertySet `programName` property. Params: propval = The name of the program. If this is not set, it defaults to [glib.global.getApplicationName].
string translatorCredits() @propertyGet `translatorCredits` property. Returns: Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displayed as link...
void translatorCredits(string propval) @propertySet `translatorCredits` property. Params: propval = Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displaye...
string version_() @propertyGet `version_` property. Returns: The version of the program.
void version_(string propval) @propertySet `version_` property. Params: propval = The version of the program.
string website() @propertyGet `website` property. Returns: The URL for the link to the website of the program. This should be a string starting with "http://.
void website(string propval) @propertySet `website` property. Params: propval = The URL for the link to the website of the program. This should be a string starting with "http://.
string websiteLabel() @propertyGet `websiteLabel` property. Returns: The label for the link to the website of the program.
void websiteLabel(string propval) @propertySet `websiteLabel` property. Params: propval = The label for the link to the website of the program.
bool wrapLicense() @propertyGet `wrapLicense` property. Returns: Whether to wrap the text in the license dialog.
void wrapLicense(bool propval) @propertySet `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog.
void addCreditSection(string sectionName, string[] people)Creates a new section in the Credits page.
string[] getArtists()Returns the string which are displayed in the artists tab of the secondary credits dialog. Returns: A null-terminated string array containing the artists. The array is owned by the about dialog and...
string[] getAuthors()Returns the string which are displayed in the authors tab of the secondary credits dialog. Returns: A null-terminated string array containing the authors. The array is owned by the about dialog and...
string getComments()Returns the comments string. Returns: The comments. The string is owned by the about dialog and must not be modified.
string getCopyright()Returns the copyright string. Returns: The copyright string. The string is owned by the about dialog and must not be modified.
string[] getDocumenters()Returns the string which are displayed in the documenters tab of the secondary credits dialog. Returns: A null-terminated string array containing the documenters. The array is owned by the about di...
string getLicense()Returns the license information. Returns: The license information. The string is owned by the about dialog and must not be modified.
gtk.types.License getLicenseType()Retrieves the license set using [gtk.about_dialog.AboutDialog.setLicenseType] Returns: a #GtkLicense value
gdkpixbuf.pixbuf.Pixbuf getLogo()Returns the pixbuf displayed as logo in the about dialog. Returns: 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 [go...
string getLogoIconName()Returns the icon name displayed as logo in the about dialog. Returns: 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 [gl...
string getProgramName()Returns the program name displayed in the about dialog. Returns: The program name. The string is owned by the about dialog and must not be modified.
string getTranslatorCredits()Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog. Returns: The translator credits string. The string is owned by the about dialog and ...
string getVersion()Returns the version string. Returns: The version string. The string is owned by the about dialog and must not be modified.
string getWebsite()Returns the website URL. Returns: The website URL. The string is owned by the about dialog and must not be modified.
string getWebsiteLabel()Returns the label used for the website link. Returns: The label used for the website link. The string is owned by the about dialog and must not be modified.
bool getWrapLicense()Returns whether the license text in about is automatically wrapped. Returns: true if the license text is wrapped
void setArtists(string[] artists)Sets the strings which are displayed in the artists tab of the secondary credits dialog.
void setAuthors(string[] authors)Sets the strings which are displayed in the authors tab of the secondary credits dialog.
void setComments(string comments = null)Sets the comments string to display in the about dialog. This should be a short string of one or two lines.
void setCopyright(string copyright = null)Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.
void setDocumenters(string[] documenters)Sets the strings which are displayed in the documenters tab of the secondary credits dialog.
void setLicense(string license = null)Sets the license information to be displayed in the secondary license dialog. If license is null, the license button is hidden.
void setLicenseType(gtk.types.License licenseType)Sets the license of the application showing the about dialog from a list of known licenses.
void setLogo(gdkpixbuf.pixbuf.Pixbuf logo = null)Sets the pixbuf to be displayed as logo in the about dialog. If it is null, the default window icon set with [gtk.window.Window.setDefaultIcon] will be used.
void setLogoIconName(string iconName = null)Sets the pixbuf to be displayed as logo in the about dialog. If it is null, the default window icon set with [gtk.window.Window.setDefaultIcon] will be used.
void setProgramName(string name)Sets the name to display in the about dialog. If this is not set, it defaults to [glib.global.getApplicationName].
void setTranslatorCredits(string translatorCredits = null)Sets the translator credits string which is displayed in the translators tab of the secondary credits dialog.
void setVersion(string version_ = null)Sets the version string to display in the about dialog.
void setWebsite(string website = null)Sets the URL to use for the website link.
void setWebsiteLabel(string websiteLabel)Sets the label to be used for the website link.
void setWrapLicense(bool wrapLicense)Sets whether the license text in about is automatically wrapped.
gulong connectActivateLink(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.about_dialog.AboutDialog))) && Parameters!T.length < 3)Connect to `ActivateLink` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkAboutDialog. Returns: a newly created #GtkAboutDialog
Methods
T comments(string propval)Set `comments` property. Params: propval = Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the progr...
T copyright(string propval)Set `copyright` property. Params: propval = Copyright information for the program. Returns: Builder instance for fluent chaining
T license(string propval)Set `license` property. Params: propval = The license of the program. This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note th...
T licenseType(gtk.types.License propval)Set `licenseType` property. Params: propval = The license of the program, as a value of the [gtk.types.License] enumeration.
T logo(gdkpixbuf.pixbuf.Pixbuf propval)Set `logo` property. Params: propval = A logo for the about box. If it is null, the default window icon set with [gtk.window.Window.setDefaultIcon] will be used. Returns: Builder instance for fluen...
T logoIconName(string propval)Set `logoIconName` property. Params: propval = A named icon to use as the logo for the about box. This property overrides the #GtkAboutDialog:logo property. Returns: Builder instance for fluent cha...
T programName(string propval)Set `programName` property. Params: propval = The name of the program. If this is not set, it defaults to [glib.global.getApplicationName]. Returns: Builder instance for fluent chaining
T translatorCredits(string propval)Set `translatorCredits` property. Params: propval = Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displaye...
T version_(string propval)Set `version_` property. Params: propval = The version of the program. Returns: Builder instance for fluent chaining
T website(string propval)Set `website` property. Params: propval = The URL for the link to the website of the program. This should be a string starting with "http://. Returns: Builder instance for fluent chaining
T websiteLabel(string propval)Set `websiteLabel` property. Params: propval = The label for the link to the website of the program. Returns: Builder instance for fluent chaining
T wrapLicense(bool propval)Set `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.about_dialog.AboutDialog]