[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-cvs] enigma/src options.cc,1.24,1.25
From: |
Ralf Westram <address@hidden> |
Subject: |
[Enigma-cvs] enigma/src options.cc,1.24,1.25 |
Date: |
Mon, 20 Oct 2003 18:30:33 +0000 |
Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv24780/src
Modified Files:
options.cc
Log Message:
- windows version prefers personal configuration file in $HOME
Index: options.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/options.cc,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** options.cc 20 Oct 2003 08:05:46 -0000 1.24
--- options.cc 20 Oct 2003 18:30:31 -0000 1.25
***************
*** 237,244 ****
bool options::Save () {
#ifdef __MINGW32__
! string fname = Windows_ConfigurationFileName();
#else
string fname = Personal_ConfigurationFileName();
#endif
FILE *fp = fopen(fname.c_str(), "wt");
--- 237,249 ----
bool options::Save () {
#ifdef __MINGW32__
! string fname;
! if (!getenv("HOME")) // if HOME undefined
! fname = Windows_ConfigurationFileName();
! else
! fname = Personal_ConfigurationFileName();
#else
string fname = Personal_ConfigurationFileName();
#endif
+
FILE *fp = fopen(fname.c_str(), "wt");
***************
*** 300,310 ****
error |= load_from_file (fname.c_str());
- fname = Personal_ConfigurationFileName();
- error |= load_from_file (fname.c_str());
-
#ifdef __MINGW32__
fname = Windows_ConfigurationFileName();
error |= load_from_file (fname.c_str());
#endif
LevelStatusChanged = false;
--- 305,316 ----
error |= load_from_file (fname.c_str());
#ifdef __MINGW32__
fname = Windows_ConfigurationFileName();
error |= load_from_file (fname.c_str());
#endif
+
+ // personal config (in $HOME) overides all!
+ fname = Personal_ConfigurationFileName();
+ error |= load_from_file (fname.c_str());
LevelStatusChanged = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Enigma-cvs] enigma/src options.cc,1.24,1.25,
Ralf Westram <address@hidden> <=