Author: silene
Date: Sun Apr 12 12:40:14 2009
New Revision: 34766

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34766&view=rev
Log:
Reverted "Removed conditional compilation for dummy_locales option" (revision 
34764)
It doesn't detect disabled option and it causes problems on Windows.

Modified:
    trunk/configure.ac
    trunk/src/game.cpp
    trunk/src/language.cpp

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=34766&r1=34765&r2=34766&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Apr 12 12:40:14 2009
@@ -324,6 +324,10 @@
 then
        CFLAGS="$CFLAGS -DDISABLE_EDITOR2"
        CXXFLAGS="$CXXFLAGS -DDISABLE_EDITOR2"
+fi
+
+if test x$dummylocales = xyes; then
+  AC_DEFINE([USE_DUMMYLOCALES],,[Define if the game should not use system 
locales])
 fi
 
 if test x$poolalloc = xno

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=34766&r1=34765&r2=34766&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sun Apr 12 12:40:14 2009
@@ -402,7 +402,11 @@
                        jump_to_editor_ = true;
 #endif
                } else if(val == "--dummy-locales") {
+#ifdef USE_DUMMYLOCALES
                        game_config::use_dummylocales = true;
+#else
+                       std::cerr << "Option --dummy-locales ignored: support 
was not compiled in.\n";
+#endif
                } else if(val[0] == '-') {
                        std::cerr << "unknown option: " << val << std::endl;
                        throw config::error("unknown option");

Modified: trunk/src/language.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=34766&r1=34765&r2=34766&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Sun Apr 12 12:40:14 2009
@@ -218,6 +218,7 @@
        locale = win_locale.c_str();
 #endif
 
+#ifdef USE_DUMMYLOCALES
        if (game_config::use_dummylocales)
        {
                static enum { UNINIT, NONE, PRESENT } status = UNINIT;
@@ -245,6 +246,7 @@
                        locale = xlocale.c_str();
                }
        }
+#endif
 
        char *res = NULL;
        std::string orig_locale;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to