diff --git a/src/errors.rs b/src/errors.rs index 8def5fa8d..021cc98b5 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -3,9 +3,6 @@ use std::convert::From; use std; use toml; -#[cfg(feature = "notify")] -use libnotify; - error_chain! { @@ -13,7 +10,6 @@ error_chain! { Alsa(alsa::Error); IO(std::io::Error); Toml(toml::de::Error); - Libnotify(libnotify::errors::Error) #[cfg(feature = "notify")]; } } diff --git a/src/main.rs b/src/main.rs index 1777691ce..8480b723c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,6 +61,10 @@ mod notif; use app_state::*; +#[cfg(feature = "notify")] +use libnotify::functions::*; +#[cfg(feature = "notify")] +use libnotify::manual_functions::*; @@ -69,7 +73,7 @@ fn main() { // TODO: error handling #[cfg(feature = "notify")] - libnotify::init("PNMixer-rs").unwrap(); + init("PNMixer-rs"); flexi_logger::LogOptions::new() .log_to_file(false) @@ -84,5 +88,5 @@ fn main() { gtk::main(); #[cfg(feature = "notify")] - libnotify::uninit(); + uninit(); }