From 4010611300feb07ad4853fa2e70e814f48bf9304 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 11 Feb 2006 11:51:20 +0000 Subject: [PATCH] rename user `preferences.xml' to `autosave.xml'. The former name lead to problems because a lot of people already have their *real* preferences set in ~/.fgfs/preferences.xml (and don't want fgfs to stomp over them), because the name doesn't tell people that their data aren't save there (comments!), and because this is inconsistent with the global preferences.xml file, where user changes *are* respected. --- src/Main/fg_commands.cxx | 8 ++++---- src/Main/fg_init.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 23bf24222..8af168e7a 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -205,16 +205,16 @@ do_exit (const SGPropertyNode * arg) SGPath config( homedir ); config.append( ".fgfs" ); #endif - config.append( "preferences.xml" ); + config.append( "autosave.xml" ); config.create_dir( 0700 ); - SG_LOG(SG_IO, SG_INFO, "Saving user preferences"); + SG_LOG(SG_IO, SG_INFO, "Saving user settings to autosave.xml"); try { writeProperties(config.str(), globals->get_props(), false, SGPropertyNode::USERARCHIVE); } catch (const sg_exception &e) { - guiErrorMessage("Error saving preferences: ", e); + guiErrorMessage("Error writing autosave.xml: ", e); } - SG_LOG(SG_INPUT, SG_BULK, "Finished Saving user preferences"); + SG_LOG(SG_INPUT, SG_BULK, "Finished Saving user settings"); } } fgExit(arg->getIntValue("status", 0)); diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index d59cf4216..9cda8aba1 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -606,15 +606,15 @@ bool fgInitConfig ( int argc, char **argv ) { SGPath config( homedir ); config.append( ".fgfs" ); #endif - config.append( "preferences.xml" ); - SG_LOG(SG_INPUT, SG_INFO, "Reading user preferences"); + config.append( "autosave.xml" ); + SG_LOG(SG_INPUT, SG_INFO, "Reading user settings from autosave.xml"); try { fgLoadProps(config.str().c_str(), globals->get_props(), false, SGPropertyNode::USERARCHIVE); } catch (...) { - SG_LOG(SG_INPUT, SG_BULK, "First time reading user preferences."); + SG_LOG(SG_INPUT, SG_BULK, "First time reading user settings"); } - SG_LOG(SG_INPUT, SG_BULK, "Finished Reading user preferences"); + SG_LOG(SG_INPUT, SG_BULK, "Finished Reading user settings"); } // parse options after loading aircraft to ensure any user -- 2.39.5