Update
This commit is contained in:
parent
bdee2f4b1c
commit
fb98506fe3
12
Cargo.toml
12
Cargo.toml
@ -23,3 +23,15 @@ features = [ "v3_10", "v3_12", "v3_22" ]
|
||||
[dependencies.gdk]
|
||||
git = "https://github.com/gtk-rs/gdk.git"
|
||||
features = [ "v3_10", "v3_12", "v3_22" ]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 2 # controls the `--opt-level` the compiler builds with
|
||||
debug = true # controls whether the compiler passes `-C debuginfo`
|
||||
# a value of `true` is equivalent to `2`
|
||||
rpath = false # controls whether the compiler passes `-C rpath`
|
||||
lto = false # controls `-C lto` for binaries and staticlibs
|
||||
debug-assertions = true # controls whether debug assertions are enabled
|
||||
codegen-units = 1 # controls whether the compiler passes `-C codegen-units`
|
||||
# `codegen-units` is ignored when `lto = true`
|
||||
panic = 'unwind' # panic strategy (`-C panic=...`), can also be 'abort'
|
||||
|
||||
|
@ -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 {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user