summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-02-06 15:28:45 -0800
committerRichard Linden <none@none>2012-02-06 15:28:45 -0800
commit2ed1de224a45fafb12fea42e8dfb83f9728cdcf1 (patch)
treea78f96c5ada866ec93cbba72f2c7bf1daf7ade80 /indra/newview/llpanellogin.cpp
parent289d756ea86bd3898f41592146d8f549cd056846 (diff)
parente328dcf4062177c903d3099d0d16477824d23025 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 058d1ad6bc..76aadcd913 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -216,6 +216,7 @@ void LLPanelLogin::addUsersWithFavoritesToUsername()
void LLPanelLogin::addFavoritesToStartLocation()
{
+ // Clear the combo.
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
if (!combo) return;
int num_items = combo->getItemCount();
@@ -223,6 +224,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
{
combo->remove(i);
}
+
+ // Load favorites into the combo.
+ std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
+ std::string canonical_user_name = canonicalize_username(user_defined_name);
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
LLSD fav_llsd;
llifstream file;
@@ -232,15 +237,18 @@ void LLPanelLogin::addFavoritesToStartLocation()
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
iter != fav_llsd.endMap(); ++iter)
{
- std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
-
// The account name in stored_favorites.xml has Resident last name even if user has
// a single word account name, so it can be compared case-insensitive with the
// user defined "firstname lastname".
- S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first);
- if (res != 0) continue;
+ S32 res = LLStringUtil::compareInsensitive(canonical_user_name, iter->first);
+ if (res != 0)
+ {
+ lldebugs << "Skipping favorites for " << iter->first << llendl;
+ continue;
+ }
combo->addSeparator();
+ lldebugs << "Loading favorites for " << iter->first << llendl;
LLSD user_llsd = iter->second;
for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
iter1 != user_llsd.endArray(); ++iter1)