Display information about an application
The <gtk-about-dialog>
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 dialog often contain links and email addresses. <gtk-about-dialog>
supports this by offering global hooks, which are called when the user clicks on
a link or email address, see gtk-about-dialog-set-email-hook
and
gtk-about-dialog-set-url-hook
. Email addresses in the authors,
documenters and artists properties are recognized by looking for
‘<user@host>’, URLs are recognized by looking for ‘http://url’, with
‘url’ extending to the next space, tab or line break.
To make constructing a <gtk-about-dialog>
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.
Derives from
<gtk-dialog>
.This class defines the following slots:
program-name
- The name of the program. If this is not set, it defaults to g_get_application_name()
version
- The version of the program
copyright
- Copyright information for the program
comments
- Comments about the program
website
- The URL for the link to the website of the program
website-label
- The label for the link to the website of the program. If this is not set, it defaults to the URL
license
- The license of the program
authors
- List of authors of the program
documenters
- List of people documenting the program
translator-credits
- Credits to the translators. This string should be marked as translatable
artists
- List of people who have contributed artwork to the program
logo
- A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()
logo-icon-name
- A named icon to use as the logo for the about box.
wrap-license
- Whether to wrap the license text.
<gtk-widget>
)Creates a new
<gtk-about-dialog>
.
- ret
- a newly created
<gtk-about-dialog>
Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the program name displayed in the about dialog.
- about
- a
<gtk-about-dialog>
- ret
- The program name. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (name mchars
)Sets the name to display in the about dialog. If this is not set, it defaults to
g-get-application-name
.
- about
- a
<gtk-about-dialog>
- name
- the program name
Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the version string.
- about
- a
<gtk-about-dialog>
- ret
- The version string. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (version mchars
)Sets the version string to display in the about dialog.
- about
- a
<gtk-about-dialog>
- version
- the version string
Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the copyright string.
- about
- a
<gtk-about-dialog>
- ret
- The copyright string. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (copyright mchars
)Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.
- about
- a
<gtk-about-dialog>
- copyright
- the copyright string
Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the license information.
- about
- a
<gtk-about-dialog>
- ret
- The license information. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (license mchars
)Sets the license information to be displayed in the secondary license dialog. If license is ‘
#f
’, the license button is hidden.
- about
- a
<gtk-about-dialog>
- license
- the license information or ‘
#f
’Since 2.6
<gtk-about-dialog>
) ⇒ (ret bool
)Returns whether the license text in about is automatically wrapped.
- about
- a
<gtk-about-dialog>
- ret
- ‘
#t
’ if the license text is wrappedSince 2.8
<gtk-about-dialog>
) (wrap_license bool
)Sets whether the license text in about is automatically wrapped.
- about
- a
<gtk-about-dialog>
- wrap-license
- whether to wrap the license
Since 2.8
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the website URL.
- about
- a
<gtk-about-dialog>
- ret
- The website URL. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (website mchars
)Sets the URL to use for the website link.
- about
- a
<gtk-about-dialog>
- website
- a URL string starting with "http://"
Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the label used for the website link.
- about
- a
<gtk-about-dialog>
- ret
- The label used for the website link. The string is owned by the about dialog and must not be modified.
Since 2.6
<gtk-about-dialog>
) (website_label mchars
)Sets the label to be used for the website link. It defaults to the website URL.
- about
- a
<gtk-about-dialog>
- website-label
- the label used for the website link
Since 2.6
<gtk-about-dialog>
) ⇒ (ret <gdk-pixbuf>
)Returns the pixbuf displayed as logo in the about dialog.
- about
- a
<gtk-about-dialog>
- ret
- 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
g-object-ref
on it.Since 2.6
<gtk-about-dialog>
) (logo <gdk-pixbuf>
)Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘
#f
’, the default window icon set withgtk-window-set-default-icon
will be used.
- about
- a
<gtk-about-dialog>
- logo
- a
<gdk-pixbuf>
, or ‘#f
’Since 2.6
<gtk-about-dialog>
) ⇒ (ret mchars
)Returns the icon name displayed as logo in the about dialog.
- about
- a
<gtk-about-dialog>
- ret
- 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
g-strdup
on it.Since 2.6
<gtk-about-dialog>
) (icon_name mchars
)Sets the pixbuf to be displayed as logo in the about dialog. If it is ‘
#f
’, the default window icon set withgtk-window-set-default-icon
will be used.
- about
- a
<gtk-about-dialog>
- icon-name
- an icon name, or ‘
#f
’Since 2.6