From eb02d77ff5d20b99cc35fe9082cf5a22f634a7e1 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Wed, 4 Nov 2009 21:33:14 +0200 Subject: Implemented major sub-task EXT-2131 - Output monitor contols should only be shown for Group Chat and Adhoc Chat when in a Voice Call. Added onStateChange callback support for voice channel. Added showing/hiding logic of speaking indicator. --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llavatarlist.cpp') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 8609ba8b1c..bb03f47f46 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -65,6 +65,20 @@ void LLAvatarList::toggleIcons() } } +void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) +{ + // Save the new value for new items to use. + mShowSpeakingIndicator = visible; + + // Show/hide icons for all existing items. + std::vector items; + getItems(items); + for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) + { + static_cast(*it)->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + } +} + static bool findInsensitive(std::string haystack, const std::string& needle_upper) { LLStringUtil::toUpper(haystack); @@ -81,6 +95,7 @@ LLAvatarList::Params::Params() , show_last_interaction_time("show_last_interaction_time", false) , show_info_btn("show_info_btn", true) , show_profile_btn("show_profile_btn", true) +, show_speaking_indicator("show_speaking_indicator", true) { } @@ -94,6 +109,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowIcons(true) , mShowInfoBtn(p.show_info_btn) , mShowProfileBtn(p.show_profile_btn) +, mShowSpeakingIndicator(p.show_speaking_indicator) { setCommitOnSelectionChange(true); @@ -295,6 +311,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); addItem(item, id, pos); } -- cgit v1.3