summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchathistory.cpp14
-rw-r--r--indra/newview/llpanelprofile.cpp10
-rw-r--r--indra/newview/lltoastnotifypanel.cpp1
-rw-r--r--indra/newview/llviewerregion.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/menu_object_icon.xml15
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_objectim.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml2
7 files changed, 47 insertions, 7 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 9564951986..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,11 +173,15 @@ public:
}
- bool onObjectIconContextMenuItemEnabled(const LLSD& userdata)
+ 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;
@@ -285,7 +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.Enable", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemEnabled, 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();
@@ -730,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
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index e795e7eedb..184238c40c 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -176,6 +176,16 @@ public:
return true;
}
+ if (verb == "unblock")
+ {
+ if (params.size() > 2)
+ {
+ const std::string object_name = params[2].asString();
+ LLMute mute(avatar_id, object_name, LLMute::OBJECT);
+ LLMuteList::getInstance()->remove(mute);
+ }
+ return true;
+ }
return false;
}
};
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 1a8ade5b10..e3a856be5c 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -325,6 +325,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
mTextBox->setContentTrusted(is_content_trusted);
mTextBox->setValue(mNotification->getMessage());
mTextBox->setIsFriendCallback(LLAvatarActions::isFriend);
+ mTextBox->setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0));
// add buttons for a script notification
if (mIsTip)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index cac2ed8585..899ab3a371 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -264,17 +264,18 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
}
S32 id = ++mHttpResponderID;
- ++mSeedCapAttempts;
LLSD capabilityNames = LLSD::emptyArray();
buildCapabilityNames(capabilityNames);
LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url
- << " (attempt #" << mSeedCapAttempts << ")" << LL_ENDL;
+ << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL;
regionp = NULL;
result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames);
+ ++mSeedCapAttempts;
+
regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
if (!regionp) //region was removed
{
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 93093014eb..5137aea72a 100644
--- a/indra/newview/skins/default/xui/en/menu_object_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml
@@ -23,8 +23,19 @@
<menu_item_call.on_click
function="ObjectIcon.Action"
parameter="block" />
- <menu_item_call.on_enable
- function="ObjectIcon.Enable"
+ <menu_item_call.on_visible
+ function="ObjectIcon.Visible"
+ parameter="not_blocked" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unblock"
+ layout="topleft"
+ name="Unblock">
+ <menu_item_call.on_click
+ function="ObjectIcon.Action"
+ parameter="unblock" />
+ <menu_item_call.on_visible
+ function="ObjectIcon.Visible"
parameter="is_blocked" />
</menu_item_call>
<menu_item_separator
diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
index b9d003b841..41d40b389a 100644
--- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
@@ -16,6 +16,13 @@
<menu_item_call.on_click
function="Url.Block" />
</menu_item_call>
+ <menu_item_call
+ label="Unblock"
+ layout="topleft"
+ name="unblock_object">
+ <menu_item_call.on_click
+ function="Url.Unblock" />
+ </menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 0a492fb37b..b189d1038f 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -806,7 +806,7 @@
<menu_item_check.on_click
function="Build.Toggle" />
<menu_item_check.on_enable
- function="Build.Enabled" />
+ function="Build.EnabledOrActive" />
</menu_item_check>
<menu
create_jump_keys="true"