add some alerts

This commit is contained in:
Joey Hess 2012-07-29 13:22:08 -04:00
parent 2dc5697a0a
commit 09e77a0cf0
3 changed files with 34 additions and 10 deletions

View file

@ -74,9 +74,7 @@ watchThread st dstatus transferqueue changechan = do
{- Initial scartup scan. The action should return once the scan is complete. -}
startupScan :: ThreadState -> DaemonStatusHandle -> IO a -> IO a
startupScan st dstatus scanner = do
runThreadState st $
showAction "scanning"
let alert = activityAlert Nothing "Performing startup scan"
runThreadState st $ showAction "scanning"
r <- alertWhile dstatus alert scanner
modifyDaemonStatus_ dstatus $ \s -> s { scanComplete = True }
@ -86,6 +84,9 @@ startupScan st dstatus scanner = do
showAction "started"
return r
where
alert = activityAlert Nothing "Performing startup scan"
ignored :: FilePath -> Bool
ignored = ig . takeFileName