diff options
author | Cho <cho@lindenlab.com> | 2014-05-30 03:49:22 +0100 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2014-05-30 03:49:22 +0100 |
commit | 8924b2807585231fa40757ee4b76a0adbb2e3009 (patch) | |
tree | 7e83eda930d1e2fda13856d1d6ed6bc9098cf29a /indra/newview/llfloaterregioninfo.cpp | |
parent | 6e74c0de6aed31bc4c27fca1b14e7ab8ef301d34 (diff) |
Added a popup for choosing this or all estates when adding/removing an experience in the Region/Estate floater for ACME-1436
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rwxr-xr-x | indra/newview/llfloaterregioninfo.cpp | 56 |
1 files changed, 49 insertions, 7 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index a63f1173d1..d2e8a4907b 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3720,15 +3720,57 @@ BOOL LLPanelRegionExperiences::sendUpdate() void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id ) { - if(id == mDefaultExperience) + std::string dialog_name; + switch (event_type) { - return; + case ESTATE_EXPERIENCE_ALLOWED_ADD: + dialog_name = "EstateAllowedExperienceAdd"; + break; + + case ESTATE_EXPERIENCE_ALLOWED_REMOVE: + dialog_name = "EstateAllowedExperienceRemove"; + break; + + case ESTATE_EXPERIENCE_TRUSTED_ADD: + dialog_name = "EstateTrustedExperienceAdd"; + break; + + case ESTATE_EXPERIENCE_TRUSTED_REMOVE: + dialog_name = "EstateTrustedExperienceRemove"; + break; + + case ESTATE_EXPERIENCE_BLOCKED_ADD: + dialog_name = "EstateBlockedExperienceAdd"; + break; + + case ESTATE_EXPERIENCE_BLOCKED_REMOVE: + dialog_name = "EstateAllowedExperienceAdd"; + break; + + default: + return; + } + + LLSD payload; + payload["operation"] = (S32)event_type; + payload["dialog_name"] = dialog_name; + payload["allowed_ids"].append(id); + + LLSD args; + args["ALL_ESTATES"] = all_estates_text(); + + LLNotification::Params params(dialog_name); + params.payload(payload) + .substitutions(args) + .functor.function(LLPanelEstateInfo::accessCoreConfirm); + if (LLPanelEstateInfo::isLindenEstate()) + { + LLNotifications::instance().forceResponse(params, 0); + } + else + { + LLNotifications::instance().add(params); } - strings_t str(3, std::string()); - gAgent.getID().toString(str[0]); - str[1] = llformat("%u", event_type); - id.toString(str[2]); - sendEstateOwnerMessage(gMessageSystem, "estateexperiencedelta", LLFloaterRegionInfo::getLastInvoice(), str); onChangeAnything(); } |