Author: silene
Date: Thu Jun 25 20:14:14 2009
New Revision: 36408

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36408&view=rev
Log:
Set LC_TIME locale at the same place as other locales. (Fixes the linux part of 
bug #13782.)

Modified:
    trunk/src/dialogs.cpp
    trunk/src/language.cpp

Modified: trunk/src/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=36408&r1=36407&r2=36408&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Thu Jun 25 20:14:14 2009
@@ -429,7 +429,6 @@
                SDL_BlitSurface(map_surf,NULL,screen,&map_rect);
        }
 
-       char* old_locale = std::setlocale(LC_TIME, 
get_locale().localename.c_str());
        char time_buf[256] = {0};
        const save_info& save = (*info_)[index_];
        tm* tm_l = localtime(&save.time_modified);
@@ -440,10 +439,6 @@
                }
        } else {
                LOG_NG << "localtime() returned null for time " << 
save.time_modified << ", save " << save.name;
-       }
-
-       if(old_locale) {
-               std::setlocale(LC_TIME, old_locale);
        }
 
        std::stringstream str;

Modified: trunk/src/language.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=36408&r1=36407&r2=36408&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Thu Jun 25 20:14:14 2009
@@ -288,6 +288,7 @@
        current_language = locale;
        wesnoth_setlocale(LC_MESSAGES, locale.localename, &locale.alternates);
        wesnoth_setlocale(LC_COLLATE, locale.localename, &locale.alternates);
+       wesnoth_setlocale(LC_TIME, locale.localename, &locale.alternates);
 
        // fill string_table (should be moved somwhere else some day)
        try {


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

Reply via email to