ENH add icons to notifications
This commit is contained in:
parent
1ae1510091
commit
63f4c0c035
|
@ -489,9 +489,12 @@ umountNotify msg dir = finally
|
||||||
|
|
||||||
-- | Send a notification indicating the mount succeeded
|
-- | Send a notification indicating the mount succeeded
|
||||||
notifyMounted :: Bool -> Bool -> String -> IO ()
|
notifyMounted :: Bool -> Bool -> String -> IO ()
|
||||||
notifyMounted succeeded mounted label = void $ spawnProcess "notify-send" [msg]
|
notifyMounted succeeded mounted label =
|
||||||
|
void $ spawnProcess "notify-send" ["-i", i, msg]
|
||||||
where
|
where
|
||||||
f = if succeeded then "Successfully %sed %s" else "Failed to %s %s"
|
(f, i) = if succeeded
|
||||||
|
then ("Successfully %sed %s", "dialog-information-symbolic")
|
||||||
|
else ("Failed to %s %s", "dialog-error-symbolic")
|
||||||
m = if mounted then "unmount" else "mount" :: String
|
m = if mounted then "unmount" else "mount" :: String
|
||||||
msg = printf f m label
|
msg = printf f m label
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue