From 40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 29 Jun 2025 14:20:10 +0200 Subject: working note-opening action. needs refinement: errors and ui --- src/bibiman.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/bibiman.rs') diff --git a/src/bibiman.rs b/src/bibiman.rs index 21601e3..96a733c 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -692,6 +692,21 @@ impl Bibiman { None, )?; } + } + if self.popup_area.popup_list[popup_idx].0.contains("Note") { + let file = expand_home(&PathBuf::from(popup_entry.clone())); + // let object: OsString = popup_entry.into(); + if file.is_file() { + app::open_connected_file(cfg, &file.into_os_string())?; + self.close_popup(); + } else { + self.open_popup( + PopupKind::MessageError, + Some("No valid file path: "), + Some(file.to_str().unwrap()), + None, + )?; + } } else { eprintln!("Unable to find ressource to open"); }; -- cgit v1.2.3