public class AboutDialog extends Dialog
name
, a
short description
,
copyright
info, and then lists of
authors
, documenters
, artists
responsible for the
program. Those who contributed by translating
the application can also be listed.
As a convention, every GNOME application has a MenuItem labelled "About" in the main "Help" menu.
Modifier and Type | Class and Description |
---|---|
static interface |
AboutDialog.ActivateLink
Callback invoked when the website is clicked.
|
Dialog.Response
Window.ConfigureEvent, Window.DeleteEvent
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
Constructor and Description |
---|
AboutDialog()
Instantiate a new AboutDialog.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(AboutDialog.ActivateLink handler)
Hookup the
AboutDialog.ActivateLink callback that will be
used to handle website button click actions. |
License |
getLicenseType()
Return the license that was set using
setLicenseType() . |
void |
setArtists(String[] people)
Add a list of artists to the AboutDialog.
|
void |
setAuthors(String[] people)
Add a list of authors to the AboutDialog.
|
void |
setComments(String text)
Set a simple description of the program.
|
void |
setCopyright(String text)
Specify the copyright holder of the application.
|
void |
setDocumenters(String[] people)
Add a list of documenters to the AboutDialog.
|
void |
setLicense(String text)
Add a "licence" Button to the AboutDialog.
|
void |
setLicenseType(License license)
Set the license of the application from the currently known
licenses . |
void |
setLogo(Pixbuf icon)
Set the image to be displayed in the AboutDialog.
|
void |
setProgramName(String name)
Specify the name of the application.
|
void |
setTranslatorCredits(String credits)
Add a tab to the AboutDialog's Credit popup listing the people who have
contributed to translating the application into the active language.
|
void |
setVersion(String version)
Set the version number of this release.
|
void |
setWebsite(String website)
Set a link to your website.
|
void |
setWebsiteLabel(String label)
Set a label to modify the website link previously set by something more
friendly.
|
void |
setWrapLicense(boolean setting)
Wrap the licence text.
|
add, addButton, addButton, addButton, connect, emitResponse, run, setDefaultResponse
addAcceleratorGroup, connect, connect, getHeight, getMaximized, getPositionX, getPositionY, getScreen, getWidth, move, present, resize, setDecorated, setDefaultSize, setFullscreen, setGravity, setHasResizeGrip, setIcon, setIcon, setKeepAbove, setKeepBelow, setMaximize, setModal, setPosition, setResizable, setSkipPagerHint, setSkipTaskbarHint, setStick, setTitle, setTransientFor, setTypeHint
getChildren, remove, setBorderWidth
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
public AboutDialog()
public void connect(AboutDialog.ActivateLink handler)
AboutDialog.ActivateLink
callback that will be
used to handle website button click actions.public License getLicenseType()
setLicenseType()
.public void setArtists(String[] people)
about.setArtists(new String[] { "Joao Victor <jvital@gmail.com>" });
public void setAuthors(String[] people)
about.setAuthors(new String[] { "Andrew Cowie <andrew@operationaldynamics.com>", "Srichand Pendyala <srichand.pendyala@gmail.com>", "Vreixo Formoso Lopes <metalpain2002@yahoo.es>", "Sebastian Mancke <s.mancke@tarent.de>" });It is indeed tradition for authors of Open Source Software to include their email addresses when identifying their work.
public void setComments(String text)
public void setCopyright(String text)
setCopyright("Copyright (c) 2008 ACME, Inc");
public void setDocumenters(String[] people)
about.setDocumenters(new String[] { "Guillaume Mazoyer <respawneral@gmail.com>", "Stefan Prelle <stefan@prelle.org>", "Serkan Kaba <serkan@gentoo.org>" });
public void setLicense(String text)
If null
the licence Button is hidden.
public void setLicenseType(License license)
licenses
.
This method overrides the license set using setLicense()
.
public void setLogo(Pixbuf icon)
Gtk.setDefaultIcon()
.public void setProgramName(String name)
The Epiphany Web Browser
", whereas
others will use the project name, for example "epiphany
".
This will be shown prominently in a large font as the title of the
Dialog.public void setTranslatorCredits(String credits)
This one is a bit different than authors,
artists, and documenters in that it is expected
that you'll pass the result of looking up the translation of the string
"translator-credits"
as follows:
about.setTranslatorCredits(_("translator-credits"));This way, the user of your program will be shown the list of people who worked on the translation for that particular locale. The translation for the
"translator-credits"
string in the PO file should
still be names and email addresses as shown in
setAuthors()
.
See Internationalization
for more details about the use of the
_()
function.
You could of course use any string as the index for lookup, but "translator-credits" is the accepted convention, and people doing translation work will recognize it.
public void setVersion(String version)
public void setWebsite(String website)
http://www.example.com/
format.
At the moment this "link" is just plain text and not live.
public void setWebsiteLabel(String label)
public void setWrapLicense(boolean setting)
true
, the licence text will be
automatically wrapped and the initial dialog size will be preserved.