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 gtk.about_dialog.AboutDialog.activateLink 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:
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
gtk.about_dialog.AboutDialog has a single CSS node with the name window and style class .aboutdialog.
AboutDialogGidBuilder builder() static nothrowGet builder for [gtk.about_dialog.AboutDialog] Returns: New builder objectvoid comments(string propval) @property nothrowSet `comments` property. Params: propval = Comments about the program.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, as free-form text.void license(string propval) @property nothrowSet `license` property. Params: propval = The license of the program, as free-form text.gtk.types.License licenseType() @property nothrowGet `licenseType` property. Returns: The license of the program.void licenseType(gtk.types.License propval) @property nothrowSet `licenseType` property. Params: propval = The license of the program.gdk.paintable.Paintable logo() @property nothrowGet `logo` property. Returns: A logo for the about box.void logo(gdk.paintable.Paintable propval) @property nothrowSet `logo` property. Params: propval = A logo for the about box.string logoIconName() @property nothrowGet `logoIconName` property. Returns: A named icon to use as the logo for the about box.void logoIconName(string propval) @property nothrowSet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.void programName(string propval) @property nothrowSet `programName` property. Params: propval = The name of the program.string systemInformation() @property nothrowGet `systemInformation` property. Returns: Information about the system on which the program is running.void systemInformation(string propval) @property nothrowSet `systemInformation` property. Params: propval = Information about the system on which the program is running.string translatorCredits() @property nothrowGet `translatorCredits` property. Returns: Credits to the translators.void translatorCredits(string propval) @property nothrowSet `translatorCredits` property. Params: propval = Credits to the translators.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.void website(string propval) @property nothrowSet `website` property. Params: propval = The URL for the link to the website of the program.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 names of the artists which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the artistsstring[] getAuthors() nothrowReturns the names of the authors which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the authorsstring[] getDocumenters() nothrowReturns the name of the documenters which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the documentersgtk.types.License getLicenseType() nothrowRetrieves the license type. Returns: a [gtk.types.License] valuegdk.paintable.Paintable getLogo() nothrowReturns 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() nothrowReturns 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() nothrowReturns the program name displayed in the about dialog. Returns: The program namestring getSystemInformation() nothrowReturns the system information that is shown in the about dialog. Returns: the system informationstring getTranslatorCredits() nothrowReturns the translator credits string which is displayed in the credits page. Returns: The translator credits stringstring getWebsiteLabel() nothrowReturns the label used for the website link. Returns: The label used for the website linkbool getWrapLicense() nothrowReturns whether the license text in the about dialog is automatically wrapped. Returns: `TRUE` if the license text is wrappedvoid setArtists(string[] artists) nothrowSets the names of the artists to be displayed in the "Credits" page.void setAuthors(string[] authors) nothrowSets the names of the authors which are displayed in the "Credits" page of the about dialog.void setComments(string comments = null) nothrowSets the comments string to display in the about dialog.void setCopyright(string copyright = null) nothrowSets the copyright string to display in the about dialog.void setDocumenters(string[] documenters) nothrowSets the names of the documenters which are displayed in the "Credits" page.void setLicense(string license = null) nothrowSets the license information to be displayed in the about dialog.void setLicenseType(gtk.types.License licenseType) nothrowSets the license of the application showing the about dialog from a list of known licenses.void setLogoIconName(string iconName = null) nothrowSets the icon name to be displayed as logo in the about dialog.void setSystemInformation(string systemInformation = null) nothrowSets the system information to be displayed in the about dialog.void setTranslatorCredits(string translatorCredits = null) nothrowSets the translator credits string which is displayed in the credits page.void setVersion(string version_ = null) nothrowSets the version string to display in the about dialog.void setWrapLicense(bool wrapLicense) nothrowSets 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) nothrowConnect to `ActivateLink` signal.Fluent builder implementation template for gtk.about_dialog.AboutDialog
T comments(string propval) nothrowSet `comments` property. Params: propval = Comments about the program.T copyright(string propval) nothrowSet `copyright` property. Params: propval = Copyright information for the program. Returns: Builder instance for fluent chainingT license(string propval) nothrowSet `license` property. Params: propval = The license of the program, as free-form text.T licenseType(gtk.types.License propval) nothrowSet `licenseType` property. Params: propval = The license of the program.T logo(gdk.paintable.Paintable propval) nothrowSet `logo` property. Params: propval = A logo for the about box.T logoIconName(string propval) nothrowSet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.T programName(string propval) nothrowSet `programName` property. Params: propval = The name of the program.T systemInformation(string propval) nothrowSet `systemInformation` property. Params: propval = Information about the system on which the program is running.T translatorCredits(string propval) nothrowSet `translatorCredits` property. Params: propval = Credits to the translators.T version_(string propval) nothrowSet `version_` property. Params: propval = The version of the program. Returns: Builder instance for fluent chainingT website(string propval) nothrowSet `website` property. Params: propval = The URL for the link to the website of the program.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 chainingT wrapLicense(bool propval) nothrowSet `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