summaryrefslogtreecommitdiff
path: root/indra/newview/llmutelist.cpp
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
committerAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
commit9dfe0ca9a0228c4fa75c8a3e51840696cc6b4960 (patch)
tree3136e0a32cdcb1d55a4c3a5a67791ca128d947a5 /indra/newview/llmutelist.cpp
parent93cf3d89e51835dd2f61c32b16191ab724528055 (diff)
svn merge -r121194:121210
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.onetwo-merge-1 QAR-1531 viewer 1.23rc1+1.23rc2 merge to trunk
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r--indra/newview/llmutelist.cpp36
1 files changed, 21 insertions, 15 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 841330483c..40b1c64146 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -67,7 +67,6 @@
#include "llfloaterchat.h"
#include "llimpanel.h"
#include "llimview.h"
-#include "lltrans.h"
#include "llnotifications.h"
#include "lluistring.h"
#include "llviewerobject.h"
@@ -507,35 +506,42 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n
U32 temp_data = (U32) (uintptr_t) user_data;
LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data;
- std::string auto_message;
+ std::string notif_name;
switch (reason)
{
default:
case LLMuteList::AR_IM:
- auto_message = LLTrans::getString("AutoUnmuteByIM");
+ notif_name = "AutoUnmuteByIM";
break;
case LLMuteList::AR_INVENTORY:
- auto_message = LLTrans::getString("AutoUnmuteByInventory");
+ notif_name = "AutoUnmuteByInventory";
break;
case LLMuteList::AR_MONEY:
- auto_message = LLTrans::getString("AutoUnmuteByMoney");
+ notif_name = "AutoUnmuteByMoney";
break;
}
- std::string message = LLNotification::format(auto_message,
- LLSD().insert("FIRST", first_name).insert("LAST", last_name));
-
- if (reason == LLMuteList::AR_IM)
+ LLSD args;
+ args["FIRST"] = first_name;
+ args["LAST"] = last_name;
+
+ LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args);
+ if (notif_ptr)
{
- LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
- if (timp)
+ std::string message = notif_ptr->getMessage();
+
+ if (reason == LLMuteList::AR_IM)
{
- timp->addHistoryLine(message);
+ LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
+ if (timp)
+ {
+ timp->addHistoryLine(message);
+ }
}
- }
- LLChat auto_chat(message);
- LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
+ LLChat auto_chat(message);
+ LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
+ }
}