summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-06 17:13:12 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-06 17:13:12 +0200
commitfc785febb332442533c20b638132b8ab378732a9 (patch)
treea5341fab8cdc67bc2472655de3a8fbefce931083 /indra/newview
parentaf61dd45b3afe8b62dceeb55a2ded7a9cfa34117 (diff)
Fixed normal bug EXT-3944 ('Error while moderating' dialog after disabling voice for non-connected participant avatar from miniinspector)
- improved condition to check if avatar can be moderated. - if not moderation panel (with "Disable Voice" button) is not shown at all. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinspectavatar.cpp1
-rw-r--r--indra/newview/llparticipantlist.cpp3
-rw-r--r--indra/newview/llspeakers.cpp5
-rw-r--r--indra/newview/llspeakers.h2
4 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 7f206cb873..72b36374dd 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -402,6 +402,7 @@ void LLInspectAvatar::updateModeratorPanel()
LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID);
if(speaker_mgr->isVoiceActive() && selected_speakerp &&
+ selected_speakerp->isInVoiceChannel() &&
((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike()))
{
getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index e2da4c4475..362454ee3c 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -592,8 +592,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
if (speakerp.notNull())
{
// not in voice participants can not be moderated
- return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE
- || speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+ return speakerp->isInVoiceChannel();
}
}
return false;
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 010dfd1b33..0dd9203c6d 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -88,6 +88,11 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c
mDisplayName = first + " " + last;
}
+bool LLSpeaker::isInVoiceChannel()
+{
+ return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED;
+}
+
LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source)
: LLEvent(source, "Speaker add moderator event"),
mSpeakerID (source->mID),
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index 1a8c23f56a..da8dfdf548 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -67,6 +67,8 @@ public:
void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
+ bool isInVoiceChannel();
+
ESpeakerStatus mStatus; // current activity status in speech group
F32 mLastSpokeTime; // timestamp when this speaker last spoke
F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?)