diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-15 14:14:00 -0800 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-15 14:14:00 -0800 |
commit | ed9af1151fea725574ddedafd75a9ecfb5927082 (patch) | |
tree | 6fb865d740e84865b439d224043a5de7151765c8 /indra/newview/llimview.cpp | |
parent | 0dbf75ab657446b51e6e9795ddccc16bb9f6fd02 (diff) | |
parent | a9eb639511a09dc072e67e10d8885a0b4f7587da (diff) |
Merge with lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 914e7a3df0..cc48226052 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -131,6 +131,20 @@ void toast_callback(const LLSD& msg){ return; } + // *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( + msg["session_id"]); + if (!gSavedSettings.getBOOL("EnableGroupChatPopups") + && session->isGroupSessionType()) + { + return; + } + if (!gSavedSettings.getBOOL("EnableIMChatPopups") + && !session->isGroupSessionType()) + { + return; + } + // Skip toasting if we have open window of IM with this session id LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); if (open_im_floater && open_im_floater->getVisible()) @@ -257,21 +271,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) @@ -527,16 +537,7 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline() void LLIMModel::LLIMSession::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name) { - if (av_name.mLegacyFirstName.empty()) - { - // if mLegacyFirstName is empty it means display names is off and the - // data came from the gCacheName, mDisplayName will be the legacy name - mHistoryFileName = LLCacheName::cleanFullName(av_name.mDisplayName); - } - else - { - mHistoryFileName = LLCacheName::cleanFullName(av_name.getLegacyName()); - } + mHistoryFileName = av_name.mUsername; } void LLIMModel::LLIMSession::buildHistoryFileName() |