summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationmodel.cpp3
-rw-r--r--indra/newview/llfloaterimcontainer.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml13
3 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index bfc564f407..0977056b2a 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -151,7 +151,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("Moderator Options"));
items.push_back(std::string("AllowTextChat"));
items.push_back(std::string("moderate_voice_separator"));
- items.push_back(std::string("ModerateVoiceToggleMuteSelected"));
+ items.push_back(std::string("ModerateVoiceMuteSelected"));
+ items.push_back(std::string("ModerateVoiceUnMuteSelected"));
items.push_back(std::string("ModerateVoiceMute"));
items.push_back(std::string("ModerateVoiceUnmute"));
}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index cef45a5b56..30ea9f10c0 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1245,7 +1245,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
{
return LLAvatarActions::canOfferTeleport(uuids);
}
- else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute_unmute" == item))
+ else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute" == item) || ("can_unmute" == item))
{
// *TODO : get that out of here...
return enableModerateContextMenuItem(item);
@@ -1589,10 +1589,18 @@ bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& user
bool voice_channel = speakerp->isInVoiceChannel();
- if ("can_moderate_voice" == userdata || "can_mute_unmute" == userdata)
+ if ("can_moderate_voice" == userdata)
{
return voice_channel;
}
+ else if ("can_mute" == userdata)
+ {
+ return voice_channel && !isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
+ else if ("can_unmute" == userdata)
+ {
+ return voice_channel && isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
// The last invoke is used to check whether the "can_allow_text_chat" will enabled
return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID());
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 46c6e19fa5..8583747da0 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -163,11 +163,18 @@
</menu_item_check>
<menu_item_separator layout="topleft" name="moderate_voice_separator" />
<menu_item_call
- label="Toggle mute this participant"
+ label="Mute this participant"
layout="topleft"
- name="ModerateVoiceToggleMuteSelected">
+ name="ModerateVoiceMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" />
- <on_enable function="Avatar.EnableItem" parameter="can_mute_unmute" />
+ <on_enable function="Avatar.EnableItem" parameter="can_mute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unmute this participant"
+ layout="topleft"
+ name="ModerateVoiceUnMuteSelected">
+ <on_click function="Avatar.DoToSelected" parameter="selected" />
+ <on_enable function="Avatar.EnableItem" parameter="can_unmute" />
</menu_item_call>
<menu_item_call
label="Mute everyone"