diff options
Diffstat (limited to 'indra')
-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; |