From d64596242ab185fffebc773ad2dcb5f1be2fccc2 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 1 Jun 2025 14:54:38 +0200 Subject: some fixes and test for `file_prefix` with new bool --- src/tui/popup.rs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/tui/popup.rs') 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)>`. -- cgit v1.2.3