gtk.AboutDialog
gtk.AboutDialog — popup window displaying information about an application (new in PyGTK 2.6)
Synopsis
class gtk.AboutDialog(gtk.Dialog): |
Functionsdef gtk.about_dialog_set_email_hook(
func
,data
)def gtk.about_dialog_set_url_hook(
func
,data
)
Ancestry
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Window +-- gtk.Dialog +--gtk.AboutDialog
gtk.AboutDialog Properties
|
gtk.AboutDialog Style Properties
|
gtk.AboutDialog Signal Prototypes
gtk.Container Signal Prototypes
def callback( |
Description
Note
This widget is available in PyGTK 2.6 and above.
The gtk.AboutDialog
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 option from the
menu. All parts of the dialog are optional.
About dialog often contain links and email addresses. gtk.AboutDialog
supports this by offering global hooks, which are called when the user
clicks on a link or email address, see the gtk.about_dialog_set_email_hook
()
and gtk.about_dialog_set_url_hook
()
functions. 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.
Constructor
gtk.AboutDialog()
Returns : | a new gtk.AboutDialog |
Note
This constructor is available in PyGTK 2.6 and above.
Creates a new gtk.AboutDialog with default property values.
Methods
gtk.AboutDialog.get_name
def get_name()
Returns : | the program name. |
Note
This method is available in PyGTK 2.6 and above.
Warning
This method is deprecated in PyGTK 2.12 and above and should not be
used in newly-written code. Use the get_program_name
()
method instead.
The get_name
() method returns the
program name displayed in the about dialog.
gtk.AboutDialog.set_name
def set_name(name
)
| a string containing the program
name or None to use the default name. |
Note
This method is available in PyGTK 2.6 and above.
Warning
This method is deprecated in PyGTK 2.12 and above and should not be
used in newly-written code. Use the set_program_name
()
method instead.
The set_name
() method sets the name
to display in the about dialog. If name
is None
,
it defaults to g_get_application_name().
gtk.AboutDialog.get_program_name
def get_program_name()
Returns : | the program name. |
Note
This method is available in PyGTK 2.12 and above.
The get_program_name
() method returns the
program name displayed in the about dialog.
gtk.AboutDialog.set_program_name
def set_program_name(name
)
| a string containing the program
name or None to use the default name. |
Note
This method is available in PyGTK 2.12 and above.
The set_program_name
() method sets the name
to display in the about dialog. If name
is None
,
it defaults to g_get_application_name().
gtk.AboutDialog.get_version
def get_version()
Returns : | The version string or
None . |
Note
This method is available in PyGTK 2.6 and above.
The get_version
() method returns the
string contained in the "version" property.
gtk.AboutDialog.set_version
def set_version(version
)
| the version string or
None |
Note
This method is available in PyGTK 2.6 and above.
The set_version
() method sets the
"version" property to the string in version
.
gtk.AboutDialog.get_copyright
def get_copyright()
Returns : | the copyright string or
None . |
Note
This method is available in PyGTK 2.6 and above.
The get_copyright
() method returns the
string contained in the "copyright" property.
gtk.AboutDialog.set_copyright
def set_copyright(copyright
)
| a string containing the copyright
notice or None . |
Note
This method is available in PyGTK 2.6 and above.
The set_copyright
() method sets the
"copyright" property to the string contained in
copyright
. If copyright
is
None
, the copyright notice is hidden.
gtk.AboutDialog.get_comments
def get_comments()
Returns : | a string containing the
comments or None |
Note
This method is available in PyGTK 2.6 and above.
The get_comments
() method returns the
string contained in the "comments" property.
gtk.AboutDialog.set_comments
def set_comments(comments
)
| a string containing the
comments or None . |
Note
This method is available in PyGTK 2.6 and above.
The set_comments
() method sets the
"comments" property to the string contained in
comments
. If comments
is
None
the comments label is hidden.
gtk.AboutDialog.get_license
def get_license()
Returns : | a string containing the license
information or None |
Note
This method is available in PyGTK 2.6 and above.
The get_license
() method returns the
string contained in the "license" property.
gtk.AboutDialog.set_license
def set_license(license
)
|
Note
This method is available in PyGTK 2.6 and above.
The set_license
() method sets the
"license" property to the string contained in
license
. If license
is
None
the license button is hidden.
gtk.AboutDialog.get_wrap_license
def get_wrap_license()
Returns : | True if the license text
should be wrapped |
Note
This method is available in PyGTK 2.8 and above.
The get_wrap_license
() method returns
the value of the "wrap-license" property. If "wrap-license" is
True
the license text should be automatically
wrapped.
gtk.AboutDialog.set_wrap_license
def set_wrap_license(wrap_license
)
|
Note
This method is available in PyGTK 2.8 and above.
The set_wrap_license
() method sets the
"wrap-license" property to the value of
wrap_license
. If wrap_license
is True
the license text should be automatically
wrapped.
gtk.AboutDialog.get_website
def get_website()
Returns : | a string containing the website URL or
None |
Note
This method is available in PyGTK 2.6 and above.
The get_website
() method returns the
string contained in the "website" property. The website should be a
URL.
gtk.AboutDialog.set_website
def set_website(website
)
| a string containing the URL of the program's
website or None |
Note
This method is available in PyGTK 2.6 and above.
The set_website
() method sets the
"website" property to the string contained in
website
. The string should be a valid URL.
gtk.AboutDialog.get_website_label
def get_website_label()
Returns : | a string containing the website link label |
Note
This method is available in PyGTK 2.6 and above.
The get_website_label
() method returns
the contents of the "website_label" property. The website label is used if
the url hook has been set using the gtk.about_dialog_set_url_hook
()
function.
gtk.AboutDialog.set_website_label
def set_website_label(website_label
)
|
Note
This method is available in PyGTK 2.6 and above.
The set_website_label
() method sets the
"website_label" property to the string contained in
website_label
if the url hook has been set using the
gtk.about_dialog_set_url_hook
()
function.
gtk.AboutDialog.get_authors
def get_authors()
Returns : | a list containing the names of the program authors |
Note
This method is available in PyGTK 2.6 and above.
The get_authors
() method returns the
contents of the "authors" property. The "authors" property contains a list
of the names of the authors of the program.
gtk.AboutDialog.set_authors
def set_authors(authors
)
| a list containing the names of the program authors. |
Note
This method is available in PyGTK 2.6 and above.
The set_authors
() method sets the
"authors" property to the list contained in
authors
. The author names are displayed in the
authors tab of the secondary credits
dialog. set_authors
() method will show the
button if it is not displayed.
gtk.AboutDialog.get_documenters
def get_documenters()
Returns : | a list of the program documenters |
Note
This method is available in PyGTK 2.6 and above.
The get_documenters
() method returns
the contents of the "documenters" property which contains a list of the
names of the program documenters.
gtk.AboutDialog.set_documenters
def set_documenters(documenters
)
| a list of the names of the program documenters |
Note
This method is available in PyGTK 2.6 and above.
The set_documenters
() method sets the
"documenters" property to the contents of
documenters
. The documenter names are displayed in
the documenters tab of the secondary credits
dialog. set_documenters
() method will show the
button if it is not displayed.
gtk.AboutDialog.get_artists
def get_artists()
Returns : | a list of the names of the program artists |
Note
This method is available in PyGTK 2.6 and above.
The get_artists
() method returns the
contents of the "artists" property which contains a list of the names of the
program artists.
gtk.AboutDialog.set_artists
def set_artists(artists
)
| a list of the names of the program artists |
Note
This method is available in PyGTK 2.6 and above.
The set_artists
() method sets the
"artists" property to the contents of artists
. The
artist names are displayed in the artists tab of the secondary credits
dialog. set_artists
() method will show the
button if it is not displayed.
gtk.AboutDialog.get_translator_credits
def get_translator_credits()
Returns : | a string containing the translator credits |
Note
This method is available in PyGTK 2.6 and above.
The get_translator_credits
() method
returns the contents of the "translator-credits" property which contains the
credits for the current translation.
gtk.AboutDialog.set_translator_credits
def set_translator_credits(translator_credits
)
| a string containing the current translation credits |
Note
This method is available in PyGTK 2.6 and above.
The set_translator_credits
() method
sets the "translator_credits" property to the value of
translator_credits
. The translator credits are
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 the
gettext
() function, a simple way to achieve that is to
mark the string for translation.
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 gtk.AboutDialog
will detect if "translator-credits" is untranslated and hide the tab.
gtk.AboutDialog.get_logo
def get_logo()
Returns : | the gtk.gdk.Pixbuf
used as the logo |
Note
This method is available in PyGTK 2.6 and above.
The get_logo
() method returns the
contents of the "logo" property which contains a gtk.gdk.Pixbuf
that
is used as the logo.
gtk.AboutDialog.set_logo
def set_logo(logo
)
| a gtk.gdk.Pixbuf to be
used as the logo |
Note
This method is available in PyGTK 2.6 and above.
The set_logo
() method sets the "logo"
property to the gtk.gdk.Pixbuf
contained in logo
. If logo
is
None
, the default window icon set with the gtk.window_set_default_icon_list
()
function will be used.
gtk.AboutDialog.get_logo_icon_name
def get_logo_icon_name()
Returns : | the name of the icon used as the logo |
Note
This method is available in PyGTK 2.6 and above.
The get_logo_name
() method returns the
contents of the "logo-icon-name" property which contains the name of the
icon used as the logo.
gtk.AboutDialog.set_logo_icon_name
def set_logo_icon_name(icon_name
)
| the name of an icon or
None |
Note
This method is available in PyGTK 2.6 and above.
The set_logo_icon_name
() method sets
the "logo-icon-name" property to the value of
icon_name
. If icon_name
is
None
, the default window icon set with the gtk.window_set_default_icon_list
()
function will be used.
Functions
gtk.about_dialog_set_email_hook
def gtk.about_dialog_set_email_hook(func
, data
)
| a function to call when an email link is activated. |
| data to pass to
func |
Note
This function is available in PyGTK 2.6 and above.
The gtk.about_dialog_set_email_hook
function installs a global function (specified by
func
) to be called whenever the user activates an
email link in an about dialog.
The signature of the callback function
func
is:
def func(dialog, link, user_data)
where link
is the email address
destination of the activated link, dialog
is the
gtk.AboutDialog
containing link
and user_data
is the data
argument passed to gtk.about_dialog_set_email_hook
().
gtk.about_dialog_set_url_hook
def gtk.about_dialog_set_url_hook(func
, data
)
| a function to call when a URL link is activated. |
| data to pass to
func |
Note
This function is available in PyGTK 2.6 and above.
The gtk.about_dialog_set_url_hook
function
installs a global function (specified by func
) to be
called whenever the user activates a URL link in an about dialog.
The signature of the callback function
func
is:
def func(dialog, link, user_data)
where link
is the URL destination of the
activated link, dialog
is the gtk.AboutDialog
containing link
and user_data
is the data
argument passed to gtk.about_dialog_set_url_hook
().
Signals
The "activate-link" gtk.AboutDialog Signal
def callback(aboutdialog
, uri
, user_param1
, ...
)
| the aboutdialog that received the signal |
| the URI that is activated |
| the first user parameter (if any) specified with the connect () |
| additional user parameters (if any) |
Note
This signal is available in GTK+ 2.24 and above.
The "activate-link" signal is emitted when an URI is activated. Applications may connect to it to override the default behaviour, which is to call
gtk.show_uri
().