summaryrefslogtreecommitdiff
path: root/indra/newview/llparticipantlist.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-12-11 17:00:49 +0200
committerMike Antipov <mantipov@productengine.com>2009-12-11 17:00:49 +0200
commiteca66a2aa6b507bad1e168bcfafb18e4d389caa1 (patch)
tree593fb2099cc6c2183bcc82782f651046e4d46e84 /indra/newview/llparticipantlist.cpp
parentee7683f6311c95c8ae57ad0dd49121437de28908 (diff)
Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List))
-- added updating of participant list to display participants not in voice as disabled. Unfortunatly I have to perform refreshing in a draw to mad it workable till beta 0. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r--indra/newview/llparticipantlist.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b787699a66..6b3f468ff1 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -224,6 +224,27 @@ void LLParticipantList::setSortOrder(EParticipantSortOrder order)
}
}
+void LLParticipantList::refreshVoiceState()
+{
+ LLSpeakerMgr::speaker_list_t speakers;
+ mSpeakerMgr->getSpeakerList(&speakers, TRUE);
+
+ for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin();
+ iter != speakers.end(); ++iter)
+ {
+ LLSpeaker* speakerp = (*iter).get();
+ const LLUUID& speaker_id = speakerp->mID;
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*> (mAvatarList->getItemByValue(speaker_id));
+ if ( item )
+ {
+ // if voice is disabled for this speaker show non voice speakers as disabled
+ bool is_in_voice = speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE
+ && speakerp->mStatus != LLSpeaker::STATUS_MUTED;
+ item->setOnline(!is_in_voice);
+ }
+ }
+}
+
bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();