diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-09-27 16:58:54 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-09-27 16:58:54 +0300 |
commit | 7a7f68fb3c09c187f5b6fd333d0292a3fbfbc9df (patch) | |
tree | e2e6d77827206371749eea8757c3b4c28c2702de /indra | |
parent | 3609eabe5460023d1460664feb5de10d68457725 (diff) |
SL-12024 [EEP] UI should indicate that the Environment tab is an estate-wide setting.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_environment.xml | 42 |
5 files changed, 78 insertions, 5 deletions
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; @@ -573,6 +575,16 @@ LLPanelRegionGeneralInfo* LLFloaterRegionInfo::getPanelGeneral() } // static +LLPanelRegionEnvironment* LLFloaterRegionInfo::getPanelEnvironment() +{ + LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info"); + if (!floater) return NULL; + LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); + LLPanelRegionEnvironment* panel = (LLPanelRegionEnvironment*)tab->getChild<LLPanel>("panel_env_info"); + return panel; +} + +// static LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain() { LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info"); @@ -597,6 +609,13 @@ LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences() return (LLPanelRegionExperiences*)tab->getChild<LLPanel>("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<LLTabContainer>("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<LLTextBox>("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? <tag>confirm</tag> <usetemplate diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index f2f2d73a06..bc0d59bcc7 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -19,11 +19,51 @@ <string name="str_too_small">The parcel must be at least 128 square meters to support an environment.</string> <string name="str_empty">(empty)</string> <string name="str_region_env">(region environment)</string> + <text + type="string" + length="1" + follows="left|top" + height="32" + layout="topleft" + left="10" + name="env_help_text" + top="14" + word_wrap="true"> + Changes to settings on this tab will affect all regions in the estate. + </text> + <text + type="string" + length="1" + follows="left|top" + font="SansSerif" + height="20" + layout="topleft" + right="160" + name="estate_text" + top_pad="2" + halign="right" + width="140"> + Estate: + </text> + <text + type="string" + length="1" + follows="left|top" + font="SansSerif" + height="20" + layout="topleft" + top_delta="0" + name="estate_name" + left_pad="6" + width="150"> + (unknown) + </text> <layout_stack width="530" - height="367" + height="400" follows="all" layout="topleft" + left="0" animate="false" orientation="vertical"> <layout_panel |