From 4cf5d945d4e892c1c5383e49910759c24ecbf591 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 14 Apr 2014 11:13:22 +0300 Subject: MAINT-3564 FIXED Replace dot before comparing user name. --- indra/newview/llpanellogin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 911ecaad9d..d6183c5ab3 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -262,6 +262,7 @@ void LLPanelLogin::addFavoritesToStartLocation() // Load favorites into the combo. std::string user_defined_name = getChild("username_combo")->getSimple(); + std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' '); std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); LLSD fav_llsd; llifstream file; -- cgit v1.2.3 From b17199f283bcb3278c1238b9ccec96a1723db442 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 10 Jul 2014 11:22:18 +0300 Subject: MAINT-2855 FIXED Use separate xml files (saved as stored_favorites_.xml) for each grid. --- indra/newview/llpanellogin.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 5869855918..abdfa89f50 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -225,11 +225,16 @@ void LLPanelLogin::addUsersWithFavoritesToUsername() { LLComboBox* combo = getChild("username_combo"); if (!combo) return; - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); + std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); LLSD fav_llsd; llifstream file; file.open(filename); - if (!file.is_open()) return; + if (!file.is_open()) + { + file.open(old_filename); + if (!file.is_open()) return; + } LLSDSerialize::fromXML(fav_llsd, file); for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) @@ -252,11 +257,16 @@ void LLPanelLogin::addFavoritesToStartLocation() // Load favorites into the combo. std::string user_defined_name = getChild("username_combo")->getSimple(); std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' '); - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); + std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); LLSD fav_llsd; llifstream file; file.open(filename); - if (!file.is_open()) return; + if (!file.is_open()) + { + file.open(old_filename); + if (!file.is_open()) return; + } LLSDSerialize::fromXML(fav_llsd, file); for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) @@ -955,11 +965,12 @@ void LLPanelLogin::onSelectServer() // The user twiddled with the grid choice ui. // apply the selection to the grid setting. LLPointer credential; - + LLComboBox* server_combo = getChild("server_combo"); LLSD server_combo_val = server_combo->getSelectedValue(); LL_INFOS("AppInit") << "grid "<setGridChoice(server_combo_val.asString()); + addFavoritesToStartLocation(); /* * Determine whether or not the value in the start_location_combo makes sense -- cgit v1.2.3