From 92dc8d4272d82842b62132f21e543e38c97e150f Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 22 Feb 2019 09:19:53 +0000 Subject: [PATCH] JAL-3141 improved message for asking whether to delete files (file modification time and size added to info to help user decide --- resources/lang/Messages.properties | 3 ++- resources/lang/Messages_es.properties | 3 ++- src/jalview/io/BackupFiles.java | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index d751266..4ad76a0 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1407,4 +1407,5 @@ label.newerdelete_line = Backup file\n''{0}''\t(modified {2}, size {4})\nis to b label.confirm_deletion = Confirm deletion of ''{0}''? label.delete = Delete label.rename = Rename -label.keep = Keep \ No newline at end of file +label.keep = Keep +label.file_info = (modified {0}, size {1}) \ No newline at end of file diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index ba50577..86f60f9 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1408,4 +1408,5 @@ label.newerdelete_line = El archivo de respaldo\n''{0}''\t(modificado {2}, tama label.confirm_delete = Confirmar eliminar ''{0}''? label.delete = Borrar label.rename = Cambiar -label.keep = Mantener \ No newline at end of file +label.keep = Mantener +label.file_info = (modificado {0}, tamaƱo {1}) \ No newline at end of file diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index bd23a2d..dbda022 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -566,8 +566,7 @@ public class BackupFiles } - // return should be TRUE if file is to be deleted (added to the deleteFiles - // list) + // return should be TRUE if file is to be deleted return (confirmButton == JvOptionPane.YES_OPTION); } @@ -587,6 +586,11 @@ public class BackupFiles File df = deleteFiles.get(i); messageSB.append("\n"); messageSB.append(df.getName()); + messageSB.append(" "); + messageSB.append(MessageManager.formatMessage("label.file_info", + new String[] + { sdf.format(df.lastModified()), + Long.toString(df.length()) })); } int confirmButton = JvOptionPane.showConfirmDialog(Desktop.desktop, -- 1.7.10.2