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
meow-7.2.2
Mike Antipov 2009-12-25 18:40:48 +02:00
parent dc1558fd66
commit 6a28667e93
1 changed files with 14 additions and 1 deletions

View File

@ -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: