From 300d17822e598752b2e44aa54829259fece3c84b Mon Sep 17 00:00:00 2001 From: Arrehn Date: Thu, 11 Aug 2011 23:00:52 -0400 Subject: [PATCH] Show info buttons on speaker list, but not friends list --- indra/newview/llavatarlist.cpp | 15 ++++++++++++++- indra/newview/llavatarlistitem.cpp | 25 ++++--------------------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 88d2c12acc..295b99089e 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -263,6 +263,19 @@ LLAvatarList::LLAvatarList(const Params& p) mLITUpdateTimer->start(); } + // AO: Because Avatarlist is shared in so many places, some without good initialization + // one-off exceptions here + if (getName() == "speakers_list") + { + mShowInfoBtn = true; + } + else + { + mShowInfoBtn = false; + } + + + LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLAvatarList::handleDisplayNamesOptionChanged, this)); } @@ -802,7 +815,7 @@ BOOL LLAvalineListItem::postBuild() setOnline(true); showLastInteractionTime(false); setShowProfileBtn(false); - setShowInfoBtn(false); + mAvatarIcon->setValue("Avaline_Icon"); mAvatarIcon->setToolTip(std::string("")); } diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 17f3e0f937..6eeda431fc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -150,8 +150,6 @@ BOOL LLAvatarListItem::postBuild() mIconPermissionEditTheirs->setVisible(false); - - // radar mNearbyRange = getChild("radar_range"); mNearbyRange->setValue("N/A"); @@ -170,8 +168,8 @@ BOOL LLAvatarListItem::postBuild() mSpeakingIndicator = getChild("speaking_indicator"); mInfoBtn = getChild("info_btn"); mProfileBtn = getChild("profile_btn"); - - mInfoBtn->setVisible(true); // changed from false to have the info button always shown -WoLf + + mInfoBtn->setVisible(false); // AO: enable this by calling setShowInfoButton mInfoBtn->setClickedCallback(boost::bind(&LLAvatarListItem::onInfoBtnClick, this)); mProfileBtn->setVisible(false); @@ -205,24 +203,8 @@ S32 LLAvatarListItem::notifyParent(const LLSD& info) void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask) { getChildView("hovered_icon")->setVisible( true); - - // AO: behave differently based on which avlist we are. Should move this into XUI or subclasses. - std::string listName = getParent()->getParent()->getName(); - if ( listName == "speakers_list" ) - { - //LLButton* b1 = getChild("info_btn"); - //b1->setVisible(TRUE); - //[RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d - mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) ); - } -// AO: We normally do not show the hover-over items because of space contraints and ease of access through better known context menu. -// mInfoBtn->setVisible(mShowInfoBtn); -// mProfileBtn->setVisible(mShowProfileBtn); -// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d -// mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) ); -// mProfileBtn->setVisible( (mShowProfileBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) ); -// [/RLVa:KB] + // AO, removed on-hover visibility. Don't do this. instead flip info buttons on full-time in postbuild. mHovered = true; LLPanel::onMouseEnter(x, y, mask); @@ -368,6 +350,7 @@ void LLAvatarListItem::setLastInteractionTime(U32 secs_since) void LLAvatarListItem::setShowInfoBtn(bool show) { mShowInfoBtn = show; + mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) ); } void LLAvatarListItem::setShowProfileBtn(bool show)