diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-02 18:09:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-02 18:10:03 -0400 |
commit | a772b23c62f4f877370ee13090740fc807b22a67 (patch) | |
tree | 5c012c7140fc80bac995b0a2d94d2c39bd438925 /Annex/Notification.hs | |
parent | b98db5d6f1aa44103e17bfce760fa365d678b7fb (diff) |
fix warning on !dbus
Diffstat (limited to 'Annex/Notification.hs')
-rw-r--r-- | Annex/Notification.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Annex/Notification.hs b/Annex/Notification.hs index 9a2b3956f5..06a099888b 100644 --- a/Annex/Notification.hs +++ b/Annex/Notification.hs @@ -10,9 +10,9 @@ module Annex.Notification where import Common.Annex -import qualified Annex import Logs.Transfer #ifdef WITH_DBUS_NOTIFICATIONS +import qualified Annex import Types.DesktopNotify import qualified DBus.Notify as Notify import qualified DBus.Client @@ -26,8 +26,8 @@ data NotifyWitness = NotifyWitness - for it. -} notifyTransfer :: Direction -> Maybe FilePath -> (NotifyWitness -> Annex Bool) -> Annex Bool notifyTransfer _ Nothing a = a NotifyWitness -notifyTransfer direction (Just f) a = do #ifdef WITH_DBUS_NOTIFICATIONS +notifyTransfer direction (Just f) a = do wanted <- Annex.getState Annex.desktopnotify let action = if direction == Upload then "uploading" else "downloading" let basedesc = action ++ " " ++ f @@ -49,13 +49,13 @@ notifyTransfer direction (Just f) a = do return ok else a NotifyWitness #else - a NotifyWitness +notifyTransfer _ (Just _) a = do a NotifyWitness #endif notifyDrop :: Maybe FilePath -> Bool -> Annex () notifyDrop Nothing _ = noop -notifyDrop (Just f) ok = do #ifdef WITH_DBUS_NOTIFICATIONS +notifyDrop (Just f) ok = do wanted <- Annex.getState Annex.desktopnotify when (notifyFinish wanted) $ liftIO $ do client <- DBus.Client.connectSession @@ -64,7 +64,7 @@ notifyDrop (Just f) ok = do else "failed to drop" ++ f void $ Notify.notify client (mkNote msg) #else - noop +notifyDrop (Just _) _ = noop #endif #ifdef WITH_DBUS_NOTIFICATIONS |