changes
This commit is contained in:
@@ -11,6 +11,8 @@ pub(crate) struct Bar {
|
||||
pub(crate) active_popup: Option<String>,
|
||||
/// Module registry keyed by stable module id.
|
||||
pub(crate) modules: BTreeMap<&'static str, Box<dyn BarModule>>,
|
||||
/// Left, Middle, Right ; Module Order
|
||||
pub(crate) order: (Vec<String>, Vec<String>, Vec<String>),
|
||||
/// Surface id of the open popup.
|
||||
pub(crate) popup_id: Option<window::Id>,
|
||||
/// Fan-out routing table: module id -> services it wants.
|
||||
@@ -21,7 +23,10 @@ pub(crate) struct Bar {
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
pub(crate) fn new(modules_config_table: &Table) -> Self {
|
||||
pub(crate) fn new(
|
||||
modules_config_table: &Table,
|
||||
modules_order: (Vec<String>, Vec<String>, Vec<String>),
|
||||
) -> Self {
|
||||
// Registry owns construction: adding a module never edits this file.
|
||||
let modules: BTreeMap<&'static str, Box<dyn BarModule>> =
|
||||
modules::all(modules_config_table.clone())
|
||||
@@ -41,6 +46,7 @@ impl Bar {
|
||||
Self {
|
||||
active_popup: None,
|
||||
modules,
|
||||
order: modules_order,
|
||||
popup_id: None,
|
||||
routes,
|
||||
inputs,
|
||||
|
||||
Reference in New Issue
Block a user