From: Olaf Wintermann Date: Fri, 7 Aug 2026 18:49:55 +0000 (+0200) Subject: remove requirement for mutable reference for open_filedialog and related functions X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=3a589aff11f4d08c22b4b9365784bc20631bb6f0;p=note.git remove requirement for mutable reference for open_filedialog and related functions --- diff --git a/ui-rs/src/ui/window.rs b/ui-rs/src/ui/window.rs index 5ad52d9..8606175 100644 --- a/ui-rs/src/ui/window.rs +++ b/ui-rs/src/ui/window.rs @@ -454,17 +454,17 @@ impl toolkit::UiObject { } } - pub fn openfile_dialog(&mut self, multiselect: bool, callback: F) + pub fn openfile_dialog(&self, multiselect: bool, callback: F) where F: FnMut(&mut event::Event) + 'static { openfile_dialog(self, multiselect as c_uint, callback); } - pub fn selectdirectory_dialog(&mut self, callback: F) + pub fn selectdirectory_dialog(&self, callback: F) where F: FnMut(&mut event::Event) + 'static { openfile_dialog(self, 2, callback); } - pub fn savefile_dialog(&mut self, name: &str, callback: F) + pub fn savefile_dialog(&self, name: &str, callback: F) where F: FnMut(&mut event::Event) + 'static { savefile_dialog(self, name, callback); }