summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-07-22 19:01:52 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-07-22 19:01:52 +0000
commit0c0391cc7114bd2e9e4462c40e88814326f61bc2 (patch)
tree2906124fe8371b6336e6f7231cd890d267a75d6d /indra/newview/llimview.cpp
parented386ae547c225e352c39e8d14921572ee534b0b (diff)
QAR-758 1.20 Viewer RC 12, 13, 14, 15 -> Release
merge Branch_1-20-14-Viewer-merge -> release Includes Branch_1-20-Viewer-2 through 92456
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6f473dfba9..f1b3182cac 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -69,9 +69,6 @@
#include "llfirstuse.h"
-const EInstantMessage GROUP_DIALOG = IM_SESSION_GROUP_START;
-const EInstantMessage DEFAULT_DIALOG = IM_NOTHING_SPECIAL;
-
//
// Globals
//
@@ -158,11 +155,12 @@ LLFloaterIM::LLFloaterIM()
BOOL LLFloaterIM::postBuild()
{
+ // IM session initiation warnings
sOnlyUserMessage = getString("only_user_message");
sOfflineMessage = getUIString("offline_message");
+ sMutedMessage = getUIString("muted_message");
sInviteMessage = getUIString("invite_message");
- sMutedMessage = childGetText("muted_message");
if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() )
{
@@ -617,7 +615,12 @@ LLUUID LLIMMgr::addSession(
noteOfflineUsers(floater, ids);
LLFloaterChatterBox::showInstance(session_id);
- noteMutedUsers(floater, ids);
+
+ // Only warn for regular IMs - not group IMs
+ if( dialog == IM_NOTHING_SPECIAL )
+ {
+ noteMutedUsers(floater, ids);
+ }
LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater);
}
else
@@ -663,7 +666,12 @@ LLUUID LLIMMgr::addSession(
noteOfflineUsers(floater, ids);
LLFloaterChatterBox::showInstance(session_id);
- noteMutedUsers(floater, ids);
+
+ // Only warn for regular IMs - not group IMs
+ if( dialog == IM_NOTHING_SPECIAL )
+ {
+ noteMutedUsers(floater, ids);
+ }
}
else
{
@@ -1240,22 +1248,23 @@ void LLIMMgr::noteOfflineUsers(
void LLIMMgr::noteMutedUsers(LLFloaterIMPanel* floater,
const LLDynamicArray<LLUUID>& ids)
{
+ // Don't do this if we don't have a mute list.
+ LLMuteList *ml = LLMuteList::getInstance();
+ if( !ml )
+ {
+ return;
+ }
+
S32 count = ids.count();
if(count > 0)
{
- const LLRelationship* info = NULL;
- LLAvatarTracker& at = LLAvatarTracker::instance();
for(S32 i = 0; i < count; ++i)
{
- info = at.getBuddyInfo(ids.get(i));
- std::string first, last;
- if(info && LLMuteList::getInstance() && LLMuteList::getInstance()->isMuted(ids.get(i))
- && gCacheName->getName(ids.get(i), first, last))
+ if( ml->isMuted(ids.get(i)) )
{
LLUIString muted = sMutedMessage;
- muted.setArg("[FIRST]", first);
- muted.setArg("[LAST]", last);
floater->addHistoryLine(muted);
+ break;
}
}
}