avoid build warning when built w/o dbus

This commit is contained in:
Joey Hess 2017-12-06 10:54:48 -04:00
parent fc845e6530
commit 7c98f14391
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -40,10 +40,10 @@ instance Transferrable URLString where
- attempts. Displays notification when supported and when the user asked - attempts. Displays notification when supported and when the user asked
- for it. -} - for it. -}
notifyTransfer :: Transferrable t => Observable v => Direction -> t -> (NotifyWitness -> Annex v) -> Annex v notifyTransfer :: Transferrable t => Observable v => Direction -> t -> (NotifyWitness -> Annex v) -> Annex v
#ifdef WITH_DBUS_NOTIFICATIONS
notifyTransfer direction t a = case descTransfrerrable t of notifyTransfer direction t a = case descTransfrerrable t of
Nothing -> a NotifyWitness Nothing -> a NotifyWitness
Just desc -> do Just desc -> do
#ifdef WITH_DBUS_NOTIFICATIONS
wanted <- Annex.getState Annex.desktopnotify wanted <- Annex.getState Annex.desktopnotify
if (notifyStart wanted || notifyFinish wanted) if (notifyStart wanted || notifyFinish wanted)
then do then do
@ -60,7 +60,7 @@ notifyTransfer direction t a = case descTransfrerrable t of
return res return res
else a NotifyWitness else a NotifyWitness
#else #else
a NotifyWitness notifyTransfer _ _ a = a NotifyWitness
#endif #endif
notifyDrop :: AssociatedFile -> Bool -> Annex () notifyDrop :: AssociatedFile -> Bool -> Annex ()