summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-09-25 09:20:01 -0700
committerGraham Linden <none@none>2014-09-25 09:20:01 -0700
commit9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch)
tree742fb8127dc84052265647ed110e8a6446253103 /indra/newview/llpanellogin.cpp
parent6004ad167458914c3b85438b96e81ea8796e368b (diff)
parent499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff)
Merge viewer-release 3.7.17
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rwxr-xr-xindra/newview/llpanellogin.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 088eaa8e0d..abdfa89f50 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -225,11 +225,16 @@ void LLPanelLogin::addUsersWithFavoritesToUsername()
{
LLComboBox* combo = getChild<LLComboBox>("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)
@@ -251,11 +256,17 @@ void LLPanelLogin::addFavoritesToStartLocation()
// Load favorites into the combo.
std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
+ std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' ');
+ 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)
@@ -954,11 +965,12 @@ void LLPanelLogin::onSelectServer()
// The user twiddled with the grid choice ui.
// apply the selection to the grid setting.
LLPointer<LLCredential> credential;
-
+
LLComboBox* server_combo = getChild<LLComboBox>("server_combo");
LLSD server_combo_val = server_combo->getSelectedValue();
LL_INFOS("AppInit") << "grid "<<server_combo_val.asString()<< LL_ENDL;
LLGridManager::getInstance()->setGridChoice(server_combo_val.asString());
+ addFavoritesToStartLocation();
/*
* Determine whether or not the value in the start_location_combo makes sense