EXT-7096 FIXED Added confirmation about muting all participants in a group call.
reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/375/ --HG-- branch : product-enginemeow-7.2.2
parent
2b4c9469f1
commit
966a6efe85
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -216,6 +216,8 @@ class LLParticipantList
|
|||
* @see moderateVoiceParticipant()
|
||||
*/
|
||||
void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
|
||||
|
||||
static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6139,6 +6139,23 @@ Are you sure you want to leave this call?
|
|||
<unique/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ConfirmMuteAll"
|
||||
type="alert">
|
||||
You have selected to mute all participants in a group call.
|
||||
This will also cause all residents that later join the call to be
|
||||
muted, even after you have left the call.
|
||||
|
||||
Mute everyone?
|
||||
<usetemplate
|
||||
ignoretext="Confirm before I mute all participants in a group call"
|
||||
name="okcancelignore"
|
||||
notext="Ok"
|
||||
yestext="Cancel"/>
|
||||
<unique/>
|
||||
</notification>
|
||||
|
||||
<global name="UnsupportedCPU">
|
||||
- Your CPU speed does not meet the minimum requirements.
|
||||
</global>
|
||||
|
|
|
|||
Loading…
Reference in New Issue