diff options
Diffstat (limited to 'mumd/src/notify.rs')
| -rw-r--r-- | mumd/src/notify.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/mumd/src/notify.rs b/mumd/src/notify.rs deleted file mode 100644 index e52b909..0000000 --- a/mumd/src/notify.rs +++ /dev/null @@ -1,24 +0,0 @@ -use log::*; - -pub fn init() { - #[cfg(feature = "notifications")] - if libnotify::init("mumd").is_err() { - warn!("Unable to initialize notifications"); - } -} - -#[cfg(feature = "notifications")] -pub fn send(msg: String) -> Option<bool> { - match libnotify::Notification::new("mumd", Some(msg.as_str()), None).show() { - Ok(_) => Some(true), - Err(_) => { - warn!("Unable to send notification"); - Some(false) - } - } -} - -#[cfg(not(feature = "notifications"))] -pub fn send(_: String) -> Option<bool> { - None -} |
