1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix: regressions introduced by #505

- Crash on startup if modules missing common options
- Crash on startup due to disable_popup incorrectly mandatory
This commit is contained in:
Jake Stanger 2024-04-01 15:37:11 +01:00
parent b9b29a4ce4
commit 3ba8b4bd96
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 2 additions and 1 deletions

View file

@ -27,6 +27,7 @@ pub struct CommonConfig {
pub on_mouse_exit: Option<ScriptInput>, pub on_mouse_exit: Option<ScriptInput>,
pub tooltip: Option<String>, pub tooltip: Option<String>,
#[serde(default)]
pub disable_popup: bool, pub disable_popup: bool,
} }

View file

@ -21,7 +21,7 @@ macro_rules! module_impl {
} }
fn take_common(&mut self) -> $crate::config::CommonConfig { fn take_common(&mut self) -> $crate::config::CommonConfig {
self.common.take().expect("common config to exist") self.common.take().unwrap_or_default()
} }
}; };
} }