From ab0e5f2223a993371761baf240d815abdfcbb950 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Wed, 8 Apr 2020 14:32:55 -0500 Subject: [PATCH] reconciled with applet --- src/jalview/io/BackupFiles.java | 8 ++++---- test/jalview/io/BackupFilesTest.java | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index 1abe4d7..b1b8976 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -518,7 +518,7 @@ public class BackupFiles MessageManager.getString("label.delete"), MessageManager.getString("label.rename") }; - confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktop(), + confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager.getString("label.backupfiles_confirm_delete"), JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE, @@ -538,7 +538,7 @@ public class BackupFiles MessageManager.getString("label.delete"), MessageManager.getString("label.keep") }; - confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktop(), + confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager.getString("label.backupfiles_confirm_delete"), JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE, @@ -573,7 +573,7 @@ public class BackupFiles Long.toString(df.length()) })); } - int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktop(), + int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager .getString("label.backupfiles_confirm_delete"), @@ -662,7 +662,7 @@ public class BackupFiles "label.backupfiles_confirm_save_new_saved_file_not_ok")); } - int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktop(), + int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager .getString("label.backupfiles_confirm_save_file"), diff --git a/test/jalview/io/BackupFilesTest.java b/test/jalview/io/BackupFilesTest.java index 64cf902..c84285a 100644 --- a/test/jalview/io/BackupFilesTest.java +++ b/test/jalview/io/BackupFilesTest.java @@ -213,23 +213,23 @@ public class BackupFilesTest BackupFilesPresetEntry bfpe = new BackupFilesPresetEntry(suffix, digits, reverse, noMax, rollMax, false); - Cache.applicationProperties.setProperty(BackupFiles.ENABLED, + Cache.setPropertyNoSave(BackupFiles.ENABLED, Boolean.toString(enabled)); - Cache.applicationProperties.setProperty( + Cache.setPropertyNoSave( BackupFilesPresetEntry.SAVEDCONFIG, bfpe.toString()); /* - Cache.applicationProperties.setProperty(BackupFiles.ENABLED, + Cache.setPropertyNoSave(BackupFiles.ENABLED, Boolean.toString(enabled)); - Cache.applicationProperties.setProperty(BackupFiles.SUFFIX, suffix); - Cache.applicationProperties.setProperty(BackupFiles.SUFFIX_DIGITS, + Cache.setPropertyNoSave(BackupFiles.SUFFIX, suffix); + Cache.setPropertyNoSave(BackupFiles.SUFFIX_DIGITS, Integer.toString(digits)); - Cache.applicationProperties.setProperty(BackupFiles.REVERSE_ORDER, + Cache.setPropertyNoSave(BackupFiles.REVERSE_ORDER, Boolean.toString(reverse)); - Cache.applicationProperties.setProperty(BackupFiles.NO_MAX, + Cache.setPropertyNoSave(BackupFiles.NO_MAX, Boolean.toString(noMax)); - Cache.applicationProperties.setProperty(BackupFiles.ROLL_MAX, + Cache.setPropertyNoSave(BackupFiles.ROLL_MAX, Integer.toString(rollMax)); - Cache.applicationProperties.setProperty(BackupFiles.CONFIRM_DELETE_OLD, + Cache.setPropertyNoSave(BackupFiles.CONFIRM_DELETE_OLD, "false"); */ } -- 1.7.10.2