diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-12-25 18:40:48 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-12-25 18:40:48 +0200 |
commit | 6a28667e93c2fd66ce5d47fadc7700574d58fdfa (patch) | |
tree | c65d1db363ab7051360422769943df890dfb0cf3 /indra | |
parent | dc1558fd661af7cf8b1592ad5d144360f4e3b086 (diff) |
Fixed low bug EXT-3543 ("Mute this participant" menu should be disabled for non-connected participants)
-- added validating of the speaker status while showing voice moderation menu items
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e320886ad2..54a837d17d 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -577,10 +577,23 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& { return mUUIDs.front() != gAgentID; } - else if (item == "can_allow_text_chat" || "can_moderate_voice" == item) + else if (item == "can_allow_text_chat") { return isGroupModerator(); } + else if ("can_moderate_voice" == item) + { + if (isGroupModerator()) + { + LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(mUUIDs.front()); + if (speakerp.notNull()) + { + // not in voice participants can not be moderated + return speakerp->mStatus != LLSpeaker::STATUS_TEXT_ONLY; + } + } + return false; + } else if (item == std::string("can_add")) { // We can add friends if: |