diff options
| author | Eskil <eskilq@kth.se> | 2020-11-21 15:56:27 +0100 |
|---|---|---|
| committer | Eskil <eskilq@kth.se> | 2020-11-21 15:56:27 +0100 |
| commit | 08397f89fd6fdefed67533bf9403bde07f1ee40e (patch) | |
| tree | 731613e6e00d66e7d35e782a1171677388c83306 /mumd/src/notify.rs | |
| parent | ff9a37af7ddf5484bb7db61ae01f8aafd9d1e91d (diff) | |
| parent | be4d273fa8778ec87ad4a34502d0f3c75657fbbc (diff) | |
| download | mum-08397f89fd6fdefed67533bf9403bde07f1ee40e.tar.gz | |
Merge branch 'sound-effect' into 'main'
Sound effects on events
Closes #68
See merge request gustav/mum!32
Diffstat (limited to 'mumd/src/notify.rs')
| -rw-r--r-- | mumd/src/notify.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/notify.rs b/mumd/src/notify.rs index 0739c58..ee387cc 100644 --- a/mumd/src/notify.rs +++ b/mumd/src/notify.rs @@ -1,9 +1,9 @@ pub fn init() { - #[cfg(feature = "libnotify")] + #[cfg(feature = "notifications")] libnotify::init("mumd").unwrap(); } -#[cfg(feature = "libnotify")] +#[cfg(feature = "notifications")] pub fn send(msg: String) -> Option<bool> { match libnotify::Notification::new("mumd", Some(msg.as_str()), None).show() { Ok(_) => Some(true), @@ -14,7 +14,7 @@ pub fn send(msg: String) -> Option<bool> { } } -#[cfg(not(feature = "libnotify"))] +#[cfg(not(feature = "notifications"))] pub fn send(_: String) -> Option<bool> { None } |
