WIP Fix miscellaneous display names in UI
parent
7037e8ee9f
commit
3bbb622731
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue