From 0d619bcdc1fbb7869a6376749b0bd46b1d40c91e Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 8 Oct 2012 18:20:37 -0700 Subject: CHUI-147 : Sort the residents names when getting a resident string list --- indra/newview/llavataractions.cpp | 8 ++++---- indra/newview/llavataractions.h | 2 +- indra/newview/llconversationmodel.cpp | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 50697d1885..3326103d03 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -697,15 +697,15 @@ namespace action_give_inventory } // static -void LLAvatarActions::buildResidentsString(const std::vector avatar_names, std::string& residents_string) +void LLAvatarActions::buildResidentsString(std::vector avatar_names, std::string& residents_string) { llassert(avatar_names.size() > 0); - + + std::sort(avatar_names.begin(), avatar_names.end()); const std::string& separator = LLTrans::getString("words_separator"); for (std::vector::const_iterator it = avatar_names.begin(); ; ) { - LLAvatarName av_name = *it; - residents_string.append(av_name.mDisplayName); + residents_string.append((*it).mDisplayName); if (++it == avatar_names.end()) { break; diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index e7cef587c2..6e1198cd09 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -216,7 +216,7 @@ public: * @param avatar_names - a vector of given avatar names from which resulting string is built * @param residents_string - the resulting string */ - static void buildResidentsString(const std::vector avatar_names, std::string& residents_string); + static void buildResidentsString(std::vector avatar_names, std::string& residents_string); /** * Builds a string of residents' display names separated by "words_separator" string. diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 15824704fd..29e7ac4e12 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -159,7 +159,6 @@ void LLConversationItemSession::updateParticipantName(LLConversationItemParticip return; } // Build a string containing the participants names and check if ready for display (we don't want "(waiting)" in there) - // *TODO: Further factor out common code with LLIMFloater::onParticipantsListChanged() bool all_names_resolved = true; uuid_vec_t temp_uuids; // uuids vector for building the added participants' names string child_list_t::iterator iter = mChildren.begin(); @@ -170,6 +169,9 @@ void LLConversationItemSession::updateParticipantName(LLConversationItemParticip LLAvatarName av_name; if (!LLAvatarNameCache::get(current_participant->getUUID(), &av_name)) { + // If the name is not in the cache yet, bail out + // Note: we don't bind ourselves to the LLAvatarNameCache event as we are called by + // onAvatarNameCache() which is itself attached to the same event. all_names_resolved = false; break; } -- cgit v1.2.3 From 1db55ab6da9f6fcc9f51d4c09ed5fa2b88afd7c4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 9 Oct 2012 12:07:35 -0700 Subject: CHUI-393 : Suppress the sort participants by distance from you menu item. Kept the code around. --- indra/newview/skins/default/xui/en/menu_participant_view.xml | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 0043c14479..6fa0707eea 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -59,17 +59,6 @@ function="IMFloaterContainer.Check" parameter="sort_participants_by_recent" /> - - - -