diff options
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 1d75374930..298e221460 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" @@ -62,6 +62,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) @@ -73,7 +74,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; @@ -128,11 +129,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"; @@ -187,6 +187,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) { @@ -218,6 +226,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) { @@ -621,9 +636,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; } |