diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-14 10:28:38 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-14 10:28:38 +0100 |
commit | c49af5ee304a61927c40e9bd3fdcfe0a7d9493f3 (patch) | |
tree | 1807e6105869b66efc16b3b4e30d47ae4440ba16 /indra/newview/llparticipantlist.cpp | |
parent | b325f72f7d550fef047e7b85d94fa3f3c778170c (diff) | |
parent | a5f365c331149b03366be421aa1597dfbcb1bb33 (diff) |
merge from viewer-public
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index feaf7335c0..daf116d255 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -37,6 +37,8 @@ #include "llavataractions.h" #include "llagent.h" +#include "llimview.h" +#include "llnotificationsutil.h" #include "llparticipantlist.h" #include "llspeakers.h" #include "llviewercontrol.h" @@ -809,10 +811,43 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); if (mgr) { + if (!unmute) + { + LLSD payload; + payload["session_id"] = mgr->getSessionID(); + payload["excluded_avatar_id"] = excluded_avatar_id; + LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback); + return; + } + mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); } } +// static +void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 1) + { + return; + } + + const LLSD& payload = notification["payload"]; + const LLUUID& session_id = payload["session_id"]; + const LLUUID& excluded_avatar_id = payload["excluded_avatar_id"]; + + LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> ( + LLIMModel::getInstance()->getSpeakerManager(session_id)); + if (speaker_manager) + { + speaker_manager->moderateVoiceOtherParticipants(excluded_avatar_id, false); + } + + return; +} + + bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); |