Skip to content
Snippets Groups Projects
Commit 5a92a770 authored by Cho's avatar Cho
Browse files

CHUI-740 FIX Incorrect option shown in group Moderator tools "Toggle mute this participant"

Reverted changes in menu_conversation.xml, llconversationmodel.cpp, and llfloaterimcontainer.cpp
parent c4bcd4f2
No related branches found
No related tags found
No related merge requests found
...@@ -151,7 +151,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 ...@@ -151,7 +151,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("Moderator Options")); items.push_back(std::string("Moderator Options"));
items.push_back(std::string("AllowTextChat")); items.push_back(std::string("AllowTextChat"));
items.push_back(std::string("moderate_voice_separator")); 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("ModerateVoiceMute"));
items.push_back(std::string("ModerateVoiceUnmute")); items.push_back(std::string("ModerateVoiceUnmute"));
} }
......
...@@ -1245,7 +1245,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v ...@@ -1245,7 +1245,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
{ {
return LLAvatarActions::canOfferTeleport(uuids); 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... // *TODO : get that out of here...
return enableModerateContextMenuItem(item); return enableModerateContextMenuItem(item);
...@@ -1589,10 +1589,18 @@ bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& user ...@@ -1589,10 +1589,18 @@ bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& user
bool voice_channel = speakerp->isInVoiceChannel(); bool voice_channel = speakerp->isInVoiceChannel();
if ("can_moderate_voice" == userdata || "can_mute_unmute" == userdata) if ("can_moderate_voice" == userdata)
{ {
return voice_channel; 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 // The last invoke is used to check whether the "can_allow_text_chat" will enabled
return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID()); return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID());
......
...@@ -163,11 +163,18 @@ ...@@ -163,11 +163,18 @@
</menu_item_check> </menu_item_check>
<menu_item_separator layout="topleft" name="moderate_voice_separator" /> <menu_item_separator layout="topleft" name="moderate_voice_separator" />
<menu_item_call <menu_item_call
label="Toggle mute this participant" label="Mute this participant"
layout="topleft" layout="topleft"
name="ModerateVoiceToggleMuteSelected"> name="ModerateVoiceMuteSelected">
<on_click function="Avatar.DoToSelected" parameter="selected" /> <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>
<menu_item_call <menu_item_call
label="Mute everyone" label="Mute everyone"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment