Update
This commit is contained in:
@@ -2,6 +2,7 @@ use gtk;
|
||||
|
||||
|
||||
|
||||
// TODO: glade stuff, config, alsacard
|
||||
pub struct AppS {
|
||||
/* we keep this to ensure the lifetime is across the whole application */
|
||||
pub status_icon: gtk::StatusIcon,
|
||||
|
||||
@@ -178,6 +178,8 @@ extern fn watch_cb(
|
||||
return true as glib_sys::gboolean;
|
||||
}
|
||||
|
||||
// TODO: handle alsa events, pass to 'on_alsa_event'
|
||||
|
||||
return true as glib_sys::gboolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ use alsa;
|
||||
use std::convert::From;
|
||||
use std;
|
||||
|
||||
|
||||
|
||||
error_chain! {
|
||||
foreign_links {
|
||||
Alsa(alsa::Error);
|
||||
@@ -9,11 +11,13 @@ error_chain! {
|
||||
|
||||
}
|
||||
|
||||
|
||||
pub trait CHErr {
|
||||
type Item;
|
||||
fn cherr(self) -> Result<Self::Item>;
|
||||
}
|
||||
|
||||
|
||||
impl<A, E: std::error::Error> CHErr for std::result::Result<A, E>
|
||||
where Error: std::convert::From<E>
|
||||
{
|
||||
@@ -37,6 +41,7 @@ macro_rules! try_w {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! try_wr {
|
||||
($expr:expr, $ret:expr) => (match $expr {
|
||||
@@ -64,6 +69,7 @@ macro_rules! try_wr {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! try_r {
|
||||
($expr:expr, $ret:expr) => (match $expr {
|
||||
@@ -73,3 +79,4 @@ macro_rules! try_r {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user