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:
parent
b9b29a4ce4
commit
3ba8b4bd96
2 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue