From: Axel S. <si...@co...> - 2009-11-15 21:13:33
|
Sun Nov 15 15:14:08 EST 2009 Axel Simon <Axe...@en...> * Bring AboutDialog up to date. hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 46 +-- 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. hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 82 + aboutDialogSetEmailHook, + aboutDialogSetUrlHook, + +-- * Attributes + aboutDialogProgramName, + aboutDialogName, + aboutDialogVersion, + aboutDialogCopyright, + aboutDialogComments, + aboutDialogLicense, + aboutDialogWebsite, + aboutDialogWebsiteLabel, + aboutDialogAuthors, + aboutDialogDocumenters, + aboutDialogArtists, + aboutDialogTranslatorCredits, + aboutDialogLogo, + aboutDialogLogoIconName, +#if GTK_CHECK_VERSION(2,8,0) + aboutDialogWrapLicense, +#endif + +-- * Deprecated +#ifndef DISABLE_DEPRECATED +#if GTK_CHECK_VERSION(2,12,0) + aboutDialogGetProgramName, + aboutDialogSetProgramName, +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 136 - aboutDialogSetEmailHook, - aboutDialogSetUrlHook, hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 140 - --- * Attributes - aboutDialogName, - aboutDialogVersion, - aboutDialogCopyright, - aboutDialogComments, - aboutDialogLicense, - aboutDialogWebsite, - aboutDialogWebsiteLabel, - aboutDialogAuthors, - aboutDialogDocumenters, - aboutDialogArtists, - aboutDialogTranslatorCredits, - aboutDialogLogo, - aboutDialogLogoIconName, hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 141 -#if GTK_CHECK_VERSION(2,8,0) - aboutDialogWrapLicense, hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 150 +import System.Glib.Properties hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 504 -aboutDialogName = newAttr - aboutDialogGetName - aboutDialogSetName +aboutDialogName = newAttrFromStringProperty "name" + +-- | The name of the program. If this is not set, it defaults to +-- 'gGetApplicationName'. +-- +#if GTK_CHECK_VERSION(2,12,0) +aboutDialogProgramName :: AboutDialogClass self => Attr self String +aboutDialogProgramName = newAttrFromStringProperty "program-name" +#else +aboutDialogProgramName :: AboutDialogClass self => Attr self String +aboutDialogProgramName = newAttrFromStringProperty "name" +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 520 -aboutDialogVersion = newAttr - aboutDialogGetVersion - aboutDialogSetVersion +aboutDialogVersion = newAttrFromStringProperty "version" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 525 -aboutDialogCopyright = newAttr - aboutDialogGetCopyright - aboutDialogSetCopyright +aboutDialogCopyright = newAttrFromStringProperty "copyright" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 532 -aboutDialogComments = newAttr - aboutDialogGetComments - aboutDialogSetComments +aboutDialogComments = newAttrFromStringProperty "comments" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 543 -aboutDialogLicense = newAttr - aboutDialogGetLicense - aboutDialogSetLicense +aboutDialogLicense = newAttrFromMaybeStringProperty "license" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 549 -aboutDialogWebsite = newAttr - aboutDialogGetWebsite - aboutDialogSetWebsite +aboutDialogWebsite = newAttrFromStringProperty "website" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 555 -aboutDialogWebsiteLabel = newAttr - aboutDialogGetWebsiteLabel - aboutDialogSetWebsiteLabel +aboutDialogWebsiteLabel = newAttrFromStringProperty "website-label" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 589 -aboutDialogTranslatorCredits = newAttr - aboutDialogGetTranslatorCredits - aboutDialogSetTranslatorCredits +aboutDialogTranslatorCredits = newAttrFromStringProperty "translator-credits" hunk ./gtk/Graphics/UI/Gtk/Windows/AboutDialog.chs.pp 616 -aboutDialogWrapLicense = newAttr - aboutDialogGetWrapLicense - aboutDialogSetWrapLicense +aboutDialogWrapLicense = newAttrFromBoolProperty "wrap-license" |