refactor: compile applets as multicall binary

This commit is contained in:
Michael Aaron Murphy 2024-03-14 18:47:41 +01:00 committed by Michael Murphy
parent 4099624499
commit 3c4acdacd7
48 changed files with 2393 additions and 2256 deletions

View file

@ -12,6 +12,8 @@ chrono = { version = "0.4.34", features = ["clock"] }
once_cell = "1"
tokio = { version = "1.36.0", features = ["time"] }
tracing.workspace = true
tracing-log.workspace = true
tracing-subscriber.workspace = true
# Application i18n
i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-requester"] }

View file

@ -0,0 +1,11 @@
mod localize;
mod time;
mod window;
use window::Window;
pub fn run() -> cosmic::iced::Result {
localize::localize();
cosmic::applet::run::<Window>(true, ())
}

View file

@ -1,11 +1,10 @@
mod localize;
mod time;
mod window;
use window::Window;
const VERSION: &str = env!("CARGO_PKG_VERSION");
fn main() -> cosmic::iced::Result {
localize::localize();
tracing_subscriber::fmt::init();
let _ = tracing_log::LogTracer::init();
cosmic::applet::run::<Window>(true, ())
tracing::info!("Starting time applet with version {VERSION}");
cosmic_applet_time::run()
}

View file

@ -16,7 +16,6 @@ use cosmic::{
};
use chrono::{DateTime, Datelike, DurationRound, Local, Months, NaiveDate, Timelike, Weekday};
use std::time::Duration;
use crate::fl;
use crate::time::get_calender_first;