diff options
author | James Cook <james@lindenlab.com> | 2010-03-08 10:54:23 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-03-08 10:54:23 -0800 |
commit | 18ebacefcfb5909a58a213a97c6a687afe9b877e (patch) | |
tree | 5b48ebad64a253bd9aa50371c2308389cbec64bf /indra/newview/llavataractions.cpp | |
parent | 34d1d34ca100fd137c2a85f0e0f330730fb70aba (diff) | |
parent | 42606dbbb5f452211e4fc30ee0ed41334fc14e8d (diff) |
Merge with viewer 2 beta 4
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index e6666c7f83..f947300f54 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -35,11 +35,11 @@ #include "llavataractions.h" +#include "llavatarnamecache.h" // IDEVO #include "llsd.h" #include "lldarray.h" #include "llnotifications.h" #include "llnotificationsutil.h" - #include "roles_constants.h" // for GP_MEMBER_INVITE #include "llagent.h" @@ -63,6 +63,7 @@ #include "llimfloater.h" #include "lltrans.h" #include "llcallingcard.h" +#include "llslurl.h" // IDEVO // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -74,7 +75,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin } LLSD args; - args["NAME"] = name; + args["NAME"] = LLSLURL::buildCommand("agent", id, "inspect"); LLSD payload; payload["id"] = id; payload["name"] = name; @@ -129,11 +130,10 @@ void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids) if(ids.size() == 1) { LLUUID agent_id = ids[0]; - std::string first, last; - if(gCacheName->getName(agent_id, first, last)) + std::string full_name; + if(gCacheName->getFullName(agent_id, full_name)) { - args["FIRST_NAME"] = first; - args["LAST_NAME"] = last; + args["NAME"] = full_name; } msgType = "RemoveFromFriends"; @@ -188,6 +188,14 @@ void LLAvatarActions::startIM(const LLUUID& id) return; } + // IDEVO + LLAvatarName av_name; + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(id, &av_name)) + { + name = av_name.mDisplayName + " (" + av_name.mSLID + ")"; + } + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); if (session_id != LLUUID::null) { @@ -219,6 +227,13 @@ void LLAvatarActions::startCall(const LLUUID& id) std::string name; gCacheName->getFullName(id, name); + // IDEVO + LLAvatarName av_name; + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(id, &av_name)) + { + name = av_name.mDisplayName + " (" + av_name.mSLID + ")"; + } LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id, true); if (session_id != LLUUID::null) { @@ -636,9 +651,9 @@ bool LLAvatarActions::isBlocked(const LLUUID& id) // static bool LLAvatarActions::canBlock(const LLUUID& id) { - std::string firstname, lastname; - gCacheName->getName(id, firstname, lastname); - bool is_linden = !LLStringUtil::compareStrings(lastname, "Linden"); + std::string full_name; + gCacheName->getFullName(id, full_name); + bool is_linden = (full_name.find("Linden") != std::string::npos); bool is_self = id == gAgentID; return !is_self && !is_linden; } |