From 7a7f68fb3c09c187f5b6fd333d0292a3fbfbc9df Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 27 Sep 2019 16:58:54 +0300 Subject: SL-12024 [EEP] UI should indicate that the Environment tab is an estate-wide setting. --- indra/newview/llfloaterregioninfo.cpp | 33 ++++++++++++++++- indra/newview/llfloaterregioninfo.h | 3 ++ indra/newview/llviewermessage.cpp | 3 +- .../newview/skins/default/xui/en/notifications.xml | 2 +- .../default/xui/en/panel_region_environment.xml | 42 +++++++++++++++++++++- 5 files changed, 78 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 83215a7fec..816ef68093 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -200,6 +200,8 @@ public: virtual S32 getParcelId() override { return INVALID_PARCEL_ID; } + static void updateEstateName(const std::string& name); + protected: static const U32 DIRTY_FLAG_OVERRIDE; @@ -572,6 +574,16 @@ LLPanelRegionGeneralInfo* LLFloaterRegionInfo::getPanelGeneral() return panel; } +// static +LLPanelRegionEnvironment* LLFloaterRegionInfo::getPanelEnvironment() +{ + LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance("region_info"); + if (!floater) return NULL; + LLTabContainer* tab = floater->getChild("region_panels"); + LLPanelRegionEnvironment* panel = (LLPanelRegionEnvironment*)tab->getChild("panel_env_info"); + return panel; +} + // static LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain() { @@ -597,6 +609,13 @@ LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences() return (LLPanelRegionExperiences*)tab->getChild("Experiences"); } +void LLFloaterRegionInfo::updateEstateName(const std::string& estate_name) +{ + LLPanelEstateCovenant::updateEstateName(estate_name); + LLPanelEstateInfo::updateEstateName(estate_name); + LLPanelRegionEnvironment::updateEstateName(estate_name); +} + void LLFloaterRegionInfo::disableTabCtrls() { LLTabContainer* tab = getChild("region_panels"); @@ -3813,6 +3832,15 @@ bool LLPanelRegionEnvironment::confirmUpdateEstateEnvironment(const LLSD& notifi return false; } +void LLPanelRegionEnvironment::updateEstateName(const std::string& name) +{ + LLPanelRegionEnvironment* panelp = LLFloaterRegionInfo::getPanelEnvironment(); + if (panelp) + { + panelp->getChildRef("estate_name").setText(name); + } +} + void LLPanelRegionEnvironment::onChkAllowOverride(bool value) { setDirtyFlag(DIRTY_FLAG_OVERRIDE); @@ -3824,7 +3852,10 @@ void LLPanelRegionEnvironment::onChkAllowOverride(bool value) if (LLPanelEstateInfo::isLindenEstate()) notification = "ChangeLindenEstate"; - LLNotification::Params params(notification); + LLSD args; + args["ESTATENAME"] = LLEstateInfoModel::instance().getName(); + LLNotification::Params params(notification); + params.substitutions(args); params.functor.function([this](const LLSD& notification, const LLSD& response) { confirmUpdateEstateEnvironment(notification, response); }); if (!value || LLPanelEstateInfo::isLindenEstate()) diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 0dda13cdc5..61aa0778ef 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -96,6 +96,7 @@ public: static LLPanelRegionTerrainInfo* getPanelRegionTerrain(); static LLPanelRegionExperiences* getPanelExperiences(); static LLPanelRegionGeneralInfo* getPanelGeneral(); + static LLPanelRegionEnvironment* getPanelEnvironment(); // from LLPanel virtual void refresh(); @@ -106,6 +107,8 @@ public: void enableTopButtons(); void disableTopButtons(); + static void updateEstateName(const std::string& estate_name); + private: LLFloaterRegionInfo(const LLSD& seed); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a0935628d7..296289de09 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6714,9 +6714,8 @@ void process_covenant_reply(LLMessageSystem* msg, void**) msg->getString("Data", "EstateName", estate_name); msg->getUUID("Data", "EstateOwnerID", estate_owner_id); - LLPanelEstateCovenant::updateEstateName(estate_name); LLPanelLandCovenant::updateEstateName(estate_name); - LLPanelEstateInfo::updateEstateName(estate_name); + LLFloaterRegionInfo::updateEstateName(estate_name); LLFloaterBuyLand::updateEstateName(estate_name); std::string owner_name = diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 228c50bb6d..35c51dbc52 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4896,7 +4896,7 @@ Unchecking this option may remove restrictions that parcel owners have added to icon="alertmodal.tga" name="EstateParcelEnvironmentOverride" type="alertmodal"> -Unchecking this option will remove any custom environments that parcel owners have added to their parcels. Please discuss with your parcel owners as needed. +(Estate-wide change: [ESTATENAME]) Unchecking this option will remove any custom environments that parcel owners have added to their parcels. Please discuss with your parcel owners as needed. Do you wish to proceed? confirm The parcel must be at least 128 square meters to support an environment. (empty) (region environment) + + Changes to settings on this tab will affect all regions in the estate. + + + Estate: + + + (unknown) +