void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
{
//	setAvatarName(av_name.mDisplayName);
//	setAvatarToolTip(av_name.mUsername);
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
    bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
    if (mShowDisplayName && !mShowUsername)
        setAvatarName( (!fRlvFilter) ? av_name.mDisplayName : RlvStrings::getAnonym(av_name) );
    else if (!mShowDisplayName && mShowUsername)
        setAvatarName( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) );
    else
        setAvatarName( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );

    // NOTE: If you change this, you will break sorting the contacts list
    //  by username unless you go change the comparator too. -- TS
    setAvatarToolTip( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) );
    // TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
    mAvatarIcon->setDrawTooltip(!fRlvFilter);
// [/RLVa:KB]

    //KC - store the username for use in sorting
    mUserName = av_name.mUsername;

    //requesting the list to resort
    notifyParent(LLSD().with("sort", LLSD()));

    //update children, because this call tends to effect the size of the name field width
    updateChildren();
}
Exemplo n.º 2
0
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
{
    setAvatarName(av_name.mDisplayName);
    setAvatarToolTip(av_name.mUsername);

    //requesting the list to resort
    notifyParent(LLSD().with("sort", LLSD()));
}