diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 19:18:15 -0800 |
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 19:18:15 -0800 |
| commit | a2efe4bb4154b7ecb9c7cb279f7a28d7d401a93a (patch) | |
| tree | 4cafd0e64a9c45b444664d12f022cd3e675bfebd /indra/newview/llcallingcard.cpp | |
| parent | 5352954eb65076d877cc74d4328620e910b93d1c (diff) | |
| parent | 1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (diff) | |
automated merge
Diffstat (limited to 'indra/newview/llcallingcard.cpp')
| -rw-r--r-- | indra/newview/llcallingcard.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index d988770f90..9371ae2676 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -56,12 +56,14 @@ #include "llnotifications.h" #include "llnotificationsutil.h" #include "llresmgr.h" +#include "llslurl.h" #include "llimview.h" #include "llviewercontrol.h" #include "llviewernetwork.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvoavatar.h" +#include "llavataractions.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -689,13 +691,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) setBuddyOnline(agent_id,online); if(chat_notify) { - std::string first, last; - if(gCacheName->getName(agent_id, first, last)) - { - notify = TRUE; - args["FIRST"] = first; - args["LAST"] = last; - } + notify = TRUE; + args["NAME_SLURL"] = LLSLURL("agent", agent_id, "about").getSLURLString(); } } else @@ -715,7 +712,21 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) if(notify) { // Popup a notify box with online status of this agent - LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args); + LLNotificationPtr notification; + + if (online) + { + notification = + LLNotificationsUtil::add("FriendOnline", + args, + LLSD().with("respond_on_mousedown", TRUE), + boost::bind(&LLAvatarActions::startIM, agent_id)); + } + else + { + notification = + LLNotificationsUtil::add("FriendOffline", args); + } // If there's an open IM session with this agent, send a notification there too. LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); |
