summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-10-29 08:47:59 -0700
committerDessie Linden <dessie@lindenlab.com>2010-10-29 08:47:59 -0700
commit8297c278ac23917ee543419a492c3629dcfb7527 (patch)
tree606a4df598c4da4a20df2e72c8cf5817a0745e4e /indra/newview
parent1c60e03299f233d08af6ac5e4f67ce53a5245313 (diff)
parenta965b7f74bfdb4c31591b99e10c4536b5e754dd7 (diff)
Merged in 2.3.0-beta1 tag
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimview.cpp20
-rw-r--r--indra/newview/llimview.h2
2 files changed, 10 insertions, 12 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 349ef8185f..02a693b9a0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -257,21 +257,17 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
// history files have consistent (English) names in different locales.
if (isAdHocSessionType() && IM_SESSION_INVITE == type)
{
- // Name here has a form of "<Avatar's name> Conference"
- // Lets update it to localize the "Conference" word. See EXT-8429.
- S32 separator_index = mName.rfind(" ");
- std::string name = mName.substr(0, separator_index);
- ++separator_index;
- std::string conference_word = mName.substr(separator_index, mName.length());
+ LLAvatarNameCache::get(mOtherParticipantID,
+ boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,
+ this, _2));
+ }
+}
- // additional check that session name is what we expected
- if ("Conference" == conference_word)
- {
+void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name)
+{
LLStringUtil::format_map_t args;
- args["[AGENT_NAME]"] = name;
+ args["[AGENT_NAME]"] = av_name.getCompleteName();
LLTrans::findString(mName, "conference-title-incoming", args);
- }
- }
}
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 3da4465862..650d329e18 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -100,6 +100,8 @@ public:
void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name);
+ void onAdHocNameCache(const LLAvatarName& av_name);
+
//*TODO make private
static std::string generateHash(const std::set<LLUUID>& sorted_uuids);