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 _getGType() static nothrow
GType _gType() @property nothrow
AboutDialog self() nothrowReturns `this`, for use in `with` statements.
AboutDialogGidBuilder builder() static nothrowGet builder for [gtk.about_dialog.AboutDialog] Returns: New builder object
string comments() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `copyright` property. Returns: Copyright information for the program.
void copyright(string propval) @property nothrowSet `copyright` property. Params: propval = Copyright information for the program.
string license() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `licenseType` property. Returns: The license of the program, as a value of the [gtk.types.License] enumeration.
void licenseType(gtk.types.License propval) @property nothrowSet `licenseType` property. Params: propval = The license of the program, as a value of the [gtk.types.License] enumeration.
gdkpixbuf.pixbuf.Pixbuf logo() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `programName` property. Returns: The name of the program. If this is not set, it defaults to [glib.global.getApplicationName].
void programName(string propval) @property nothrowSet `programName` property. Params: propval = The name of the program. If this is not set, it defaults to [glib.global.getApplicationName].
string translatorCredits() @property nothrowGet `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) @property nothrowSet `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_() @property nothrowGet `version_` property. Returns: The version of the program.
void version_(string propval) @property nothrowSet `version_` property. Params: propval = The version of the program.
string website() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `websiteLabel` property. Returns: The label for the link to the website of the program.
void websiteLabel(string propval) @property nothrowSet `websiteLabel` property. Params: propval = The label for the link to the website of the program.
bool wrapLicense() @property nothrowGet `wrapLicense` property. Returns: Whether to wrap the text in the license dialog.
void wrapLicense(bool propval) @property nothrowSet `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog.
void addCreditSection(string sectionName, string[] people) nothrowCreates a new section in the Credits page.
string[] getArtists() nothrowReturns 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() nothrowReturns 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() nothrowReturns the comments string. Returns: The comments. The string is owned by the about dialog and must not be modified.
string getCopyright() nothrowReturns the copyright string. Returns: The copyright string. The string is owned by the about dialog and must not be modified.
string[] getDocumenters() nothrowReturns 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() nothrowReturns the license information. Returns: The license information. The string is owned by the about dialog and must not be modified.
gtk.types.License getLicenseType() nothrowRetrieves the license set using [gtk.about_dialog.AboutDialog.setLicenseType] Returns: a #GtkLicense value
gdkpixbuf.pixbuf.Pixbuf getLogo() nothrowReturns 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() nothrowReturns 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() nothrowReturns 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() nothrowReturns 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() nothrowReturns the version string. Returns: The version string. The string is owned by the about dialog and must not be modified.
string getWebsite() nothrowReturns the website URL. Returns: The website URL. The string is owned by the about dialog and must not be modified.
string getWebsiteLabel() nothrowReturns 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() nothrowReturns whether the license text in about is automatically wrapped. Returns: true if the license text is wrapped
void setArtists(string[] artists) nothrowSets the strings which are displayed in the artists tab of the secondary credits dialog.
void setAuthors(string[] authors) nothrowSets the strings which are displayed in the authors tab of the secondary credits dialog.
void setComments(string comments = null) nothrowSets 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) nothrowSets the copyright string to display in the about dialog. This should be a short string of one or two lines.
void setDocumenters(string[] documenters) nothrowSets the strings which are displayed in the documenters tab of the secondary credits dialog.
void setLicense(string license = null) nothrowSets 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) nothrowSets the license of the application showing the about dialog from a list of known licenses.
void setLogo(gdkpixbuf.pixbuf.Pixbuf logo = null) nothrowSets 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) nothrowSets 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) nothrowSets the name to display in the about dialog. If this is not set, it defaults to [glib.global.getApplicationName].
void setTranslatorCredits(string translatorCredits = null) nothrowSets the translator credits string which is displayed in the translators tab of the secondary credits dialog.
void setVersion(string version_ = null) nothrowSets the version string to display in the about dialog.
void setWebsite(string website = null) nothrowSets the URL to use for the website link.
void setWebsiteLabel(string websiteLabel) nothrowSets the label to be used for the website link.
void setWrapLicense(bool wrapLicense) nothrowSets 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) nothrowConnect to `ActivateLink` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkAboutDialog. Returns: a newly created #GtkAboutDialog

Fluent builder implementation template for gtk.about_dialog.AboutDialog

Methods
T comments(string propval) nothrowSet `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) nothrowSet `copyright` property. Params: propval = Copyright information for the program. Returns: Builder instance for fluent chaining
T license(string propval) nothrowSet `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) nothrowSet `licenseType` property. Params: propval = The license of the program, as a value of the [gtk.types.License] enumeration.
T logo(gdkpixbuf.pixbuf.Pixbuf propval) nothrowSet `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) nothrowSet `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) nothrowSet `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) nothrowSet `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) nothrowSet `version_` property. Params: propval = The version of the program. Returns: Builder instance for fluent chaining
T website(string propval) nothrowSet `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) nothrowSet `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) nothrowSet `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

Methods
AboutDialog build() nothrowCreate object from builder. Returns: New object