diff options
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index 200db96..fb72e93 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -20,7 +20,7 @@ use crate::bibiman::entries::EntryTableColumn; use crate::bibiman::{bibisetup::*, search::BibiSearch}; use crate::cliargs::CLIArgs; use crate::config::BibiConfig; -use crate::tui::popup::{PopupArea, PopupKind}; +use crate::tui::popup::{PopupArea, PopupItem, PopupKind}; use crate::tui::Tui; use crate::{app, cliargs}; use crate::{bibiman::entries::EntryTable, bibiman::keywords::TagList}; @@ -161,7 +161,7 @@ impl Bibiman { popup_kind: PopupKind, message: Option<&str>, object: Option<&str>, - items: Option<Vec<(String, String)>>, + items: Option<Vec<(String, String, PopupItem)>>, ) -> Result<()> { if let CurrentArea::EntryArea = self.current_area { self.former_area = Some(FormerArea::EntryArea); @@ -631,10 +631,18 @@ impl Bibiman { } pub fn append_to_file(&mut self) { - let mut items = vec![("Create new file".to_owned(), "".to_string())]; + let mut items = vec![( + "Create new file".to_owned(), + "".to_string(), + PopupItem::Default, + )]; if self.main_bibfiles.len() > 1 { for f in self.main_bibfiles.clone() { - items.push(("File: ".into(), f.to_str().unwrap().to_owned())); + items.push(( + "File: ".into(), + f.to_str().unwrap().to_owned(), + PopupItem::Bibfile, + )); } } else { items.push(( @@ -645,6 +653,7 @@ impl Bibiman { .to_str() .unwrap() .to_owned(), + PopupItem::Bibfile, )); } self.popup_area.popup_selection(items); |
