![]() | ![]() | ![]() | GTK+ Reference Manual | ![]() |
---|
GtkAboutDialog — Display information about an application
#include <gtk/gtk.h> struct GtkAboutDialog; GtkWidget* gtk_about_dialog_new (void); G_CONST_RETURN gchar* gtk_about_dialog_get_name (GtkAboutDialog *about); void gtk_about_dialog_set_name (GtkAboutDialog *about, const gchar *name); G_CONST_RETURN gchar* gtk_about_dialog_get_version (GtkAboutDialog *about); void gtk_about_dialog_set_version (GtkAboutDialog *about, const gchar *version); G_CONST_RETURN gchar* gtk_about_dialog_get_copyright (GtkAboutDialog *about); void gtk_about_dialog_set_copyright (GtkAboutDialog *about, const gchar *copyright); G_CONST_RETURN gchar* gtk_about_dialog_get_comments (GtkAboutDialog *about); void gtk_about_dialog_set_comments (GtkAboutDialog *about, const gchar *comments); G_CONST_RETURN gchar* gtk_about_dialog_get_license (GtkAboutDialog *about); void gtk_about_dialog_set_license (GtkAboutDialog *about, const gchar *license); G_CONST_RETURN gchar* gtk_about_dialog_get_website (GtkAboutDialog *about); void gtk_about_dialog_set_website (GtkAboutDialog *about, const gchar *website); G_CONST_RETURN gchar* gtk_about_dialog_get_website_label (GtkAboutDialog *about); void gtk_about_dialog_set_website_label (GtkAboutDialog *about, const gchar *website_label); gchar** gtk_about_dialog_get_authors (GtkAboutDialog *about); void gtk_about_dialog_set_authors (GtkAboutDialog *about, gchar **authors); gchar** gtk_about_dialog_get_artists (GtkAboutDialog *about); void gtk_about_dialog_set_artists (GtkAboutDialog *about, gchar **artists); gchar** gtk_about_dialog_get_documenters (GtkAboutDialog *about); void gtk_about_dialog_set_documenters (GtkAboutDialog *about, gchar **documenters); G_CONST_RETURN gchar* gtk_about_dialog_get_translator_credits (GtkAboutDialog *about); void gtk_about_dialog_set_translator_credits (GtkAboutDialog *about, const gchar *translator_credits); GdkPixbuf* gtk_about_dialog_get_logo (GtkAboutDialog *about); void gtk_about_dialog_set_logo (GtkAboutDialog *about, GdkPixbuf *logo); void (*GtkAboutDialogActivateLinkFunc) (GtkAboutDialog *about, const gchar *link, gpointer data); GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy); GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy); void gtk_show_about_dialog (GtkWindow *parent, const gchar *first_property_name, ...);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----GtkAboutDialog
"artists" GStrv : Read / Write "authors" GStrv : Read / Write "comments" gchararray : Read / Write "copyright" gchararray : Read / Write "documenters" GStrv : Read / Write "license" gchararray : Read / Write "logo" GdkPixbuf : Read / Write "logo-icon-name" gchararray : Read / Write "name" gchararray : Read / Write "translator-credits" gchararray : Read / Write "version" gchararray : Read / Write "website" gchararray : Read / Write "website-label" gchararray : Read / Write
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 gtk_about_dialog_set_email_hook() and gtk_about_dialog_set_url_hook().
struct GtkAboutDialog;
The GtkAboutDialog struct contains only private fields and should not be directly accessed.
GtkWidget* gtk_about_dialog_new (void);
Creates a new GtkAboutDialog.
Returns : | a newly created GtkAboutDialog |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_name (GtkAboutDialog *about);
Returns the program name displayed in the about dialog.
about : | a GtkAboutDialog |
Returns : | The program name. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_name (GtkAboutDialog *about, const gchar *name);
Sets the name to display in the about dialog. If this is not set, it defaults to g_get_application_name().
about : | a GtkAboutDialog |
name : | the program name |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_version (GtkAboutDialog *about);
Returns the version string.
about : | a GtkAboutDialog |
Returns : | The version string. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_version (GtkAboutDialog *about, const gchar *version);
Sets the version string to display in the about dialog.
about : | a GtkAboutDialog |
version : | the version string |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_copyright (GtkAboutDialog *about);
Returns the copyright string.
about : | a GtkAboutDialog |
Returns : | The copyright string. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_copyright (GtkAboutDialog *about, const gchar *copyright);
Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.
about : | a GtkAboutDialog |
copyright : | the copyright string |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_comments (GtkAboutDialog *about);
Returns the comments string.
about : | a GtkAboutDialog |
Returns : | The comments. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_comments (GtkAboutDialog *about, const gchar *comments);
Sets the comments string to display in the about dialog. This should be a short string of one or two lines.
about : | a GtkAboutDialog |
comments : | a comments string |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_license (GtkAboutDialog *about);
Returns the license information.
about : | a GtkAboutDialog |
Returns : | The license information. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_license (GtkAboutDialog *about, const gchar *license);
Sets the license information to be displayed in the secondary license dialog. If license is NULL, the license button is hidden.
about : | a GtkAboutDialog |
license : | the license information or NULL |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_website (GtkAboutDialog *about);
Returns the website URL.
about : | a GtkAboutDialog |
Returns : | The website URL. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_website (GtkAboutDialog *about, const gchar *website);
Sets the URL to use for the website link.
about : | a GtkAboutDialog |
website : | a URL string starting with "http://" |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_website_label (GtkAboutDialog *about);
Returns the label used for the website link.
about : | a GtkAboutDialog |
Returns : | The label used for the website link. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_website_label (GtkAboutDialog *about, const gchar *website_label);
Sets the label to be used for the website link. It defaults to the website URL.
about : | a GtkAboutDialog |
website_label : | the label used for the website link |
Since 2.6
gchar** gtk_about_dialog_get_authors (GtkAboutDialog *about);
Returns the string which are displayed in the authors tab of the secondary credits dialog.
about : | a GtkAboutDialog |
Returns : | A NULL-terminated string array containing the authors. The array is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_authors (GtkAboutDialog *about, gchar **authors);
Sets the strings which are displayed in the authors tab of the secondary credits dialog.
about : | a GtkAboutDialog |
authors : | a NULL-terminated array of strings |
Since 2.6
gchar** gtk_about_dialog_get_artists (GtkAboutDialog *about);
Returns the string which are displayed in the artists tab of the secondary credits dialog.
about : | a GtkAboutDialog |
Returns : | A NULL-terminated string array containing the artists. The array is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_artists (GtkAboutDialog *about, gchar **artists);
Sets the strings which are displayed in the artists tab of the secondary credits dialog.
about : | a GtkAboutDialog |
artists : | a NULL-terminated array of strings |
Since 2.6
gchar** gtk_about_dialog_get_documenters (GtkAboutDialog *about);
Returns the string which are displayed in the documenters tab of the secondary credits dialog.
about : | a GtkAboutDialog |
Returns : | A NULL-terminated string array containing the documenters. The array is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_documenters (GtkAboutDialog *about, gchar **documenters);
Sets the strings which are displayed in the documenters tab of the secondary credits dialog.
about : | a GtkAboutDialog |
documenters : | a NULL-terminated array of strings |
Since 2.6
G_CONST_RETURN gchar* gtk_about_dialog_get_translator_credits (GtkAboutDialog *about);
Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog.
about : | a GtkAboutDialog |
Returns : | The translator credits string. The string is owned by the about dialog and must not be modified. |
Since 2.6
void gtk_about_dialog_set_translator_credits (GtkAboutDialog *about, const gchar *translator_credits);
Sets the translator credits string which is displayed in the translators tab of the secondary credits dialog.
The intended use for this string is to display the translator of the language which is currently used in the user interface. Using gettext(), a simple way to achieve that is to mark the string for translation:
gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
It is a good idea to use the customary msgid "translator-credits" for this purpose, since translators will already know the purpose of that msgid, and since GtkAboutDialog will detect if "translator-credits" is untranslated and hide the tab.
about : | a GtkAboutDialog |
translator_credits : | the translator credits |
Since 2.6
GdkPixbuf* gtk_about_dialog_get_logo (GtkAboutDialog *about);
Returns the pixbuf displayed as logo in the about dialog.
about : | a GtkAboutDialog |
Returns : | 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
void gtk_about_dialog_set_logo (GtkAboutDialog *about, GdkPixbuf *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_set_default_icon() will be used.
about : | a GtkAboutDialog |
logo : | a GdkPixbuf, or NULL |
Since 2.6
void (*GtkAboutDialogActivateLinkFunc) (GtkAboutDialog *about, const gchar *link, gpointer 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 whiche the activated link points |
data : |
GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy);
Installs a global function to be called whenever the user activates an email link in an about dialog.
func : | a function to call when an email link is activated. |
data : | data to pass to func |
destroy : | GDestroyNotify for data |
Returns : | the previous email hook. |
Since 2.6
GtkAboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook (GtkAboutDialogActivateLinkFunc func, gpointer data, GDestroyNotify destroy);
Installs a global function to be called whenever the user activates a URL link in an about dialog.
func : | a function to call when a URL link is activated. |
data : | data to pass to func |
destroy : | GDestroyNotify for data |
Returns : | the previous URL hook. |
Since 2.6
void gtk_show_about_dialog (GtkWindow *parent, const gchar *first_property_name, ...);
This is a convenience function for showing an application's about box.
parent : | transient parent, or NULL for none |
first_property_name : | the name of the first property |
... : | value of first property, followed by more properties, NULL-terminated |
Since 2.6
"artists" (GStrv : Read / Write) | List of people who have contributed artwork to the program. |
"authors" (GStrv : Read / Write) | List of authors of the programs. |
"comments" (gchararray : Read / Write) | Comments about the program. |
"copyright" (gchararray : Read / Write) | Copyright information for the program. |
"documenters" (GStrv : Read / Write) | List of people documenting the program. |
"license" (gchararray : Read / Write) | The license of the program. |
"logo" (GdkPixbuf : Read / Write) | A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list(). |
"logo-icon-name" (gchararray : Read / Write) | A named icon to use as the logo for the about box. |
"name" (gchararray : Read / Write) | The name of the program. If this is not set, it defaults to g_get_application_name(). |
"translator-credits" (gchararray : Read / Write) | Credits to the translators. This string should be marked as translatable. |
"version" (gchararray : Read / Write) | The version of the program. |
"website" (gchararray : Read / Write) | The URL for the link to the website of the program. |
"website-label" (gchararray : Read / Write) | The label for the link to the website of the program. If this is not set, it defaults to the URL. |
<< GtkWindowGroup | Display Widgets >> |