changeset 2023:542b726ef834

Bugfix: changing language now also properly affects character list
author thegusty999
date Tue, 01 Nov 2011 08:57:24 +0000
parents 25255b395baf
children 1796bb2eb291
files src/gui/mainmenu.cpp
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui/mainmenu.cpp	Tue Nov 01 08:31:32 2011 +0000
+++ b/src/gui/mainmenu.cpp	Tue Nov 01 08:57:24 2011 +0000
@@ -121,10 +121,10 @@
 
 void MainMenu::updateTranslation()
 {
-    //updating translations for the Menu
     CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
 	CEGUI::FrameWindow* lbl;
 
+	// Update the button labels.
 	lbl = static_cast<CEGUI::FrameWindow*>(win_mgr.getWindow("SinglePlayerButton/Label"));
 	lbl->setText((CEGUI::utf8*) gettext("Single player"));
 
@@ -143,7 +143,18 @@
 	lbl = static_cast<CEGUI::FrameWindow*>(win_mgr.getWindow("EndGameButton/Label"));
 	lbl->setText((CEGUI::utf8*) gettext("Quit"));
 
+	// Update message windows
+	lbl = static_cast<CEGUI::FrameWindow*>(win_mgr.getWindow("DeleteCharLabel")); // note: this has no in-between slash!
+	if (lbl) lbl->setText (gettext ("Really delete savegame?"));
 
+	// Propagation onto sub-windows
+	if (m_saveGameList != 0)
+	{
+		m_saveGameList->updateTranslation ();
+
+		// The save game list doesn't forward all item changes, so also call the full update.
+		m_saveGameList->update ();
+	}
 }
 
 bool MainMenu::onStartSinglePlayer(const CEGUI::EventArgs& evt)