gtk.about_dialog
Module for [AboutDialog] class
Types 3
The [gtk.about_dialog.AboutDialog] 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.
About dialogs often contain links and email addresses. [gtk.about_dialog.AboutDialog] displays these as clickable links. By default, it calls [gtk.file_launcher.FileLauncher.launch] when a user clicks one. The behaviour can be overridden with the signal@Gtk.AboutDialog::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 [gtk.about_dialog.AboutDialog] 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 a [gtk.about_dialog.AboutDialog],
as shown in the following example:
CODEBLOCK0
## CSS nodes
[gtk.about_dialog.AboutDialog] has a single CSS node with the name window and style
class .aboutdialog`.
AboutDialog self()Returns `this`, for use in `with` statements.AboutDialogGidBuilder builder()Get builder for [gtk.about_dialog.AboutDialog] Returns: New builder objectvoid comments(string propval) @propertySet `comments` property. Params: propval = Comments about the program.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, as free-form text.void license(string propval) @propertySet `license` property. Params: propval = The license of the program, as free-form text.gtk.types.License licenseType() @propertyGet `licenseType` property. Returns: The license of the program.void licenseType(gtk.types.License propval) @propertySet `licenseType` property. Params: propval = The license of the program.void logo(gdk.paintable.Paintable propval) @propertySet `logo` property. Params: propval = A logo for the about box.string logoIconName() @propertyGet `logoIconName` property. Returns: A named icon to use as the logo for the about box.void logoIconName(string propval) @propertySet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.void programName(string propval) @propertySet `programName` property. Params: propval = The name of the program.string systemInformation() @propertyGet `systemInformation` property. Returns: Information about the system on which the program is running.void systemInformation(string propval) @propertySet `systemInformation` property. Params: propval = Information about the system on which the program is running.string translatorCredits() @propertyGet `translatorCredits` property. Returns: Credits to the translators.void translatorCredits(string propval) @propertySet `translatorCredits` property. Params: propval = Credits to the translators.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.void website(string propval) @propertySet `website` property. Params: propval = The URL for the link to the website of the program.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 names of the artists which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the artistsstring[] getAuthors()Returns the names of the authors which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the authorsstring getComments()Returns the comments string. Returns: The commentsstring getCopyright()Returns the copyright string. Returns: The copyright stringstring[] getDocumenters()Returns the name of the documenters which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the documentersstring getLicense()Returns the license information. Returns: The license informationgtk.types.License getLicenseType()Retrieves the license type. Returns: a [gtk.types.License] valuegdk.paintable.Paintable getLogo()Returns the paintable displayed as logo in the about dialog. Returns: the paintable displayed as logo or `NULL` if the logo is unset or has been set via [gtk.about_dialog.AboutDialog.setLogoIconName]string getLogoIconName()Returns the icon name displayed as logo in the about dialog. Returns: the icon name displayed as logo, or `NULL` if the logo has been set via [gtk.about_dialog.AboutDialog.setLogo]string getProgramName()Returns the program name displayed in the about dialog. Returns: The program namestring getSystemInformation()Returns the system information that is shown in the about dialog. Returns: the system informationstring getTranslatorCredits()Returns the translator credits string which is displayed in the credits page. Returns: The translator credits stringstring getVersion()Returns the version string. Returns: The version stringstring getWebsite()Returns the website URL. Returns: The website URLstring getWebsiteLabel()Returns the label used for the website link. Returns: The label used for the website linkbool getWrapLicense()Returns whether the license text in the about dialog is automatically wrapped. Returns: `TRUE` if the license text is wrappedvoid setArtists(string[] artists)Sets the names of the artists to be displayed in the "Credits" page.void setAuthors(string[] authors)Sets the names of the authors which are displayed in the "Credits" page of the about dialog.void setComments(string comments = null)Sets the comments string to display in the about dialog.void setCopyright(string copyright = null)Sets the copyright string to display in the about dialog.void setDocumenters(string[] documenters)Sets the names of the documenters which are displayed in the "Credits" page.void setLicense(string license = null)Sets the license information to be displayed in the about dialog.void setLicenseType(gtk.types.License licenseType)Sets the license of the application showing the about dialog from a list of known licenses.void setLogo(gdk.paintable.Paintable logo = null)Sets the logo in the about dialog.void setLogoIconName(string iconName = null)Sets the icon name to be displayed as logo in the about dialog.void setProgramName(string name = null)Sets the name to display in the about dialog.void setSystemInformation(string systemInformation = null)Sets the system information to be displayed in the about dialog.void setTranslatorCredits(string translatorCredits = null)Sets the translator credits string which is displayed in the credits page.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 the about dialog should be 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.T comments(string propval)Set `comments` property. Params: propval = Comments about the program.T copyright(string propval)Set `copyright` property. Params: propval = Copyright information for the program. Returns: Builder instance for fluent chainingT license(string propval)Set `license` property. Params: propval = The license of the program, as free-form text.T licenseType(gtk.types.License propval)Set `licenseType` property. Params: propval = The license of the program.T logo(gdk.paintable.Paintable propval)Set `logo` property. Params: propval = A logo for the about box.T logoIconName(string propval)Set `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.T programName(string propval)Set `programName` property. Params: propval = The name of the program.T systemInformation(string propval)Set `systemInformation` property. Params: propval = Information about the system on which the program is running.T translatorCredits(string propval)Set `translatorCredits` property. Params: propval = Credits to the translators.T version_(string propval)Set `version_` property. Params: propval = The version of the program. Returns: Builder instance for fluent chainingT website(string propval)Set `website` property. Params: propval = The URL for the link to the website of the program.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 chainingT wrapLicense(bool propval)Set `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog. Returns: Builder instance for fluent chainingFluent builder for [gtk.about_dialog.AboutDialog]