summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-04-20 19:40:19 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-04-20 19:40:19 +0300
commit1241558dbf7e21a39487c16f940aed1db689ef84 (patch)
tree4e5e9faa2382b38fde8b11873a3938c0600c92bf /indra/newview
parenteec33adf34db3fe0c32600808458e4307ede1bf0 (diff)
MAINT-2129 "Block" button doesn't become disabled in remote object inspector after object has been added to block list
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llchathistory.cpp11
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_object_icon.xml3
2 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 4b426081d0..9564951986 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -169,6 +169,16 @@ public:
}
+ bool onObjectIconContextMenuItemEnabled(const LLSD& userdata)
+ {
+ std::string level = userdata.asString();
+ if (level == "is_blocked")
+ {
+ return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat);
+ }
+ return false;
+ }
+
void onAvatarIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -275,6 +285,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.Enable", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemEnabled, this, _2));
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleAvatar = menu->getHandle();
diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml
index 2d4f1792c2..93093014eb 100755
--- a/indra/newview/skins/default/xui/en/menu_object_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml
@@ -23,6 +23,9 @@
<menu_item_call.on_click
function="ObjectIcon.Action"
parameter="block" />
+ <menu_item_call.on_enable
+ function="ObjectIcon.Enable"
+ parameter="is_blocked" />
</menu_item_call>
<menu_item_separator
layout="topleft" />