summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 30ea9f10c0..52e153a15e 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -68,8 +68,9 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2));
mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2));
- mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, this, _2));
- mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMContainer::enableContextMenuItem, this, _2));
+ mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMContainer::checkContextMenuItem, this, _2));
+ mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMContainer::enableContextMenuItem, this, _2));
+ mEnableCallbackRegistrar.add("Avatar.VisibleItem", boost::bind(&LLFloaterIMContainer::visibleContextMenuItem, this, _2));
mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&LLFloaterIMContainer::doToSelectedGroup, this, _2));
@@ -1290,6 +1291,22 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve
return false;
}
+bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata)
+{
+ const std::string& item = userdata.asString();
+
+ if ("show_mute" == item)
+ {
+ return !isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
+ else if ("show_unmute" == item)
+ {
+ return isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
+
+ return true;
+}
+
void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
{
setVisibleAndFrontmost(false);