Gtk.AboutDialog
const Gtk = imports.gi.Gtk;
let about_dialog = new Gtk.AboutDialog({
artists: value,
authors: value,
comments: value,
copyright: value,
documenters: value,
license: value,
license_type: value,
logo: value,
logo_icon_name: value,
program_name: value,
translator_credits: value,
version: value,
website: value,
website_label: value,
wrap_license: value,
});
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 <literal>About</literal> option from the <literal>Help</literal> menu. All parts of the dialog are optional.
About dialog often contain links and email addresses. GtkAboutDialog displays these as clickable links. By default, it calls show_uri when a user clicks one. The behaviour can be overridden with the Gtk.activate-link signal.
To make constructing a GtkAboutDialog as convenient as possible, you can use the function 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 <literal>_("About %s")</literal> 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: <informalexample><programlisting> gtk_show_about_dialog (NULL, "program-name", "ExampleCode", "logo", example_logo, "title" _("About ExampleCode"), NULL); </programlisting></informalexample>
It is also possible to show a Gtk.AboutDialog like any other Gtk.Dialog, e.g. using Gtk.run. In this case, you might need to know that the 'Close' button returns the #GTK_RESPONSE_CANCEL response id.
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
-
Gtk.Widget
-
Gtk.Container
-
Gtk.Bin
-
Gtk.Window
-
Gtk.Dialog
- Gtk.AboutDialog
-
-
-
-
-
-
Methods
- Gtk.AboutDialog.prototype.add_credit_section
- Gtk.AboutDialog.prototype.get_artists
- Gtk.AboutDialog.prototype.get_authors
- Gtk.AboutDialog.prototype.get_comments
- Gtk.AboutDialog.prototype.get_copyright
- Gtk.AboutDialog.prototype.get_documenters
- Gtk.AboutDialog.prototype.get_license
- Gtk.AboutDialog.prototype.get_license_type
- Gtk.AboutDialog.prototype.get_logo
- Gtk.AboutDialog.prototype.get_logo_icon_name
- Gtk.AboutDialog.prototype.get_program_name
- Gtk.AboutDialog.prototype.get_translator_credits
- Gtk.AboutDialog.prototype.get_version
- Gtk.AboutDialog.prototype.get_website
- Gtk.AboutDialog.prototype.get_website_label
- Gtk.AboutDialog.prototype.get_wrap_license
- Gtk.AboutDialog.prototype.set_artists
- Gtk.AboutDialog.prototype.set_authors
- Gtk.AboutDialog.prototype.set_comments
- Gtk.AboutDialog.prototype.set_copyright
- Gtk.AboutDialog.prototype.set_documenters
- Gtk.AboutDialog.prototype.set_license
- Gtk.AboutDialog.prototype.set_license_type
- Gtk.AboutDialog.prototype.set_logo
- Gtk.AboutDialog.prototype.set_logo_icon_name
- Gtk.AboutDialog.prototype.set_program_name
- Gtk.AboutDialog.prototype.set_translator_credits
- Gtk.AboutDialog.prototype.set_version
- Gtk.AboutDialog.prototype.set_website
- Gtk.AboutDialog.prototype.set_website_label
- Gtk.AboutDialog.prototype.set_wrap_license