+
+ /**
+ * Autosave the settings file without any prompts
+ */
+ public void silentSave()
+ {
+ saveConfig(Config.getConfigFile());
+ }
+
+ /**
+ * Actually save the config file
+ * @param inSaveFile file to save to
+ */
+ private void saveConfig(File inSaveFile)
+ {
+ FileOutputStream outStream = null;
+ try
+ {
+ outStream = new FileOutputStream(inSaveFile);
+ Config.getAllConfig().store(outStream, "GpsPrune config file");
+ }
+ catch (IOException ioe) {
+ _app.showErrorMessageNoLookup(getNameKey(),
+ I18nManager.getText("error.save.failed") + " : " + ioe.getMessage());
+ }
+ catch (NullPointerException npe) {} // no config file given
+ finally {
+ try {outStream.close();} catch (Exception e) {}
+ }
+ }