diff options
author | James Cook <james@lindenlab.com> | 2008-07-18 17:50:25 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2008-07-18 17:50:25 +0000 |
commit | ed386ae547c225e352c39e8d14921572ee534b0b (patch) | |
tree | f67ff767edfc07900c0c8c16cd4439eb38d05be0 /indra/newview/llfloaterregioninfo.cpp | |
parent | 292627c09df6085c985a189edd5df06d3ca1eb47 (diff) |
merge support-featurettes-snapshot-merge-2 for QAR-754, includes:
* featurettes-4 89061:89589 (which is all of featurettes-1, -2, and -3, and part of -4)
* gteam-showstoppers-3 91950:91951 (which is all of gteam-showstoppers-1, -2, and -3)
* featurettes-5 92149:92150 (patch for last line of chat text not visible in chat history, DEV-17771)
* snapshot-3 91988:91991 (which is all of snapshot-1, -2, and -3)
Merging revisions 92190-92387 of svn+ssh://svn.lindenlab.com/svn/linden/branches/support-featurettes-snapshot-merge-2 into release, respecting ancestry
* QAR-590 Merge Lock Request for Support Sprint
* QAR-627 Merge snapshot improvements
* QAR-686 Merge Lock request for Featurettes
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 75 |
1 files changed, 36 insertions, 39 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index fc3c0952cb..3b2fb43f61 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -816,8 +816,7 @@ BOOL LLPanelRegionDebugInfo::postBuild() initHelpBtn("restart_help", "HelpRegionRestart"); childSetAction("choose_avatar_btn", onClickChooseAvatar, this); - childSetAction("return_scripted_other_land_btn", onClickReturnScriptedOtherLand, this); - childSetAction("return_scripted_all_btn", onClickReturnScriptedAll, this); + childSetAction("return_btn", onClickReturn, this); childSetAction("top_colliders_btn", onClickTopColliders, this); childSetAction("top_scripts_btn", onClickTopScripts, this); childSetAction("restart_btn", onClickRestart, this); @@ -832,10 +831,13 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); childDisable("apply_btn"); - + childDisable("target_avatar_name"); + childSetEnabled("choose_avatar_btn", allow_modify); - childSetEnabled("return_scripted_other_land_btn", allow_modify && !mTargetAvatar.isNull()); - childSetEnabled("return_scripted_all_btn", allow_modify && !mTargetAvatar.isNull()); + childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull()); + childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull()); + childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull()); + childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull()); childSetEnabled("top_colliders_btn", allow_modify); childSetEnabled("top_scripts_btn", allow_modify); childSetEnabled("restart_btn", allow_modify); @@ -881,61 +883,56 @@ void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& na } // static -void LLPanelRegionDebugInfo::onClickReturnScriptedOtherLand(void* data) +void LLPanelRegionDebugInfo::onClickReturn(void* data) { LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data; if (panelp->mTargetAvatar.isNull()) return; LLStringUtil::format_map_t args; args["[USER_NAME]"] = panelp->childGetValue("target_avatar_name").asString(); - gViewerWindow->alertXml("ReturnScriptedOnOthersLand", args, callbackReturnScriptedOtherLand, data); + gViewerWindow->alertXml("EstateObjectReturn", args, callbackReturn, data); } // static -void LLPanelRegionDebugInfo::callbackReturnScriptedOtherLand( S32 option, void* userdata ) +void LLPanelRegionDebugInfo::callbackReturn( S32 option, void* userdata ) { if (option != 0) return; LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) userdata; if (!self->mTargetAvatar.isNull()) { - U32 flags = 0; - flags = flags | SWD_OTHERS_LAND_ONLY; - flags = flags | SWD_ALWAYS_RETURN_OBJECTS; - flags |= SWD_SCRIPTED_ONLY; - - send_sim_wide_deletes(self->mTargetAvatar, flags); - } -} + U32 flags = SWD_ALWAYS_RETURN_OBJECTS; -// static -void LLPanelRegionDebugInfo::onClickReturnScriptedAll(void* data) -{ - LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data; - if (panelp->mTargetAvatar.isNull()) return; - - - LLStringUtil::format_map_t args; - args["[USER_NAME]"] = panelp->childGetValue("target_avatar_name").asString(); - gViewerWindow->alertXml("ReturnScriptedOnAllLand", args, callbackReturnScriptedAll, data); -} - -// static -void LLPanelRegionDebugInfo::callbackReturnScriptedAll( S32 option, void* userdata ) -{ - if (option != 0) return; + if (self->childGetValue("return_scripts").asBoolean()) + { + flags |= SWD_SCRIPTED_ONLY; + } + + if (self->childGetValue("return_other_land").asBoolean()) + { + flags |= SWD_OTHERS_LAND_ONLY; + } - LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) userdata; - if (!self->mTargetAvatar.isNull()) - { - U32 flags = 0; - flags |= SWD_ALWAYS_RETURN_OBJECTS; - flags |= SWD_SCRIPTED_ONLY; + if (self->childGetValue("return_estate_wide").asBoolean()) + { + // send as estate message - routed by spaceserver to all regions in estate + strings_t strings; + strings.push_back(llformat("%d", flags)); + strings.push_back(self->mTargetAvatar.asString()); - send_sim_wide_deletes(self->mTargetAvatar, flags); + LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); + + self->sendEstateOwnerMessage(gMessageSystem, "estateobjectreturn", invoice, strings); + } + else + { + // send to this simulator only + send_sim_wide_deletes(self->mTargetAvatar, flags); + } } } + // static void LLPanelRegionDebugInfo::onClickTopColliders(void* data) { |