adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src nls.cc,1.3,1.4 prefs.cc,1.14,1.15


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src nls.cc,1.3,1.4 prefs.cc,1.14,1.15
Date: Sat, 13 Apr 2002 16:21:45 -0400

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv28053

Modified Files:
        nls.cc prefs.cc 
Log Message:
REWROTE locale selection procedure once more - with a bit of luck it is fine 
now :)

Index: nls.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/nls.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** nls.cc      13 Apr 2002 18:32:41 -0000      1.3
--- nls.cc      13 Apr 2002 20:21:43 -0000      1.4
***************
*** 31,35 ****
  void nls::init (config &myconfig)
  {
!     if (myconfig.language != "en_EN")
          set_language (myconfig.language);
      
--- 31,40 ----
  void nls::init (config &myconfig)
  {
!     // if no language specified in the config file, determine
!     // the locale from the environment variables 
!     if (myconfig.language == "")
!         setlocale (LC_MESSAGES, "");
!     // otherwise overwrite any environment variables
!     else 
          set_language (myconfig.language);
      

Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** prefs.cc    13 Apr 2002 18:32:41 -0000      1.14
--- prefs.cc    13 Apr 2002 20:21:43 -0000      1.15
***************
*** 49,61 ****
      audio_sample_rate = 2;          // 11025, 22050 or 44100 Hz
      audio_volume = 100;             // 0 - 100%
      
      // set the path to the adonthellrc file:
      adonthellrc = string (getenv ("HOME")) + "/.adonthell";
-     
-     // try to figure out the language
-     char *lang = getenv ("LANG");
-     if (lang == NULL) lang = getenv ("LC_ALL");
-     if (lang == NULL) lang = getenv ("LC_MESSAGES");
-     language = lang ? lang : "en_EN";
  }
   
--- 49,56 ----
      audio_sample_rate = 2;          // 11025, 22050 or 44100 Hz
      audio_volume = 100;             // 0 - 100%
+     language = "";                  // Let the user's environment decide
      
      // set the path to the adonthellrc file:
      adonthellrc = string (getenv ("HOME")) + "/.adonthell";
  }
   




reply via email to

[Prev in Thread] Current Thread [Next in Thread]