aboutsummaryrefslogtreecommitdiff
path: root/src/tui/popup.rs
diff options
context:
space:
mode:
authorlukeflo2025-06-01 14:54:38 +0200
committerlukeflo2025-06-01 14:54:38 +0200
commitd64596242ab185fffebc773ad2dcb5f1be2fccc2 (patch)
tree63c63e0d012b07ce66153ffba9dc7b13ebee0124 /src/tui/popup.rs
parent62580d8cc537808c34b0d9a0fe5554b4806a7aa6 (diff)
downloadbibiman-d64596242ab185fffebc773ad2dcb5f1be2fccc2.tar.gz
bibiman-d64596242ab185fffebc773ad2dcb5f1be2fccc2.zip
some fixes and test for `file_prefix` with new bool
Diffstat (limited to 'src/tui/popup.rs')
-rw-r--r--src/tui/popup.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs
index f3f6d58..93b01c3 100644
--- a/src/tui/popup.rs
+++ b/src/tui/popup.rs
@@ -114,28 +114,6 @@ impl PopupArea {
Text::from(helptext)
}
- /// Creates a popup message. The needed arguments are:
- ///
- /// - `message` as `str`: The message displayed in the popup.
- /// - `object` as `str`: A possible object added to the message. E.g. the content
- /// which gets copied to the clipboard.
- /// - `msg_confirm` as `bool`: if `true` its a confirmation message displayed in
- /// in the set `confirm_color` (default: green), if `false` its a warning
- /// message displayed in the set `warn_color` (default: red).
- pub fn popup_message(&mut self, message: &str, object: &str, msg_confirm: bool) {
- if object.is_empty() {
- self.popup_message = message.to_owned();
- } else {
- self.popup_message = message.to_owned() + object; //format!("{} \"{}\"", message, object);
- }
- if msg_confirm {
- self.popup_kind = Some(PopupKind::MessageConfirm);
- } else {
- self.popup_kind = Some(PopupKind::MessageError)
- }
- self.is_popup = true;
- }
-
/// Opens a popup with a selectable list
///
/// The list items are passed as argument of the kind `Vec<(String, String)>`.