summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-28 15:15:33 -0700
committerJames Cook <james@lindenlab.com>2010-05-28 15:15:33 -0700
commitae91c0e7c6685932ee7789925662df139586cf3e (patch)
tree933330a4dd96f2024234652800638e18c5c5fe23 /indra/newview/llimview.cpp
parent3e7f5e571ec223a67cb30ed8ce5cd09c130c3e72 (diff)
DEV-50202 IM toast notification shows SLID and flashing info icon
Fixed to use Display Name (Username), fixed icon placement, also fixed notifications system well names. Reviewed with Leyla.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index e6db942bad..136ccbca49 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -109,6 +109,20 @@ BOOL LLSessionTimeoutTimer::tick()
return TRUE;
}
+static void on_avatar_name_cache_toast(const LLUUID& agent_id,
+ const LLAvatarName& av_name,
+ LLSD msg)
+{
+ LLSD args;
+ args["MESSAGE"] = msg["message"];
+ args["TIME"] = msg["time"];
+ // *TODO: Can this ever be an object name or group name?
+ args["FROM"] = av_name.getCompleteName();
+ args["FROM_ID"] = msg["from_id"];
+ args["SESSION_ID"] = msg["session_id"];
+ LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
+}
+
void toast_callback(const LLSD& msg){
// do not show toast in busy mode or it goes from agent
if (gAgent.getBusy() || gAgent.getID() == msg["from_id"])
@@ -136,14 +150,9 @@ void toast_callback(const LLSD& msg){
return;
}
- LLSD args;
- args["MESSAGE"] = msg["message"];
- args["TIME"] = msg["time"];
- args["FROM"] = msg["from"];
- args["FROM_ID"] = msg["from_id"];
- args["SESSION_ID"] = msg["session_id"];
-
- LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
+ LLAvatarNameCache::get(msg["from_id"].asUUID(),
+ boost::bind(&on_avatar_name_cache_toast,
+ _1, _2, msg));
}
void LLIMModel::setActiveSessionID(const LLUUID& session_id)