Add global settings wipe

This commit is contained in:
skylarmt 2015-04-18 01:33:32 -06:00
parent 3bb6d1e997
commit b6c7a759bd
2 changed files with 31 additions and 22 deletions

View File

@ -395,7 +395,7 @@ public class Interpreter extends javax.swing.JInternalFrame {
try {
FileUtils.saveFile(commandsForExport,
FileUtils.getFileWithExtension(fc).toString(),
false);
true);
} catch (IOException ex) {
JOptionPane.showInternalMessageDialog(this,
"Error saving: " + ex.getMessage(),

View File

@ -89,6 +89,15 @@ public class PrefStorage {
return true;
}
/**
* Wipe all settings.
*
* @throws java.util.prefs.BackingStoreException
*/
public static void wipe() throws BackingStoreException {
prefs.clear();
}
// xkcd 221 compliance.
int getRandomNumber() {
return 4; // chosen by fair dice roll.