summaryrefslogtreecommitdiffhomepage
path: root/UI/Zenity.hs
diff options
context:
space:
mode:
Diffstat (limited to 'UI/Zenity.hs')
-rw-r--r--UI/Zenity.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/UI/Zenity.hs b/UI/Zenity.hs
index 228b11a..a419b62 100644
--- a/UI/Zenity.hs
+++ b/UI/Zenity.hs
@@ -23,6 +23,7 @@ zenityUI = UI
loc <- filterM (\p -> doesFileExist (p </> "zenity")) ps
return (not (null loc))
, showError = myShowError
+ , showInfo = myShowInfo
, promptQuestion = myPromptQuestion
, promptName = myPromptName
, promptPassword = myPromptPassword
@@ -42,6 +43,18 @@ myShowError desc = bracket go cleanup (\_ -> return ())
_ <- waitZenity h
return ()
+myShowInfo :: Title -> Desc -> IO ()
+myShowInfo title desc = bracket go cleanup (\_ -> return ())
+ where
+ go = runZenity
+ [ "--info"
+ , "--title", title
+ , "--text", desc
+ ]
+ cleanup h = do
+ _ <- waitZenity h
+ return ()
+
myPromptQuestion :: Title -> Desc -> Question -> IO Bool
myPromptQuestion title desc question = do
h <- runZenity