All places just av/group names were being used are now name ui

Since NameBoxes are clickable, remove redundant profile buttons.
Removes a ton of RLV logic, now centralized inside LLNameUI
Removes excess functions that went largely unused

May no longer show if parcel sale is pending under the owner field,
this is weird and it's hard to keep this behavior

Also includes the missing setValue and getValue so this compiles,
that should've been committed way earlier, oops

Also adds ability for name_box to have is_group attribute, too!
This commit is contained in:
Liru Færs
2019-10-09 23:57:01 -04:00
parent d54bf78c08
commit d277f1750d
31 changed files with 151 additions and 498 deletions

View File

@@ -141,7 +141,6 @@ LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name,
LLPanelAvatarSecondLife::~LLPanelAvatarSecondLife()
{
mCacheConnection.disconnect();
LLMuteList::instance().removeObserver(this);
}
@@ -149,12 +148,6 @@ void LLPanelAvatarSecondLife::refresh()
{
}
void LLPanelAvatarSecondLife::updatePartnerName(const LLAvatarName& name)
{
mCacheConnection.disconnect();
childSetTextArg("partner_edit", "[NAME]", name.getNSName());
}
//-----------------------------------------------------------------------------
// clearControls()
// Empty the data out of the controls, since we have to wait for new
@@ -219,8 +212,7 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType
mPartnerID = pAvatarData->partner_id;
if (mPartnerID.notNull())
{
mCacheConnection.disconnect();
mCacheConnection = LLAvatarNameCache::get(mPartnerID, boost::bind(&LLPanelAvatarSecondLife::updatePartnerName, this, _2));
getChildView("partner_edit")->setValue(mPartnerID);
childSetEnabled("partner_info", TRUE);
}
}
@@ -401,7 +393,7 @@ BOOL LLPanelAvatarSecondLife::postBuild()
ctrl->setFallbackImageName("default_profile_picture.j2c");
auto show_pic = [&]
{
show_picture(getChild<LLTextureCtrl>("img")->getImageAssetID(), profile_picture_title(getChildView("dnname")->getValue()));
show_picture(getChild<LLTextureCtrl>("img")->getImageAssetID(), profile_picture_title(getChild<LLLineEditor>("dnname")->getText()));
};
auto show_pic_if_not_self = [=] { if (!ctrl->canChange()) show_pic(); };
@@ -1251,25 +1243,19 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
}
}
void LLPanelAvatar::onAvatarNameResponse(const LLUUID& agent_id, const LLAvatarName& av_name)
{
mCacheConnection.disconnect();
getChild<LLLineEditor>("dnname")->setText(gSavedSettings.getBOOL("SinguCompleteNameProfiles") ? av_name.getCompleteName() : av_name.getNSName());
}
void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id)
{
if (avatar_id.isNull()) return;
//BOOL avatar_changed = FALSE;
auto dnname = getChild<LLNameEditor>("dnname");
if (avatar_id != mAvatarID)
{
//avatar_changed = TRUE;
if (mAvatarID.notNull())
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
mAvatarID = avatar_id;
dnname->setNameID(avatar_id, false);
}
if (avatar_id.isNull()) return;
LLAvatarPropertiesProcessor::getInstance()->addObserver(mAvatarID, this);
// Determine if we have their calling card.
@@ -1294,8 +1280,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id)
if (LLDropTarget* drop_target = findChild<LLDropTarget>("drop_target_rect"))
drop_target->setEntityID(mAvatarID);
mCacheConnection.disconnect();
mCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLPanelAvatar::onAvatarNameResponse, this, _1, _2));
if (auto key_edit = getChildView("avatar_key"))
key_edit->setValue(mAvatarID.asString());