Changeset - r16602:e5643090f513
[Not reviewed]
master
0 1 0
terkhen - 14 years ago 2010-11-27 22:43:58
terkhen@openttd.org
(svn r21342) -Add: Sort some lists again after a language change.
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -32,12 +32,13 @@
 
#include "engine_base.h"
 
#include "language.h"
 
#include "townname_func.h"
 
#include "string_func.h"
 
#include "company_base.h"
 
#include "smallmap_gui.h"
 
#include "window_func.h"
 
#include "debug.h"
 

	
 
#include "table/strings.h"
 
#include "table/control_codes.h"
 

	
 
char _config_language_file[MAX_PATH];             ///< The file (name) stored in the configuration.
 
@@ -1388,16 +1389,25 @@ bool ReadLanguagePack(const LanguageMeta
 
	_current_language = lang;
 
	_current_text_dir = (TextDirection)_current_language->text_dir;
 
	const char *c_file = strrchr(_current_language->file, PATHSEPCHAR) + 1;
 
	strecpy(_config_language_file, c_file, lastof(_config_language_file));
 
	SetCurrentGrfLangID(_current_language->newgrflangid);
 

	
 
	/* Some lists need to be sorted again after a language change. */
 
	InitializeSortedCargoSpecs();
 
	SortIndustryTypes();
 
	BuildIndustriesLegend();
 
	SortNetworkLanguages();
 
	InvalidateWindowClassesData(WC_BUILD_VEHICLE);      // Build vehicle window.
 
	InvalidateWindowClassesData(WC_TRAINS_LIST);        // Train group window.
 
	InvalidateWindowClassesData(WC_ROADVEH_LIST);       // Road vehicle group window.
 
	InvalidateWindowClassesData(WC_SHIPS_LIST);         // Ship group window.
 
	InvalidateWindowClassesData(WC_AIRCRAFT_LIST);      // Aircraft group window.
 
	InvalidateWindowClassesData(WC_INDUSTRY_DIRECTORY); // Industry directory window.
 
	InvalidateWindowClassesData(WC_STATION_LIST);       // Station list window.
 

	
 
	return true;
 
}
 

	
 
/* Win32 implementation in win32.cpp.
 
 * OS X implementation in os/macosx/macos.mm. */
 
#if !(defined(WIN32) || defined(__APPLE__))
0 comments (0 inline, 0 general)