diff options
| author | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-16 08:26:35 +0100 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-16 11:57:13 +0100 |
| commit | 81cd06b3334f2f91f6a1ab62a28e11c7d0c677eb (patch) | |
| tree | f0b0cf37b406eda2dec8db4382aeb5f606cd1f0d /src/file_registry.rs | |
| parent | 4211b2ae06777d5bbe8261a1ab5c0dd057829a35 (diff) | |
Add preferences
Diffstat (limited to 'src/file_registry.rs')
| -rw-r--r-- | src/file_registry.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/file_registry.rs b/src/file_registry.rs index 25aba3f..6ebf986 100644 --- a/src/file_registry.rs +++ b/src/file_registry.rs @@ -5,6 +5,7 @@ use std::cell::RefCell; use std::path::PathBuf; +use relm4::ComponentController; use relm4::component::Controller; use relm4::gtk; @@ -50,3 +51,12 @@ pub fn unregister_file(path: &PathBuf) { files.retain(|(file_path, _)| file_path != path); }); } + +/// Broadcasts a message to all windows. +pub fn broadcast_to_all_windows(message: crate::actions::Action) { + WINDOW_CONTROLLERS.with_borrow(|controllers| { + for controller in controllers { + controller.sender().emit(message.clone()); + } + }); +} |