Synopsis#include <gtk/gtk.h> GtkAboutDialog; GtkWidget* gtk_about_dialog_new (void); const gchar* gtk_about_dialog_get_name (GtkAboutDialog *about); void gtk_about_dialog_set_name (GtkAboutDialog *about, const gchar *name); const gchar* gtk_about_dialog_get_program_name (GtkAboutDialog *about); void gtk_about_dialog_set_program_name (GtkAboutDialog *about, const gchar *name); const gchar* gtk_about_dialog_get_version (GtkAboutDialog *about); void gtk_about_dialog_set_version (GtkAboutDialog *about, const gchar *version); const gchar* gtk_about_dialog_get_copyright (GtkAboutDialog *about); void gtk_about_dialog_set_copyright (GtkAboutDialog *about, const gchar *copyright); const gchar* gtk_about_dialog_get_comments (GtkAboutDialog *about); void gtk_about_dialog_set_comments (GtkAboutDialog *about, const gchar *comments); const gchar* gtk_about_dialog_get_license (GtkAboutDialog *about); void gtk_about_dialog_set_license (GtkAboutDialog *about, const gchar *license); gboolean gtk_about_dialog_get_wrap_license (GtkAboutDialog *about); void gtk_about_dialog_set_wrap_license (GtkAboutDialog *about, gboolean wrap_license); const gchar* gtk_about_dialog_get_website (GtkAboutDialog *about); void gtk_about_dialog_set_website (GtkAboutDialog *about, const gchar *website); const gchar* gtk_about_dialog_get_website_label (GtkAboutDialog *about); void gtk_about_dialog_set_website_label (GtkAboutDialog *about, const gchar *website_label); const gchar* const * gtk_about_dialog_get_authors (GtkAboutDialog *about); void gtk_about_dialog_set_authors (GtkAboutDialog *about, const gchar **authors); const gchar* const * gtk_about_dialog_get_artists (GtkAboutDialog *about); void gtk_about_dialog_set_artists (GtkAboutDialog *about, const gchar **artists); const gchar* const * gtk_about_dialog_get_documenters (GtkAboutDialog *about); void gtk_about_dialog_set_documenters (GtkAboutDialog *about, const gchar **documenters); const 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); const gchar* gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about); void gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about, const gchar *icon_name); 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, ...); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----GtkAboutDialog Properties"artists" GStrv* : Read / Write "authors" GStrv* : Read / Write "comments" gchar* : Read / Write "copyright" gchar* : Read / Write "documenters" GStrv* : Read / Write "license" gchar* : Read / Write "logo" GdkPixbuf* : Read / Write "logo-icon-name" gchar* : Read / Write "program-name" gchar* : Read / Write "translator-credits" gchar* : Read / Write "version" gchar* : Read / Write "website" gchar* : Read / Write "website-label" gchar* : Read / Write "wrap-license" gboolean : Read / Write 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 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 When setting the website and email hooks for the GtkAboutDialog widget, you should remember that the order is important: you should set the hook functions before setting the website and email URL properties, like this: gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url); Otherwise the GtkAboutDialog widget will not display the website and the email addresses as clickable.
To make constructing a GtkAboutDialog as convenient as possible, you can
use the function
Note that GTK+ sets a default title of gtk_show_about_dialog (NULL, "program-name", "ExampleCode", "logo", example_logo, "title" _("About ExampleCode"), NULL); 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. DetailsGtkAboutDialogtypedef struct _GtkAboutDialog GtkAboutDialog; The GtkAboutDialog struct contains only private fields and should not be directly accessed. gtk_about_dialog_new ()GtkWidget* gtk_about_dialog_new (void); Creates a new GtkAboutDialog.
Since 2.6 gtk_about_dialog_get_name ()const gchar* gtk_about_dialog_get_name (GtkAboutDialog *about); Warning
Returns the program name displayed in the about dialog.
Since 2.6 gtk_about_dialog_set_name ()void gtk_about_dialog_set_name (GtkAboutDialog *about, const gchar *name); Warning
Sets the name to display in the about dialog.
If this is not set, it defaults to
Since 2.6 gtk_about_dialog_get_program_name ()const gchar* gtk_about_dialog_get_program_name (GtkAboutDialog *about); Returns the program name displayed in the about dialog.
Since 2.12 gtk_about_dialog_set_program_name ()void gtk_about_dialog_set_program_name (GtkAboutDialog *about, const gchar *name);
Sets the name to display in the about dialog.
If this is not set, it defaults to
Since 2.12 gtk_about_dialog_get_version ()const gchar* gtk_about_dialog_get_version (GtkAboutDialog *about); Returns the version string.
Since 2.6 gtk_about_dialog_set_version ()void gtk_about_dialog_set_version (GtkAboutDialog *about, const gchar *version); Sets the version string to display in the about dialog.
Since 2.6 gtk_about_dialog_get_copyright ()const gchar* gtk_about_dialog_get_copyright (GtkAboutDialog *about); Returns the copyright string.
Since 2.6 gtk_about_dialog_set_copyright ()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.
Since 2.6 gtk_about_dialog_get_comments ()const gchar* gtk_about_dialog_get_comments (GtkAboutDialog *about); Returns the comments string.
Since 2.6 gtk_about_dialog_set_comments ()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.
Since 2.6 gtk_about_dialog_get_license ()const gchar* gtk_about_dialog_get_license (GtkAboutDialog *about); Returns the license information.
Since 2.6 gtk_about_dialog_set_license ()void gtk_about_dialog_set_license (GtkAboutDialog *about, const gchar *license);
Sets the license information to be displayed in the secondary
license dialog. If
Since 2.6 gtk_about_dialog_get_wrap_license ()gboolean gtk_about_dialog_get_wrap_license (GtkAboutDialog *about);
Returns whether the license text in
Since 2.8 gtk_about_dialog_set_wrap_license ()void gtk_about_dialog_set_wrap_license (GtkAboutDialog *about, gboolean wrap_license);
Sets whether the license text in
Since 2.8 gtk_about_dialog_get_website ()const gchar* gtk_about_dialog_get_website (GtkAboutDialog *about); Returns the website URL.
Since 2.6 gtk_about_dialog_set_website ()void gtk_about_dialog_set_website (GtkAboutDialog *about, const gchar *website); Sets the URL to use for the website link. Note that that the hook functions need to be set up before calling this function.
Since 2.6 gtk_about_dialog_get_website_label ()const gchar* gtk_about_dialog_get_website_label (GtkAboutDialog *about); Returns the label used for the website link.
Since 2.6 gtk_about_dialog_set_website_label ()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.
Since 2.6 gtk_about_dialog_get_authors ()const gchar* const * gtk_about_dialog_get_authors (GtkAboutDialog *about); Returns the string which are displayed in the authors tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_set_authors ()void gtk_about_dialog_set_authors (GtkAboutDialog *about, const gchar **authors); Sets the strings which are displayed in the authors tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_get_artists ()const gchar* const * gtk_about_dialog_get_artists (GtkAboutDialog *about); Returns the string which are displayed in the artists tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_set_artists ()void gtk_about_dialog_set_artists (GtkAboutDialog *about, const gchar **artists); Sets the strings which are displayed in the artists tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_get_documenters ()const gchar* const * gtk_about_dialog_get_documenters (GtkAboutDialog *about); Returns the string which are displayed in the documenters tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_set_documenters ()void gtk_about_dialog_set_documenters (GtkAboutDialog *about, const gchar **documenters); Sets the strings which are displayed in the documenters tab of the secondary credits dialog.
Since 2.6 gtk_about_dialog_get_translator_credits ()const 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.
Since 2.6 gtk_about_dialog_set_translator_credits ()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 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.
Since 2.6 gtk_about_dialog_get_logo ()GdkPixbuf* gtk_about_dialog_get_logo (GtkAboutDialog *about); Returns the pixbuf displayed as logo in the about dialog.
Since 2.6 gtk_about_dialog_set_logo ()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
Since 2.6 gtk_about_dialog_get_logo_icon_name ()const gchar* gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about); Returns the icon name displayed as logo in the about dialog.
Since 2.6 gtk_about_dialog_set_logo_icon_name ()void gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about, const gchar *icon_name);
Sets the pixbuf to be displayed as logo in
the about dialog. If it is
Since 2.6 GtkAboutDialogActivateLinkFunc ()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.
gtk_about_dialog_set_email_hook ()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.
Since 2.6 gtk_about_dialog_set_url_hook ()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.
Since 2.6 gtk_show_about_dialog ()void gtk_show_about_dialog (GtkWindow *parent, const gchar *first_property_name, ...); This is a convenience function for showing an application's about box. The constructed dialog is associated with the parent window and reused for future invocations of this function.
Since 2.6 Property DetailsThe
|