summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-12-11 18:38:29 +0200
committerMike Antipov <mantipov@productengine.com>2009-12-11 18:38:29 +0200
commitf0188645c72126782f08f27fe7104d73e635ddb9 (patch)
tree825463157269b38bae8d732574d2f2bd1053dd68
parenteca66a2aa6b507bad1e168bcfafb18e4d389caa1 (diff)
Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List))
-- added showing notification that user was muted by moderator --HG-- branch : product-engine
-rw-r--r--indra/newview/llcallfloater.cpp27
-rw-r--r--indra/newview/llcallfloater.h4
2 files changed, 28 insertions, 3 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index e6a6910d6d..87863e829d 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -33,6 +33,8 @@
#include "llviewerprecompiledheaders.h"
+#include "llnotificationsutil.h"
+
#include "llcallfloater.h"
#include "llagent.h"
@@ -80,6 +82,8 @@ LLCallFloater::LLCallFloater(const LLSD& key)
, mAvatarList(NULL)
, mNonAvatarCaller(NULL)
, mVoiceType(VC_LOCAL_CHAT)
+, mSpeakingIndicator(NULL)
+, mIsModeratorMutedVoice(false)
{
mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
LLVoiceClient::getInstance()->addObserver(this);
@@ -137,6 +141,14 @@ void LLCallFloater::draw()
// But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement.
// *TODO: mantipov: remove from draw()
onChange();
+
+ bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID);
+
+ if (mIsModeratorMutedVoice != is_moderator_muted)
+ {
+ setModeratorMutedVoice(is_moderator_muted);
+ }
+
LLDockableFloater::draw();
}
@@ -313,8 +325,19 @@ void LLCallFloater::initAgentData()
gCacheName->getFullName(gAgentID, name);
my_panel->childSetValue("user_text", name);
- LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
- speaking_indicator->setSpeakerId(gAgentID);
+ mSpeakingIndicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+ mSpeakingIndicator->setSpeakerId(gAgentID);
+ }
+}
+
+void LLCallFloater::setModeratorMutedVoice(bool moderator_muted)
+{
+ mIsModeratorMutedVoice = moderator_muted;
+
+ if (moderator_muted)
+ {
+ LLNotificationsUtil::add("VoiceIsMutedByModerator");
}
+ mSpeakingIndicator->setIsMuted(moderator_muted);
}
//EOF
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 52f9595435..931f830937 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -39,9 +39,9 @@
class LLAvatarList;
class LLNonAvatarCaller;
+class LLOutputMonitorCtrl;
class LLParticipantList;
class LLSpeakerMgr;
-
/**
* The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button.
* It can be torn-off and freely positioned onscreen.
@@ -103,6 +103,8 @@ private:
LLAvatarList* mAvatarList;
LLNonAvatarCaller* mNonAvatarCaller;
EVoiceControls mVoiceType;
+ LLOutputMonitorCtrl* mSpeakingIndicator;
+ bool mIsModeratorMuted;
boost::signals2::connection mChannelChangedConnection;
};