summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-28 15:45:23 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-28 15:45:23 -0700
commit26b601b99e43eac623c81a60e93094577b06d209 (patch)
treeb4fb79f99810c356f35c9fd809fb1397c2ae7e24 /indra
parent66fe983cb22a7916d46e2df087ce3aade345cdc8 (diff)
Getting rid of some more old gCacheName calls
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavataractions.cpp37
-rw-r--r--indra/newview/llinspectavatar.cpp2
2 files changed, 17 insertions, 22 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 89711de6f0..6699449625 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -92,6 +92,11 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
LLRecentPeople::instance().add(id);
}
+void on_avatar_name_friendship(const LLUUID& id, const LLAvatarName av_name)
+{
+ LLAvatarActions::requestFriendshipDialog(id, av_name.getCompleteName());
+}
+
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id)
{
@@ -100,9 +105,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id)
return;
}
- std::string full_name;
- gCacheName->getFullName(id, full_name);
- requestFriendshipDialog(id, full_name);
+ LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_friendship, _1, _2));
}
// static
@@ -127,10 +130,10 @@ void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids)
if(ids.size() == 1)
{
LLUUID agent_id = ids[0];
- std::string full_name;
- if(gCacheName->getFullName(agent_id, full_name))
+ LLAvatarName av_name;
+ if(LLAvatarNameCache::get(agent_id, &av_name))
{
- args["NAME"] = full_name;
+ args["NAME"] = av_name.mDisplayName;
}
msgType = "RemoveFromFriends";
@@ -158,14 +161,6 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee)
if (invitee.isNull())
return;
- //waiting until Name Cache gets updated with corresponding avatar name
- std::string just_to_request_name;
- if (!gCacheName->getFullName(invitee, just_to_request_name))
- {
- gCacheName->get(invitee, FALSE, boost::bind((void (*)(const LLUUID&)) &LLAvatarActions::offerTeleport, invitee));
- return;
- }
-
LLDynamicArray<LLUUID> ids;
ids.push_back(invitee);
offerTeleport(ids);
@@ -331,14 +326,14 @@ void LLAvatarActions::showProfile(const LLUUID& id)
// static
void LLAvatarActions::showOnMap(const LLUUID& id)
{
- std::string name;
- if (!gCacheName->getFullName(id, name))
+ LLAvatarName av_name;
+ if (!LLAvatarNameCache::get(id, &av_name))
{
- gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::showOnMap, id));
+ LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::showOnMap, id));
return;
}
- gFloaterWorldMap->trackAvatar(id, name);
+ gFloaterWorldMap->trackAvatar(id, av_name.mDisplayName);
LLFloaterReg::showInstance("world_map");
}
@@ -535,7 +530,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
{
std::string name;
- gCacheName->getFullName(id, name);
+ gCacheName->getFullName(id, name); // needed for mute
LLMute mute(id, name, LLMute::AGENT);
if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
@@ -739,7 +734,7 @@ bool LLAvatarActions::isFriend(const LLUUID& id)
bool LLAvatarActions::isBlocked(const LLUUID& id)
{
std::string name;
- gCacheName->getFullName(id, name);
+ gCacheName->getFullName(id, name); // needed for mute
return LLMuteList::getInstance()->isMuted(id, name);
}
@@ -747,7 +742,7 @@ bool LLAvatarActions::isBlocked(const LLUUID& id)
bool LLAvatarActions::canBlock(const LLUUID& id)
{
std::string full_name;
- gCacheName->getFullName(id, full_name);
+ gCacheName->getFullName(id, full_name); // needed for mute
bool is_linden = (full_name.find("Linden") != std::string::npos);
bool is_self = id == gAgentID;
return !is_self && !is_linden;
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index a9b9557027..1cd1dcc7f0 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -733,7 +733,7 @@ void LLInspectAvatar::onClickZoomIn()
void LLInspectAvatar::onClickFindOnMap()
{
- gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.getLegacyName());
+ gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.mDisplayName);
LLFloaterReg::showInstance("world_map");
}