diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-17 15:03:33 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-17 15:03:33 -0400 |
commit | 78c71badb458f3709f4689641dbb9efd53d962cf (patch) | |
tree | c00689a389ad0598f136566c0acbf0efabf8da76 /UI/Zenity.hs | |
parent | f60ac335e4e827fd242ab22539adb49f26e2c319 (diff) | |
download | keysafe-78c71badb458f3709f4689641dbb9efd53d962cf.tar.gz |
progress display for storing
Diffstat (limited to 'UI/Zenity.hs')
-rw-r--r-- | UI/Zenity.hs | 13 |
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 |