From cf2985598c951a0be2d76356f0ab95b4348e1ed7 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Sun, 20 Jan 2019 01:10:59 +0000 Subject: [PATCH] JAL-3141 Fixed example filenames in Preferences pane (no extension in BackupFiles now), and new default template. --- src/jalview/gui/Preferences.java | 2 +- src/jalview/jbgui/GPreferences.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 5740759..bee6a73 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -555,7 +555,7 @@ public class Preferences extends GPreferences enableBackupFiles .setSelected(Cache.getDefault(BackupFiles.ENABLED, true)); suffixTemplate.setText(Cache.getDefault(BackupFiles.SUFFIX, - "-bak" + BackupFiles.NUM_PLACEHOLDER)); + ".v" + BackupFiles.NUM_PLACEHOLDER)); suffixDigitsSpinner .setValue(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3)); suffixReverse.setSelected( diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index e26b991..5628f43 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -2013,9 +2013,8 @@ public class GPreferences extends JPanel String base = MessageManager.getString("label.filename"); if (base == null || base.length() > 0) { - base = "filename"; + base = "filename.fa"; } - String extension = ".fa"; String suffix = suffixTemplate.getText(); int digits = 3; @@ -2071,7 +2070,7 @@ public class GPreferences extends JPanel exampleSB.append("\n"); } exampleSB.append(BackupFilenameFilter.getBackupFilename(index, - base, suffix, digits, extension)); + base, suffix, digits)); if (min == max) { // no extra text needed @@ -2124,7 +2123,7 @@ public class GPreferences extends JPanel exampleSB.append("\n"); } exampleSB.append(BackupFilenameFilter.getBackupFilename(index, - base, suffix, digits, extension)); + base, suffix, digits)); if (min == max) { // no extra text needed -- 1.7.10.2