|
class gtk.AboutDialog(gtk.Dialog): |
Functionsdef gtk.about_dialog_set_email_hook(
func
,data
)def gtk.about_dialog_set_url_hook(
func
,data
)
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Window +-- gtk.Dialog +--gtk.AboutDialog
|
|
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
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.
gtk.AboutDialog()
Returns : | a new gtk.AboutDialog |
This constructor is available in PyGTK 2.6 and above.
Creates a new gtk.AboutDialog with default property values.
def get_name()
Returns : | The program name or
None . |
This method is available in PyGTK 2.6 and above.
The get_name
() method returns the value
of the "name" property which is the program name displayed in the about
dialog. get_name
() returns None
if the name is not set.
def set_name(name
)
| a string containing the program
name or None to use the default name. |
This method is available in PyGTK 2.6 and above.
The set_name
() method sets the "name"
property to the string contained in name
. The "name"
property is used as the program name in the about dialog. If
name
is None
, it defaults to
g_get_application_name().
def get_version()
Returns : | The version string or
None . |
This method is available in PyGTK 2.6 and above.
The get_version
() method returns the
string contained in the "version" property.
def set_version(version
)
| the version string or
None |
This method is available in PyGTK 2.6 and above.
The set_version
() method sets the
"version" property to the string in version
.
def get_copyright()
Returns : | the copyright string or
None . |
This method is available in PyGTK 2.6 and above.
The get_copyright
() method returns the
string contained in the "copyright" property.
def set_copyright(copyright
)
| a string containing the copyright
notice or None . |
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.
def get_comments()
Returns : | a string containing the
comments or None |
This method is available in PyGTK 2.6 and above.
The get_comments
() method returns the
string contained in the "comments" property.
def set_comments(comments
)
| a string containing the
comments or None . |
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.
def get_license()
Returns : | a string containing the license
information or None |
This method is available in PyGTK 2.6 and above.
The get_license
() method returns the
string contained in the "license" property.
def set_license(license
)
|
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.
def get_wrap_license()
Returns : | True if the license text
should be wrapped |
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.
def set_wrap_license(wrap_license
)
|
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.
def get_website()
Returns : | a string containing the website URL or
None |
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.
def set_website(website
)
| a string containing the URL of the program's
website or None |
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.
def get_website_label()
Returns : | a string containing the website link label |
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.
def set_website_label(website_label
)
|
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.
def get_authors()
Returns : | a list containing the names of the program authors |
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.
def set_authors(authors
)
| a list containing the names of the program authors. |
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.
def get_documenters()
Returns : | a list of the program documenters |
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.
def set_documenters(documenters
)
| a list of the names of the program documenters |
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.
def get_artists()
Returns : | a list of the names of the program artists |
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.
def set_artists(artists
)
| a list of the names of the program artists |
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.
def get_translator_credits()
Returns : | a string containing the translator credits |
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.
def set_translator_credits(translator_credits
)
| a string containing the current translation credits |
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.
def get_logo()
Returns : | the gtk.gdk.Pixbuf
used as the logo |
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.
def set_logo(logo
)
| a gtk.gdk.Pixbuf to be
used as the logo |
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.
def get_logo_icon_name()
Returns : | the name of the icon used as the logo |
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.
def set_logo_icon_name(icon_name
)
| the name of an icon or
None |
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.
def gtk.about_dialog_set_email_hook(func
, data
)
| a function to call when an email link is activated. |
| data to pass to
func |
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
().
def gtk.about_dialog_set_url_hook(func
, data
)
| a function to call when a URL link is activated. |
| data to pass to
func |
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
().
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.