fix: logging and use dbus config subscription in audio applet

This commit is contained in:
Ashley Wulber 2024-01-18 18:16:37 -05:00 • committed by Ashley Wulber
parent 85e4e65eb8
commit 6851d9de54
20 changed files with 63 additions and 139 deletions

View file

@ -1,19 +1,19 @@
[package]
name = "cosmic-applet-audio"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
icon-loader = { version = "0.3.6", features = ["gtk"] }
libpulse-binding = "2.26.0"
libpulse-glib-binding = "2.25.0"
libpulse-binding = "2.28.1"
libpulse-glib-binding = "2.28.1"
tokio = { version = "1.20.1", features=["full"] }
libcosmic.workspace = true
cosmic-time.workspace = true
tracing = "0.1.40"
pretty_env_logger = "0.4.0"
tracing-subscriber.workspace = true
tracing-log.workspace = true
# Application i18n
i18n-embed = { version = "0.13", features = ["fluent-system", "desktop-requester"] }
i18n-embed-fl = "0.6"

View file

@ -40,12 +40,18 @@ use mpris_subscription::MprisUpdate;
mod config;
mod mpris_subscription;
mod pulse;
const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn main() -> cosmic::iced::Result {
pretty_env_logger::init();
tracing_subscriber::fmt::init();
let _ = tracing_log::LogTracer::init();
// Prepare i18n
localize();
tracing::info!("Starting audio applet with version {VERSION}");
cosmic::applet::run::<Audio>(true, ())
}