diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-12-11 19:56:45 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-12-11 19:56:45 +0200 |
commit | a5f4531315f8f8c5711e2298019586c6ae0dba76 (patch) | |
tree | ddb5b4fcce66b00303e557f8e6ac6553f4409cfa | |
parent | c57138b64777a51289d62e575ef73c04d060c344 (diff) |
Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List))
-- added showing Moderator label near the agent's name if she is a group moderator
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llcallfloater.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llcallfloater.h | 2 |
2 files changed, 27 insertions, 5 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 87863e829d..75fc9f1f7b 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llnotificationsutil.h" +#include "lltrans.h" #include "llcallfloater.h" @@ -82,6 +83,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mAvatarList(NULL) , mNonAvatarCaller(NULL) , mVoiceType(VC_LOCAL_CHAT) +, mAgentPanel(NULL) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) { @@ -239,6 +241,7 @@ void LLCallFloater::updateSession() childSetVisible("leave_btn_panel", !is_local_chat); refreshPartisipantList(); + updateModeratorState(); } void LLCallFloater::refreshPartisipantList() @@ -315,17 +318,17 @@ void LLCallFloater::updateTitle() void LLCallFloater::initAgentData() { - LLPanel* my_panel = getChild<LLPanel> ("my_panel"); + mAgentPanel = getChild<LLPanel> ("my_panel"); - if ( my_panel ) + if ( mAgentPanel ) { - my_panel->childSetValue("user_icon", gAgentID); + mAgentPanel->childSetValue("user_icon", gAgentID); std::string name; gCacheName->getFullName(gAgentID, name); - my_panel->childSetValue("user_text", name); + mAgentPanel->childSetValue("user_text", name); - mSpeakingIndicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator"); + mSpeakingIndicator = mAgentPanel->getChild<LLOutputMonitorCtrl>("speaking_indicator"); mSpeakingIndicator->setSpeakerId(gAgentID); } } @@ -340,4 +343,21 @@ void LLCallFloater::setModeratorMutedVoice(bool moderator_muted) } mSpeakingIndicator->setIsMuted(moderator_muted); } + +void LLCallFloater::updateModeratorState() +{ + std::string name; + gCacheName->getFullName(gAgentID, name); + + if(gAgent.isInGroup(mSpeakerManager->getSessionID())) + { + // Agent is Moderator + if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator) + { + const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); + name += " " + moderator_indicator; + } + } + mAgentPanel->childSetValue("user_text", name); +} //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 79b0fca061..b2288a42ff 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -97,6 +97,7 @@ private: void updateTitle(); void initAgentData(); void setModeratorMutedVoice(bool moderator_muted); + void updateModeratorState(); private: LLSpeakerMgr* mSpeakerManager; @@ -104,6 +105,7 @@ private: LLAvatarList* mAvatarList; LLNonAvatarCaller* mNonAvatarCaller; EVoiceControls mVoiceType; + LLPanel* mAgentPanel; LLOutputMonitorCtrl* mSpeakingIndicator; bool mIsModeratorMutedVoice; |