GtkAboutDialog: GtkAboutDialog

Description Methods and Functions Hierarchy Interfaces Detailed Description Structures Convenient Construction User Functions Properties Author(s) References

Description

Display information about an application

Methods and Functions

gtkAboutDialogNew(show = TRUE)
gtkAboutDialogGetName(object)
gtkAboutDialogGetName(object)
gtkAboutDialogSetName(object, name = NULL)
gtkAboutDialogSetName(object, name = NULL)
gtkAboutDialogGetProgramName(object)
gtkAboutDialogSetProgramName(object, name)
gtkAboutDialogGetVersion(object)
gtkAboutDialogSetVersion(object, version = NULL)
gtkAboutDialogGetCopyright(object)
gtkAboutDialogSetCopyright(object, copyright = NULL)
gtkAboutDialogGetComments(object)
gtkAboutDialogSetComments(object, comments = NULL)
gtkAboutDialogGetLicense(object)
gtkAboutDialogSetLicense(object, license = NULL)
gtkAboutDialogGetWrapLicense(object)
gtkAboutDialogSetWrapLicense(object, wrap.license)
gtkAboutDialogGetWebsite(object)
gtkAboutDialogSetWebsite(object, website = NULL)
gtkAboutDialogGetWebsiteLabel(object)
gtkAboutDialogSetWebsiteLabel(object, website.label = NULL)
gtkAboutDialogGetAuthors(object)
gtkAboutDialogSetAuthors(object, authors)
gtkAboutDialogGetArtists(object)
gtkAboutDialogSetArtists(object, artists)
gtkAboutDialogGetDocumenters(object)
gtkAboutDialogSetDocumenters(object, documenters)
gtkAboutDialogGetTranslatorCredits(object)
gtkAboutDialogSetTranslatorCredits(object, translator.credits = NULL)
gtkAboutDialogGetLogo(object)
gtkAboutDialogSetLogo(object, logo = NULL)
gtkAboutDialogGetLogoIconName(object)
gtkAboutDialogSetLogoIconName(object, icon.name = NULL)
gtkAboutDialogSetEmailHook(func, data = NULL)
gtkAboutDialogSetUrlHook(func, data = NULL)
gtkShowAboutDialog(parent, ...)
gtkAboutDialog(show = TRUE)

Hierarchy

1
2
3
4
5
6
7
8
9
GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----GtkAboutDialog

Interfaces

GtkAboutDialog implements AtkImplementorIface and GtkBuildable.

Detailed Description

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 dialog often contain links and email addresses. GtkAboutDialog supports this by offering global hooks, which are called when the user clicks on a link or email address, see gtkAboutDialogSetEmailHook and gtkAboutDialogSetUrlHook. 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.

Since 2.18 GtkAboutDialog provides default website and email hooks that use gtkShowUri.

If you want provide your own hooks overriding the default ones, it is important to do so before setting the website and email URL properties, like this:

1
2
gtkShowAboutDialog(NULL, "name" = "ExampleCode", "logo" = example_logo,
                   "title" = "About ExampleCode")

To disable the default hooks, you can pass NULL as the hook func. Then, the GtkAboutDialog widget will not display the website or the email addresses as clickable.

To make constructing a GtkAboutDialog as convenient as possible, you can use the function gtkShowAboutDialog 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:

1
about$setTranslatorCredits(gettext("translator-credits"))

Note that prior to GTK+ 2.12, the "program-name" property was called "name". This was changed to avoid the conflict with the "name" property.

Structures

GtkAboutDialog

The GtkAboutDialog struct contains only private fields and should not be directly accessed.

Convenient Construction

gtkAboutDialog is the equivalent of gtkAboutDialogNew.

User Functions

GtkAboutDialogActivateLinkFunc(about, link., data)

The type of a function which is called when a URL or email link is activated.

about

the GtkAboutDialog in which the link was activated

link.

the URL or email address to which the activated link points

data

user data that was passed when the function was registered with gtkAboutDialogSetEmailHook or gtkAboutDialogSetUrlHook

Properties

artists [character list : Read / Write]

The people who contributed artwork to the program, as a NULL-terminated array of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details. Since 2.6

authors [character list : Read / Write]

The authors of the program, as a list of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details. Since 2.6

comments [character : * : Read / Write]

Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a detailed list of features. Default value: NULL Since 2.6

copyright [character : * : Read / Write]

Copyright information for the program. Default value: NULL Since 2.6

documenters [character list : Read / Write]

The people documenting the program, as a list of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details. Since 2.6

license [character : * : Read / Write]

The license of the program. This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note that the text is only wrapped in the text view if the "wrap-license" property is set to TRUE; otherwise the text itself must contain the intended linebreaks. Default value: NULL Since 2.6

logo [GdkPixbuf : * : Read / Write]

A logo for the about box. If this is not set, it defaults to gtkWindowGetDefaultIconList. Since 2.6

logo-icon-name [character : * : Read / Write]

A named icon to use as the logo for the about box. This property overrides the "logo" property. Default value: NULL Since 2.6

program-name [character : * : Read / Write]

The name of the program. If this is not set, it defaults to gGetApplicationName(). Default value: NULL Since 2.12

translator-credits [character : * : Read / Write]

Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details. Default value: NULL Since 2.6

version [character : * : Read / Write]

The version of the program. Default value: NULL Since 2.6

website [character : * : Read / Write]

The URL for the link to the website of the program. This should be a string starting with "http://. Default value: NULL Since 2.6

website-label [character : * : Read / Write]

The label for the link to the website of the program. If this is not set, it defaults to the URL specified in the "website" property. Default value: NULL Since 2.6

wrap-license [logical : Read / Write]

Whether to wrap the text in the license dialog. Default value: FALSE Since 2.8

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gtk2/stable/GtkAboutDialog.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to GtkAboutDialog in RGtk2...