Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
Display information about an application
- Module available since Gtk+ version 2.6
- data AboutDialog
- class DialogClass o => AboutDialogClass o
- castToAboutDialog :: GObjectClass obj => obj -> AboutDialog
- gTypeAboutDialog :: GType
- toAboutDialog :: AboutDialogClass o => o -> AboutDialog
- aboutDialogNew :: IO AboutDialog
- aboutDialogSetEmailHook :: (String -> IO ()) -> IO ()
- aboutDialogSetUrlHook :: (String -> IO ()) -> IO ()
- aboutDialogProgramName :: AboutDialogClass self => Attr self String
- aboutDialogName :: AboutDialogClass self => Attr self String
- aboutDialogVersion :: AboutDialogClass self => Attr self String
- aboutDialogCopyright :: AboutDialogClass self => Attr self String
- aboutDialogComments :: AboutDialogClass self => Attr self String
- aboutDialogLicense :: AboutDialogClass self => Attr self (Maybe String)
- aboutDialogWebsite :: AboutDialogClass self => Attr self String
- aboutDialogWebsiteLabel :: AboutDialogClass self => Attr self String
- aboutDialogAuthors :: AboutDialogClass self => Attr self [String]
- aboutDialogDocumenters :: AboutDialogClass self => Attr self [String]
- aboutDialogArtists :: AboutDialogClass self => Attr self [String]
- aboutDialogTranslatorCredits :: AboutDialogClass self => Attr self String
- aboutDialogLogo :: AboutDialogClass self => ReadWriteAttr self Pixbuf (Maybe Pixbuf)
- aboutDialogLogoIconName :: AboutDialogClass self => ReadWriteAttr self String (Maybe String)
- aboutDialogWrapLicense :: AboutDialogClass self => Attr self Bool
- aboutDialogGetName :: AboutDialogClass self => self -> IO String
- aboutDialogSetName :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetVersion :: AboutDialogClass self => self -> IO String
- aboutDialogSetVersion :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetCopyright :: AboutDialogClass self => self -> IO String
- aboutDialogSetCopyright :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetComments :: AboutDialogClass self => self -> IO String
- aboutDialogSetComments :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetLicense :: AboutDialogClass self => self -> IO (Maybe String)
- aboutDialogSetLicense :: AboutDialogClass self => self -> Maybe String -> IO ()
- aboutDialogGetWebsite :: AboutDialogClass self => self -> IO String
- aboutDialogSetWebsite :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetWebsiteLabel :: AboutDialogClass self => self -> IO String
- aboutDialogSetWebsiteLabel :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogSetAuthors :: AboutDialogClass self => self -> [String] -> IO ()
- aboutDialogGetAuthors :: AboutDialogClass self => self -> IO [String]
- aboutDialogSetArtists :: AboutDialogClass self => self -> [String] -> IO ()
- aboutDialogGetArtists :: AboutDialogClass self => self -> IO [String]
- aboutDialogSetDocumenters :: AboutDialogClass self => self -> [String] -> IO ()
- aboutDialogGetDocumenters :: AboutDialogClass self => self -> IO [String]
- aboutDialogGetTranslatorCredits :: AboutDialogClass self => self -> IO String
- aboutDialogSetTranslatorCredits :: AboutDialogClass self => self -> String -> IO ()
- aboutDialogGetLogo :: AboutDialogClass self => self -> IO Pixbuf
- aboutDialogSetLogo :: AboutDialogClass self => self -> Maybe Pixbuf -> IO ()
- aboutDialogGetLogoIconName :: AboutDialogClass self => self -> IO String
- aboutDialogSetLogoIconName :: AboutDialogClass self => self -> Maybe String -> IO ()
- aboutDialogGetWrapLicense :: AboutDialogClass self => self -> IO Bool
- aboutDialogSetWrapLicense :: AboutDialogClass self => self -> Bool -> IO ()
Detail
The 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 About
option from the Help
menu. All parts of
the dialog are optional.
About dialog often contain links and email addresses. AboutDialog
supports this by offering global hooks, which are called when the user
clicks on a link or email address, see aboutDialogSetEmailHook
and
aboutDialogSetUrlHook
. 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.
Since 2.18 AboutDialog
provides default website and email hooks that
use showURI
.
Note that Gtk+ sets a default title of _("About %s")
on the dialog
window (where %s is replaced by the name of the application, but in order to
ensure proper translation of the title, applications should set the title
property explicitly when constructing a AboutDialog
, as shown in the
following example:
Note that prior to Gtk+ 2.12, the aboutDialogProgramName
property was called
aboutDialogName
. Both names may be used in Gtk2Hs.
Class Hierarchy
|GObject
| +----Object
| +----Widget
| +----Container
| +----Bin
| +----Window
| +----Dialog
| +----AboutDialog
Types
data AboutDialog Source
class DialogClass o => AboutDialogClass o Source
castToAboutDialog :: GObjectClass obj => obj -> AboutDialogSource
toAboutDialog :: AboutDialogClass o => o -> AboutDialogSource
Constructors
aboutDialogNew :: IO AboutDialogSource
Creates a new AboutDialog
.
Methods
Installs a global function to be called whenever the user activates an email link in an about dialog.
Installs a global function to be called whenever the user activates a URL link in an about dialog.
Attributes
aboutDialogProgramName :: AboutDialogClass self => Attr self StringSource
The name of the program. If this is not set, it defaults to
gGetApplicationName
.
aboutDialogName :: AboutDialogClass self => Attr self StringSource
The name of the program. If this is not set, it defaults to
gGetApplicationName
.
aboutDialogVersion :: AboutDialogClass self => Attr self StringSource
The version of the program.
aboutDialogCopyright :: AboutDialogClass self => Attr self StringSource
Copyright information for the program.
aboutDialogComments :: AboutDialogClass self => Attr self StringSource
Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a detailed list of features.
aboutDialogLicense :: AboutDialogClass self => Attr self (Maybe String)Source
The license of the program. This string is displayed in a text view in a
secondary dialog, therefore it is fine to use a long multi-paragraph text.
Note that the text is only wrapped in the text view if the aboutDialogWrapLicense
property is set to True
; otherwise the text itself must contain the
intended linebreaks.
Default value: Nothing
aboutDialogWebsite :: AboutDialogClass self => Attr self StringSource
The URL for the link to the website of the program. This should be a string starting with "http://.
aboutDialogWebsiteLabel :: AboutDialogClass self => Attr self StringSource
The label for the link to the website of the program. If this is not set, it defaults to the URL specified in the website property.
aboutDialogAuthors :: AboutDialogClass self => Attr self [String]Source
The authors of the program. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
aboutDialogDocumenters :: AboutDialogClass self => Attr self [String]Source
The people documenting the program. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
aboutDialogArtists :: AboutDialogClass self => Attr self [String]Source
The people who contributed artwork to the program. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
aboutDialogTranslatorCredits :: AboutDialogClass self => Attr self StringSource
Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
aboutDialogLogo :: AboutDialogClass self => ReadWriteAttr self Pixbuf (Maybe Pixbuf)Source
A logo for the about box. If this is not set, it defaults to
windowGetDefaultIconList
.
aboutDialogLogoIconName :: AboutDialogClass self => ReadWriteAttr self String (Maybe String)Source
A named icon to use as the logo for the about box. This property overrides the logo property.
Default value: Nothing
aboutDialogWrapLicense :: AboutDialogClass self => Attr self BoolSource
Whether to wrap the text in the license dialog.
Default value: False
Deprecated
:: AboutDialogClass self | |
=> self | |
-> IO String | returns The program name. |
Returns the program name displayed in the about dialog.
:: AboutDialogClass self | |
=> self | |
-> String |
|
-> IO () |
Sets the name to display in the about dialog. If this is not set, it defaults to the program executable name.
aboutDialogGetVersion :: AboutDialogClass self => self -> IO StringSource
Returns the version string.
aboutDialogSetVersion :: AboutDialogClass self => self -> String -> IO ()Source
Sets the version string to display in the about dialog.
aboutDialogGetCopyright :: AboutDialogClass self => self -> IO StringSource
Returns the copyright string.
aboutDialogSetCopyright :: AboutDialogClass self => self -> String -> IO ()Source
Sets the copyright string to display in the about dialog. This should be a short string of one or two lines.
aboutDialogGetComments :: AboutDialogClass self => self -> IO StringSource
Returns the comments string.
aboutDialogSetComments :: AboutDialogClass self => self -> String -> IO ()Source
Sets the comments string to display in the about dialog. This should be a short string of one or two lines.
aboutDialogGetLicense :: AboutDialogClass self => self -> IO (Maybe String)Source
Returns the license information.
:: AboutDialogClass self | |
=> self | |
-> Maybe String |
|
-> IO () |
Sets the license information to be displayed in the secondary license
dialog. If license
is Nothing
, the license button is hidden.
aboutDialogGetWebsite :: AboutDialogClass self => self -> IO StringSource
Returns the website URL.
:: AboutDialogClass self | |
=> self | |
-> String |
|
-> IO () |
Sets the URL to use for the website link.
aboutDialogGetWebsiteLabel :: AboutDialogClass self => self -> IO StringSource
Returns the label used for the website link.
aboutDialogSetWebsiteLabel :: AboutDialogClass self => self -> String -> IO ()Source
Sets the label to be used for the website link. It defaults to the website URL.
:: AboutDialogClass self | |
=> self | |
-> [String] |
|
-> IO () |
Sets the strings which are displayed in the authors tab of the secondary credits dialog.
aboutDialogGetAuthors :: AboutDialogClass self => self -> IO [String]Source
Returns the string which are displayed in the authors tab of the secondary credits dialog.
:: AboutDialogClass self | |
=> self | |
-> [String] |
|
-> IO () |
Sets the strings which are displayed in the artists tab of the secondary credits dialog.
aboutDialogGetArtists :: AboutDialogClass self => self -> IO [String]Source
Returns the string which are displayed in the artists tab of the secondary credits dialog.
aboutDialogSetDocumentersSource
:: AboutDialogClass self | |
=> self | |
-> [String] |
|
-> IO () |
Sets the strings which are displayed in the documenters tab of the secondary credits dialog.
aboutDialogGetDocumenters :: AboutDialogClass self => self -> IO [String]Source
Returns the string which are displayed in the documenters tab of the secondary credits dialog.
aboutDialogGetTranslatorCredits :: AboutDialogClass self => self -> IO StringSource
Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog.
aboutDialogSetTranslatorCredits :: AboutDialogClass self => self -> String -> IO ()Source
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.
aboutDialogGetLogo :: AboutDialogClass self => self -> IO PixbufSource
Returns the pixbuf displayed as logo in the about dialog.
:: AboutDialogClass self | |
=> self | |
-> Maybe Pixbuf |
|
-> IO () |
Sets the pixbuf to be displayed as logo in the about dialog. If it is
Nothing
, the default window icon set with windowSetDefaultIcon
will be
used.
aboutDialogGetLogoIconName :: AboutDialogClass self => self -> IO StringSource
Returns the icon name displayed as logo in the about dialog.
aboutDialogSetLogoIconNameSource
:: AboutDialogClass self | |
=> self | |
-> Maybe String |
|
-> IO () |
Sets the pixbuf to be displayed as logo in the about dialog. If it is
Nothing
, the default window icon set with windowSetDefaultIcon
will be
used.
aboutDialogGetWrapLicenseSource
:: AboutDialogClass self | |
=> self | |
-> IO Bool | returns |
Returns whether the license text in about
is automatically wrapped.
- Available since Gtk+ version 2.8
aboutDialogSetWrapLicenseSource
:: AboutDialogClass self | |
=> self | |
-> Bool |
|
-> IO () |
Sets whether the license text in about
is automatically wrapped.
- Available since Gtk+ version 2.8