diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-22 10:42:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-22 14:12:19 -0400 |
commit | 35419994e9418444dc82e5c90c579203cc4c3616 (patch) | |
tree | 0d4374fbc7f233cfa409e9e142b36f00d12f71f4 /Command/TransferKeys.hs | |
parent | f2a5858f85f1d6e999d707f4b48cd2ea643197bc (diff) |
add desktop notifications
Motivation: Hook scripts for nautilus or other file managers
need to provide the user with feedback that a file is being downloaded.
This commit was sponsored by THM Schoemaker.
Diffstat (limited to 'Command/TransferKeys.hs')
-rw-r--r-- | Command/TransferKeys.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/TransferKeys.hs b/Command/TransferKeys.hs index b42628609..8f4498eb1 100644 --- a/Command/TransferKeys.hs +++ b/Command/TransferKeys.hs @@ -13,7 +13,7 @@ import Common.Annex import Command import Annex.Content import Logs.Location -import Logs.Transfer +import Annex.Transfer import qualified Remote import Types.Key @@ -34,14 +34,15 @@ start = withHandles $ \(readh, writeh) -> do stop where runner (TransferRequest direction remote key file) - | direction == Upload = + | direction == Upload = notifyTransfer direction file $ upload (Remote.uuid remote) key file forwardRetry $ \p -> do ok <- Remote.storeKey remote key file p when ok $ Remote.logStatus remote key InfoPresent return ok - | otherwise = download (Remote.uuid remote) key file forwardRetry $ \p -> - getViaTmp key $ \t -> Remote.retrieveKeyFile remote key file t p + | otherwise = notifyTransfer direction file $ + download (Remote.uuid remote) key file forwardRetry $ \p -> + getViaTmp key $ \t -> Remote.retrieveKeyFile remote key file t p {- stdin and stdout are connected with the caller, to be used for - communication with it. But doing a transfer might involve something |