AboutDialog

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.

class AboutDialog : Dialog {}

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Creates a new #GtkAboutDialog.

Members

Functions

addCreditSection
void addCreditSection(string sectionName, string[] people)

Creates a new section in the Credits page.

connectActivateLink
gulong connectActivateLink(T callback, Flag!"After" after)

Connect to ActivateLink signal.

getArtists
string[] getArtists()

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

getAuthors
string[] getAuthors()

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

getComments
string getComments()

Returns the comments string.

getCopyright
string getCopyright()

Returns the copyright string.

getDocumenters
string[] getDocumenters()

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

getLicense
string getLicense()

Returns the license information.

getLicenseType
gtk.types.License getLicenseType()

Retrieves the license set using gtk.about_dialog.AboutDialog.setLicenseType

getLogo
gdkpixbuf.pixbuf.Pixbuf getLogo()

Returns the pixbuf displayed as logo in the about dialog.

getLogoIconName
string getLogoIconName()

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

getProgramName
string getProgramName()

Returns the program name displayed in the about dialog.

getTranslatorCredits
string getTranslatorCredits()

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

getVersion
string getVersion()

Returns the version string.

getWebsite
string getWebsite()

Returns the website URL.

getWebsiteLabel
string getWebsiteLabel()

Returns the label used for the website link.

getWrapLicense
bool getWrapLicense()

Returns whether the license text in about is automatically wrapped.

self
AboutDialog self()

Returns this, for use in with statements.

setArtists
void setArtists(string[] artists)

Sets the strings which are displayed in the artists tab of the secondary credits dialog.

setAuthors
void setAuthors(string[] authors)

Sets the strings which are displayed in the authors tab of the secondary credits dialog.

setComments
void setComments(string comments)

Sets the comments string to display in the about dialog. This should be a short string of one or two lines.

setCopyright
void setCopyright(string copyright)

Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.

setDocumenters
void setDocumenters(string[] documenters)

Sets the strings which are displayed in the documenters tab of the secondary credits dialog.

setLicense
void setLicense(string license)

Sets the license information to be displayed in the secondary license dialog. If license is null, the license button is hidden.

setLicenseType
void setLicenseType(gtk.types.License licenseType)

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

setLogo
void setLogo(gdkpixbuf.pixbuf.Pixbuf logo)

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.

setLogoIconName
void setLogoIconName(string iconName)

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.

setProgramName
void setProgramName(string name)

Sets the name to display in the about dialog. If this is not set, it defaults to glib.global.getApplicationName.

setTranslatorCredits
void setTranslatorCredits(string translatorCredits)

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

setVersion
void setVersion(string version_)

Sets the version string to display in the about dialog.

setWebsite
void setWebsite(string website)

Sets the URL to use for the website link.

setWebsiteLabel
void setWebsiteLabel(string websiteLabel)

Sets the label to be used for the website link.

setWrapLicense
void setWrapLicense(bool wrapLicense)

Sets whether the license text in about is automatically wrapped.

Properties

_gType
GType _gType [@property getter]
comments
string comments [@property getter]

Get comments property.

comments
string comments [@property setter]

Set comments property.

copyright
string copyright [@property getter]

Get copyright property.

copyright
string copyright [@property setter]

Set copyright property.

license
string license [@property getter]

Get license property.

license
string license [@property setter]

Set license property.

licenseType
gtk.types.License licenseType [@property getter]

Get licenseType property.

licenseType
gtk.types.License licenseType [@property setter]

Set licenseType property.

logo
gdkpixbuf.pixbuf.Pixbuf logo [@property getter]

Get logo property.

logo
gdkpixbuf.pixbuf.Pixbuf logo [@property setter]

Set logo property.

logoIconName
string logoIconName [@property getter]

Get logoIconName property.

logoIconName
string logoIconName [@property setter]

Set logoIconName property.

programName
string programName [@property getter]

Get programName property.

programName
string programName [@property setter]

Set programName property.

translatorCredits
string translatorCredits [@property getter]

Get translatorCredits property.

translatorCredits
string translatorCredits [@property setter]

Set translatorCredits property.

version_
string version_ [@property getter]

Get version_ property.

version_
string version_ [@property setter]

Set version_ property.

website
string website [@property getter]

Get website property.

website
string website [@property setter]

Set website property.

websiteLabel
string websiteLabel [@property getter]

Get websiteLabel property.

websiteLabel
string websiteLabel [@property setter]

Set websiteLabel property.

wrapLicense
bool wrapLicense [@property getter]

Get wrapLicense property.

wrapLicense
bool wrapLicense [@property setter]

Set wrapLicense property.

Static functions

_getGType
GType _getGType()
builder
AboutDialogGidBuilder builder()

Get builder for gtk.about_dialog.AboutDialog

Inherited Members

From Dialog

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Dialog self()

Returns this, for use in with statements.

builder
DialogGidBuilder builder()

Get builder for gtk.dialog.Dialog

useHeaderBar
int useHeaderBar [@property getter]

Get useHeaderBar property.

addActionWidget
void addActionWidget(gtk.widget.Widget child, int responseId)

Adds an activatable widget to the action area of a #GtkDialog, connecting a signal handler that will emit the #GtkDialog::response signal on the dialog when the widget is activated. The widget is appended to the end of the dialog’s action area. If you want to add a non-activatable widget, simply pack it into the action_area field of the #GtkDialog struct.

addButton
gtk.widget.Widget addButton(string buttonText, int responseId)

Adds a button with the given text and sets things up so that clicking the button will emit the #GtkDialog::response signal with the given response_id. The button is appended to the end of the dialog’s action area. The button widget is returned, but usually you don’t need it.

getActionArea
gtk.box.Box getActionArea()

Returns the action area of dialog.

getContentArea
gtk.box.Box getContentArea()

Returns the content area of dialog.

getHeaderBar
gtk.header_bar.HeaderBar getHeaderBar()

Returns the header bar of dialog. Note that the headerbar is only used by the dialog if the #GtkDialog:use-header-bar property is true.

getResponseForWidget
int getResponseForWidget(gtk.widget.Widget widget)

Gets the response id of a widget in the action area of a dialog.

getWidgetForResponse
gtk.widget.Widget getWidgetForResponse(int responseId)

Gets the widget button that uses the given response ID in the action area of a dialog.

response
void response(int responseId)

Emits the #GtkDialog::response signal with the given response ID. Used to indicate that the user has responded to the dialog in some way; typically either you or gtk.dialog.Dialog.run will be monitoring the ::response signal and take appropriate action.

run
int run()

Blocks in a recursive main loop until the dialog either emits the #GtkDialog::response signal, or is destroyed. If the dialog is destroyed during the call to gtk.dialog.Dialog.run, gtk.dialog.Dialog.run returns #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the ::response signal emission.

setAlternativeButtonOrderFromArray
void setAlternativeButtonOrderFromArray(int[] newOrder)

Sets an alternative button order. If the #GtkSettings:gtk-alternative-button-order setting is set to true, the dialog buttons are reordered according to the order of the response ids in new_order.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the last widget in the dialog’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

Calls gtk_widget_set_sensitive (widget, setting) for each widget in the dialog’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.

connectClose
gulong connectClose(T callback, Flag!"After" after)

Connect to Close signal.

connectResponse
gulong connectResponse(T callback, Flag!"After" after)

Connect to Response signal.