From 3b14a3107328142e682021d47b50de18d2fb5707 Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Fri, 2 Aug 2019 06:03:48 -0500 Subject: [PATCH] save from statusbar --- src/jexer/TTableWindow.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/jexer/TTableWindow.java b/src/jexer/TTableWindow.java index 9365892f..44ff7b48 100644 --- a/src/jexer/TTableWindow.java +++ b/src/jexer/TTableWindow.java @@ -343,6 +343,20 @@ public class TTableWindow extends TScrollableWindow { return; } + if (command.equals(cmSave)) { + try { + String filename = fileSaveBox("."); + if (filename != null) { + tableField.saveToCsvFilename(filename); + } + } catch (IOException e) { + messageBox(i18n.getString("errorDialogTitle"), + MessageFormat.format(i18n. + getString("errorWritingFile"), e.getMessage())); + } + return; + } + // Didn't handle it, let children get it instead super.onCommand(command); } -- 2.27.0