summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-10-18 15:38:33 -0400
committerOz Linden <oz@lindenlab.com>2016-10-18 15:38:33 -0400
commit8e30a2f06dd1ce407fcb2399823efed883b317d2 (patch)
treee5b22fb9fd2b5e99cf195d00338da57ecdade0d4 /indra/newview/llchathistory.cpp
parent7df153e352ce50ded382df020cc3696b8c1b9325 (diff)
parent086c1342152895da28d2e0130d09432152604ca8 (diff)
merge changes for 4.1.1-release
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 4b426081d0..5d2997688f 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -156,6 +156,10 @@ public:
LLFloaterSidePanelContainer::showPanel("people", "panel_people",
LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId()));
}
+ else if (level == "unblock")
+ {
+ LLMuteList::getInstance()->remove(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
+ }
else if (level == "map")
{
std::string url = "secondlife://" + mObjectData["slurl"].asString();
@@ -169,6 +173,20 @@ public:
}
+ bool onObjectIconContextMenuItemVisible(const LLSD& userdata)
+ {
+ std::string level = userdata.asString();
+ if (level == "is_blocked")
+ {
+ return LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat);
+ }
+ else if (level == "not_blocked")
+ {
+ return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat);
+ }
+ return false;
+ }
+
void onAvatarIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -275,6 +293,7 @@ public:
registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
+ registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleAvatar = menu->getHandle();
@@ -719,6 +738,8 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
editor_params.trusted_content = false;
mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);
mEditor->setIsFriendCallback(LLAvatarActions::isFriend);
+ mEditor->setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0));
+
}
LLSD LLChatHistory::getValue() const