From 8ce55652306908bf24ee351caad60bd21b0bef72 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 23 Mar 2026 20:52:55 +0100 Subject: Use breakpoints to disable horizontal layout at smaller sizes --- src/file_registry.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/file_registry.rs') diff --git a/src/file_registry.rs b/src/file_registry.rs index 749697d..188e1fe 100644 --- a/src/file_registry.rs +++ b/src/file_registry.rs @@ -21,7 +21,7 @@ use std::cell::RefCell; use std::path::PathBuf; use relm4::component::Controller; -use relm4::gtk; +use relm4::{adw}; use crate::AppModel; use crate::actions::Action; @@ -31,7 +31,7 @@ thread_local! { static WINDOW_CONTROLLERS: RefCell>> = const { RefCell::new(Vec::new()) }; /// Tracks which files are currently open to prevent duplicate windows. - static OPEN_FILES: RefCell> = const { RefCell::new(Vec::new()) }; + static OPEN_FILES: RefCell> = const { RefCell::new(Vec::new()) }; /// Stores senders for all windows (including main window) to enable broadcasting. static WINDOW_SENDERS: RefCell>> = const { RefCell::new(Vec::new()) }; @@ -45,7 +45,7 @@ pub fn store_controller(controller: Controller) { } /// Returns the window that has the given file open, if any. -pub fn find_window_for_file(path: &PathBuf) -> Option { +pub fn find_window_for_file(path: &PathBuf) -> Option { OPEN_FILES.with_borrow(|files| { files .iter() @@ -55,7 +55,7 @@ pub fn find_window_for_file(path: &PathBuf) -> Option { } /// Registers a file as being open in the given window. -pub fn register_file(path: &PathBuf, window: >k::Window) { +pub fn register_file(path: &PathBuf, window: &adw::Window) { OPEN_FILES.with_borrow_mut(|files| { if !files.iter().any(|(file_path, _)| file_path == path) { files.push((path.clone(), window.clone())); -- cgit