From 8b1000cbfb5d19004a7f3f5af163116d84ada61a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 22 Oct 2012 22:06:30 +0000 Subject: [PATCH] - don't save the transifex password to the ini (but still allow the user to enter the value manually in the ini) --- source/glest_game/graphics/renderer.cpp | 4 +++- source/glest_game/menu/menu_state_options.cpp | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 7e407286..73cdcfaa 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -2982,7 +2982,9 @@ void Renderer::renderLabel(GraphicLabel *label,const Vec4f *color) { string renderTextStr = lines[i]; if(label->getIsPassword() == true) { - renderTextStr = "*****"; + if(renderTextStr != "") { + renderTextStr = "*****"; + } } if(color != NULL) { diff --git a/source/glest_game/menu/menu_state_options.cpp b/source/glest_game/menu/menu_state_options.cpp index 0bd02061..09dfe9ab 100644 --- a/source/glest_game/menu/menu_state_options.cpp +++ b/source/glest_game/menu/menu_state_options.cpp @@ -648,7 +648,7 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu): labelTransifexPwd.setIsPassword(true); labelTransifexPwd.setMaxEditWidth(60); labelTransifexPwd.setMaxEditRenderWidth(120); - labelTransifexPwd.setText(config.getString("TranslationGetURLPassword","")); + labelTransifexPwd.setText(config.getString("TranslationGetURLPassword","")); labelTransifexI18NLabel.registerGraphicComponent(containerName,"labelTransifexI18NLabel"); labelTransifexI18NLabel.init(buttonStartPos + 360 ,buttonRowPos - 20); @@ -1122,15 +1122,14 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){ bool gotDownloads = false; string orig_txnURLUser = Config::getInstance().getString("TranslationGetURLUser"); - string orig_txnURLPwd = Config::getInstance().getString("TranslationGetURLPassword"); + //string orig_txnURLPwd = Config::getInstance().getString("TranslationGetURLPassword",""); string orig_txnURLLang = Config::getInstance().getString("TranslationGetURLLanguage"); Config::getInstance().setString("TranslationGetURLUser",labelTransifexUser.getText()); - Config::getInstance().setString("TranslationGetURLPassword",labelTransifexPwd.getText()); + Config::getInstance().setString("TranslationGetURLPassword",labelTransifexPwd.getText(),true); Config::getInstance().setString("TranslationGetURLLanguage",labelTransifexI18N.getText()); bool saveChanges = (orig_txnURLUser != labelTransifexUser.getText() || - orig_txnURLPwd != labelTransifexPwd.getText() || orig_txnURLLang != labelTransifexI18N.getText()); string txnURL = Config::getInstance().getString("TranslationGetURL");