From: Kevin Lamonte Date: Fri, 2 Aug 2019 11:03:48 +0000 (-0500) Subject: save from statusbar X-Git-Tag: fanfix-3.0.1^2~131 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=3b14a3107328142e682021d47b50de18d2fb5707;p=fanfix.git save from statusbar --- diff --git a/src/jexer/TTableWindow.java b/src/jexer/TTableWindow.java index 9365892..44ff7b4 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); }