diff options
| author | lukeflo | 2025-06-29 14:20:10 +0200 |
|---|---|---|
| committer | lukeflo | 2025-06-29 14:20:10 +0200 |
| commit | 40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac (patch) | |
| tree | 7aa2e7ef735e7020f7d1887af5e51448c7465f58 /src/bibiman.rs | |
| parent | 2f76849512fd36dc7c49b6c20cc9c598739c9176 (diff) | |
| download | bibiman-40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac.tar.gz bibiman-40629e0c2dc62bfb1786cb1c18bc68ed4c23e9ac.zip | |
working note-opening action. needs refinement: errors and ui
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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"); }; |
