mail[Wesnoth-commits] r20717 - in /trunk/src: game.cpp game_config.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on September 26, 2007 - 16:24:
Author: alink
Date: Wed Sep 26 16:23:50 2007
New Revision: 20717

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20717&view=rev
Log:
Fix bug #9021, Game Lobby Color Translation Error.
More generally, reload [game_config] when switching language, so any 
translatable string defined there is reloaded in the new language.
Also reset server list when reloading [game_config] because it builded up.

Modified:
    trunk/src/game.cpp
    trunk/src/game_config.cpp

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=20717&r1=20716&r2=20717&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Wed Sep 26 16:23:50 2007
@@ -1677,6 +1677,9 @@
                                read_game_cfg(defines_map_, game_config_, 
use_caching_);
                        } else {
                                game_config_.reset_translation();
+                               // we may have translatable strings in 
[game_config]
+                               // e.g. team color names are defined there
+                               
game_config::load_config(game_config_.child("game_config"));
                        }
 
                        const config* const units = 
game_config_.child("units");

Modified: trunk/src/game_config.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_config.cpp?rev=20717&r1=20716&r2=20717&view=diff
==============================================================================
--- trunk/src/game_config.cpp (original)
+++ trunk/src/game_config.cpp Wed Sep 26 16:23:50 2007
@@ -182,6 +182,7 @@
                        defense_color_scale.push_back(0x00FFFF00);
                }
 
+               server_list.clear();
                const std::vector<config *> &servers = 
v.get_children("server");
                std::vector<config *>::const_iterator server;
                for(server = servers.begin(); server != servers.end(); 
++server) {




Related Messages


Powered by MHonArc, Updated Wed Sep 26 16:40:51 2007