hzenity 0.1 → 0.2
raw patch · 2 files changed
+12/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Zenity: [Notification] :: InfoFlags -> Dialog ()
+ Zenity: [Warning] :: InfoFlags -> Dialog ()
Files
- hzenity.cabal +1/−2
- src/Zenity.hs +11/−3
hzenity.cabal view
@@ -1,5 +1,5 @@ name: hzenity-version: 0.1+version: 0.2 synopsis: Haskell interface to Zenity dialogs description: This is a Haskell wrapper around the <https://en.wikipedia.org/wiki/Zenity Zenity> dialog@@ -7,7 +7,6 @@ . Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/> directory.-homepage: https://github.com/emilaxelsson/hzenity license: BSD3 license-file: LICENSE author: Emil Axelsson
src/Zenity.hs view
@@ -200,8 +200,10 @@ , boolParam confirmOverwrite "--confirm-overwrite" ] --- | Flags for the 'Error' and 'Info' dialogs+-- | Flags for the 'Error', 'Info', 'Notification' and 'Warning' dialogs --+-- Note: 'noWrap' and 'noMarkup' have no effect on 'Notification' dialogs.+-- -- Use 'def' for default flags. data InfoFlags = InfoFlags { text :: Maybe Text -- ^ Dialog text@@ -363,12 +365,12 @@ MultiFileSelection :: FileSelectionFlags -> Dialog [FilePath] Info :: InfoFlags -> Dialog () List :: ListType a -> ListFlags -> Matrix -> Dialog a+ Notification :: InfoFlags -> Dialog ()+ Warning :: InfoFlags -> Dialog () -- TODO:- -- Notification -- Progress -- Question -- TextInfo- -- Warning -- Scale -- ColorSelection -- Password@@ -461,6 +463,12 @@ "\n" : "--checklist" : serializeParam (shiftColumns flags) ++ matrixFlags (addSelectionColumn h mat)+zenity cfg (Notification flags) =+ void $ callZenity cfg $ "--notification" : serializeParam flags'+ where+ flags' = flags {noWrap = False, noMarkup = False}+zenity cfg (Warning flags) =+ void $ callZenity cfg $ "--warning" : serializeParam flags