summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llavatarlist.cpp14
-rw-r--r--indra/newview/llfloateravatartextures.cpp9
-rw-r--r--indra/newview/llfloaterbuyland.cpp2
-rw-r--r--indra/newview/llfloaterinspect.cpp10
-rw-r--r--indra/newview/llfloaterpay.cpp2
-rw-r--r--indra/newview/llfriendcard.cpp10
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp17
-rw-r--r--indra/newview/llpanelme.cpp7
-rw-r--r--indra/newview/llpanelplaceinfo.cpp9
-rw-r--r--indra/newview/llpanelplaceinfo.h4
-rw-r--r--indra/newview/llpanelplaceprofile.cpp20
11 files changed, 51 insertions, 53 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 57624dec8b..c35e71cc71 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -260,6 +260,8 @@ void LLAvatarList::refresh()
}
else
{
+ // *NOTE: If you change the UI to show a different string,
+ // be sure to change the filter code below.
addNewItem(buddy_id,
av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName,
LLAvatarTracker::instance().isBuddyOnline(buddy_id));
@@ -284,10 +286,10 @@ void LLAvatarList::refresh()
for (std::vector<LLSD>::const_iterator it=cur_values.begin(); it != cur_values.end(); it++)
{
- std::string name;
const LLUUID& buddy_id = it->asUUID();
- have_names &= (bool)gCacheName->getFullName(buddy_id, name);
- if (!findInsensitive(name, mNameFilter))
+ LLAvatarName av_name;
+ have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
+ if (!findInsensitive(av_name.mDisplayName, mNameFilter))
{
removeItemByUUID(buddy_id);
modified = true;
@@ -339,14 +341,14 @@ bool LLAvatarList::filterHasMatches()
for (uuid_vec_t::const_iterator it=values.begin(); it != values.end(); it++)
{
- std::string name;
const LLUUID& buddy_id = *it;
- BOOL have_name = gCacheName->getFullName(buddy_id, name);
+ LLAvatarName av_name;
+ bool have_name = LLAvatarNameCache::get(buddy_id, &av_name);
// If name has not been loaded yet we consider it as a match.
// When the name will be loaded the filter will be applied again(in refresh()).
- if (have_name && !findInsensitive(name, mNameFilter))
+ if (have_name && !findInsensitive(av_name.mDisplayName, mNameFilter))
{
continue;
}
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index fd392d949a..290a343075 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -33,6 +33,9 @@
#include "llviewerprecompiledheaders.h"
#include "llfloateravatartextures.h"
+// library headers
+#include "llavatarnamecache.h"
+
#include "llagent.h"
#include "llagentwearables.h"
#include "lltexturectrl.h"
@@ -138,10 +141,10 @@ void LLFloaterAvatarTextures::refresh()
LLVOAvatar *avatarp = find_avatar(mID);
if (avatarp)
{
- std::string fullname;
- if (gCacheName->getFullName(avatarp->getID(), fullname))
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(avatarp->getID(), &av_name))
{
- setTitle(mTitle + ": " + fullname);
+ setTitle(mTitle + ": " + av_name.getCompleteName());
}
for (U32 i=0; i < TEX_NUM_INDICES; i++)
{
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 419253d938..292c88441a 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -823,7 +823,7 @@ void LLFloaterBuyLandUI::updateNames()
}
else if (parcelp->getIsGroupOwned())
{
- gCacheName->get(parcelp->getGroupID(), true,
+ gCacheName->getGroup(parcelp->getGroupID(),
boost::bind(&LLFloaterBuyLandUI::updateGroupName, this,
_1, _2, _3));
}
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 13ca7638c5..f22ab70678 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -37,7 +37,7 @@
#include "llfloaterreg.h"
#include "llfloatertools.h"
#include "llavataractions.h"
-#include "llcachename.h"
+#include "llavatarnamecache.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llselectmgr.h"
@@ -212,8 +212,12 @@ void LLFloaterInspect::refresh()
substitution["datetime"] = (S32) timestamp;
LLStringUtil::format (timeStr, substitution);
- gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
- gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(obj->mPermissions->getOwner(), &av_name);
+ owner_name = av_name.getCompleteName();
+ LLAvatarNameCache::get(obj->mPermissions->getCreator(), &av_name);
+ creator_name = av_name.getCompleteName();
+
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
row["columns"][0]["type"] = "text";
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index 7b596e9ba3..6b811b5886 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -424,8 +424,6 @@ void LLFloaterPay::payDirectly(money_callback callback,
void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group)
{
- // IDEVO
- //gCacheName->get(target_id, is_group, boost::bind(&LLFloaterPay::onCacheOwnerName, this, _1, _2, _3, _4));
std::string slurl;
if (is_group)
{
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 7f28e09933..0a1b0b5df0 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -32,13 +32,14 @@
#include "llviewerprecompiledheaders.h"
+#include "llfriendcard.h"
+
+#include "llavatarnamecache.h"
#include "llinventory.h"
#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
#include "lltrans.h"
-#include "llfriendcard.h"
-
#include "llcallingcard.h" // for LLAvatarTracker
#include "llviewerinventory.h"
#include "llinventorymodel.h"
@@ -536,8 +537,9 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
{
bool shouldBeAdded = true;
- std::string name;
- gCacheName->getFullName(avatarID, name);
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(avatarID, &av_name);
+ const std::string& name = av_name.mUsername;
lldebugs << "Processing buddy name: " << name
<< ", id: " << avatarID
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 4c2ff471e8..f6c70c82da 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -236,11 +236,6 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem)
LLUUID creator_id = pItem->getCreatorUUID();
std::string name =
LLSLURL("agent", creator_id, "inspect").getSLURLString();
- //if (!gCacheName->getFullName(creator_id, name))
- //{
- // gCacheName->get(creator_id, FALSE,
- // boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mCreator, _2, _3));
- //}
mCreator->setText(name);
}
else
@@ -257,23 +252,11 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem)
if (perm.isGroupOwned())
{
LLUUID group_id = perm.getGroup();
- // IDEVO
- //if (!gCacheName->getGroupName(group_id, name))
- //{
- // gCacheName->get(group_id, TRUE,
- // boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mOwner, _2, _3));
- //}
name = LLSLURL("group", group_id, "inspect").getSLURLString();
}
else
{
LLUUID owner_id = perm.getOwner();
- // IDEVO
- //if (!gCacheName->getFullName(owner_id, name))
- //{
- // gCacheName->get(owner_id, FALSE,
- // boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mOwner, _2, _3));
- //}
name = LLSLURL("agent", owner_id, "inspect").getSLURLString();
}
mOwner->setText(name);
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index eb2d57af52..d1ce59d436 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -228,13 +228,6 @@ void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_d
childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
- // IDEVO - These fields do not seem to exist any more.
- //std::string full_name;
- //BOOL found = gCacheName->getFullName(avatar_data->avatar_id, full_name);
- //if (found)
- //{
- // childSetTextArg("name_text", "[NAME]", full_name);
- //}
LLAvatarNameCache::get(avatar_data->avatar_id,
boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
}
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 4c3d6e2758..3b0dcad679 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -34,6 +34,7 @@
#include "llpanelplaceinfo.h"
+#include "llavatarname.h"
#include "llsdutil.h"
#include "llsdutil_math.h"
@@ -285,3 +286,11 @@ void LLPanelPlaceInfo::onNameCache(LLTextBox* text, const std::string& full_name
{
text->setText(full_name);
}
+
+// static
+void LLPanelPlaceInfo::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name,
+ LLTextBox* text)
+{
+ text->setText( av_name.getCompleteName() );
+}
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index 0d7a09b5de..0c08c5059b 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -40,6 +40,7 @@
#include "llremoteparcelrequest.h"
+class LLAvatarName;
class LLExpandableTextBox;
class LLIconCtrl;
class LLInventoryItem;
@@ -103,6 +104,9 @@ public:
protected:
static void onNameCache(LLTextBox* text, const std::string& full_name);
+ static void onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name,
+ LLTextBox* text);
/**
* mParcelID is valid only for remote places, in other cases it's null. See resetLocation()
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 23171d5ff2..2a8249f4b6 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -34,6 +34,7 @@
#include "llpanelplaceprofile.h"
+#include "llavatarnamecache.h"
#include "llparcel.h"
#include "message.h"
@@ -428,10 +429,10 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
if(!parcel->getGroupID().isNull())
{
// FIXME: Using parcel group as region group.
- gCacheName->get(parcel->getGroupID(), true,
+ gCacheName->getGroup(parcel->getGroupID(),
boost::bind(&LLPanelPlaceInfo::onNameCache, mRegionGroupText, _2));
- gCacheName->get(parcel->getGroupID(), true,
+ gCacheName->getGroup(parcel->getGroupID(),
boost::bind(&LLPanelPlaceInfo::onNameCache, mParcelOwner, _2));
}
else
@@ -444,14 +445,12 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
else
{
// Figure out the owner's name
- // IDEVO
- //gCacheName->get(parcel->getOwnerID(), FALSE,
- // boost::bind(&LLPanelPlaceInfo::nameUpdatedCallback, mParcelOwner, _2, _3));
std::string parcel_owner =
LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString();
mParcelOwner->setText(parcel_owner);
- gCacheName->get(region->getOwner(), false,
- boost::bind(&LLPanelPlaceInfo::onNameCache, mRegionOwnerText, _2));
+ LLAvatarNameCache::get(region->getOwner(),
+ boost::bind(&LLPanelPlaceInfo::onAvatarNameCache,
+ _1, _2, mRegionOwnerText));
}
if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus())
@@ -473,9 +472,10 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
if(auth_buyer_id.notNull())
{
- gCacheName->get(auth_buyer_id, true,
- boost::bind(&LLPanelPlaceInfo::onNameCache, mSaleToText, _2));
-
+ LLAvatarNameCache::get(auth_buyer_id,
+ boost::bind(&LLPanelPlaceInfo::onAvatarNameCache,
+ _1, _2, mSaleToText));
+
// Show sales info to a specific person or a group he belongs to.
if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id))
{