diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-01-11 18:50:19 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-01-11 18:50:19 +0200 |
commit | 150368274fabac9066a43cd54ea23468769ba262 (patch) | |
tree | bca094b92f6997816b077ec9d658128cbb7dc201 /indra | |
parent | 1bdae78926d11389ac6f4ca8daae3bf50ba7ceda (diff) |
Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly)
Code improved:
* removed direct changing of "speaker indicator" visibility in Avatar List when Avatar List Item is added
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llavatarlist.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.h | 6 |
3 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 13daa79528..19e9e52ddf 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -82,7 +82,7 @@ void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) getItems(items); for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++) { - static_cast<LLAvatarListItem*>(*it)->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + static_cast<LLAvatarListItem*>(*it)->showSpeakingIndicator(mShowSpeakingIndicator); } } @@ -323,7 +323,6 @@ boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commi void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); - item->showSpeakingIndicator(true); item->setName(name); item->setAvatarId(id, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); @@ -332,7 +331,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setAvatarIconVisible(mShowIcons); item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); - item->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + item->showSpeakingIndicator(mShowSpeakingIndicator); addItem(item, id, pos); } diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index aa5a575464..56ac168c1d 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -245,7 +245,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show) mShowProfileBtn = show; } -void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible) +void LLAvatarListItem::showSpeakingIndicator(bool visible) { // Already done? Then do nothing. if (mSpeakingIndicator->getVisible() == (BOOL)visible) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 688197810e..64b480c21b 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -88,7 +88,8 @@ public: //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly void setShowProfileBtn(bool show); void setShowInfoBtn(bool show); - void setSpeakingIndicatorVisible(bool visible); + void showSpeakingIndicator(bool show); + void showLastInteractionTime(bool show); void setAvatarIconVisible(bool visible); const LLUUID& getAvatarId() const; @@ -97,9 +98,6 @@ public: void onInfoBtnClick(); void onProfileBtnClick(); - void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); } - void showLastInteractionTime(bool show); - /** * 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 |