diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-01-11 19:34:32 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-01-11 19:34:32 +0200 |
commit | 66f8c49bd6c1ddfe58cec9dc4d7dd83ae4e86063 (patch) | |
tree | b783b431fdaeefc818e06fd6f6b7b65e7f6e0e31 | |
parent | 150368274fabac9066a43cd54ea23468769ba262 (diff) |
Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly)
Code improved:
* removed disabled method LLAvatarListItem::reshapeAvatarName
* added refreshing chat participant list immediately after moderator rights are changed (for EXT-2364)
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.h | 7 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 5 |
3 files changed, 3 insertions, 26 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 56ac168c1d..5efdbaceb7 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -326,23 +326,6 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str setName(name); } -void LLAvatarListItem::reshapeAvatarName() -{ -/* - S32 width_delta = 0; - width_delta += mShowProfileBtn ? sProfileBtnWidth : 0; - width_delta += mSpeakingIndicator->getVisible() ? sSpeakingIndicatorWidth : 0; - width_delta += mAvatarIcon->getVisible() ? sIconWidth : 0; - width_delta += mShowInfoBtn ? sInfoBtnWidth : 0; - width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0; - - S32 height = mAvatarName->getRect().getHeight(); - S32 width = getRect().getWidth() - width_delta; - - mAvatarName->reshape(width, height); -*/ -} - // Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years", // taking i18n into account. The format string to use is taken from the panel XML. std::string LLAvatarListItem::formatSeconds(U32 secs) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 64b480c21b..5c8cc87b7b 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -98,13 +98,6 @@ public: void onInfoBtnClick(); void onProfileBtnClick(); - /** - * This method was added to fix EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) - * But this is a *HACK. The real reason of it was in incorrect logic while hiding profile/info/speaker buttons - * *TODO: new reshape method should be provided in lieu of this one to be called when visibility if those buttons is changed - */ - void reshapeAvatarName(); - protected: /** * Contains indicator to show voice activity. diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 362454ee3c..b6f78d08f1 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -166,7 +166,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { name.erase(found, moderator_indicator_len); item->setName(name); - item->reshapeAvatarName(); } } } @@ -188,7 +187,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) name += " "; name += moderator_indicator; item->setName(name); - item->reshapeAvatarName(); } } } @@ -279,6 +277,9 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e mModeratorList.erase(id); } } + + // apply changes immediately + onAvatarListRefreshed(mAvatarList, LLSD()); } } return true; |