From 7ff09d05f2023ce8eb26acc46da22f8d86743de5 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 7 Oct 2019 12:41:00 +0300 Subject: SL-12024 Remove 'Estate warning' message and show just region name instead --- indra/newview/llfloaterland.cpp | 1 + indra/newview/llfloaterregioninfo.cpp | 23 ++----- indra/newview/llfloaterregioninfo.h | 2 - indra/newview/llpanelenvironment.cpp | 4 +- indra/newview/llpanelenvironment.h | 1 + indra/newview/llviewermessage.cpp | 3 +- .../default/xui/en/panel_region_environment.xml | 70 ++++++++++------------ 7 files changed, 42 insertions(+), 62 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 02c81adf2c..7b0c91da80 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -3329,6 +3329,7 @@ BOOL LLPanelLandEnvironment::postBuild() getChild(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION)); getChild(CHK_ALLOWOVERRIDE)->setVisible(FALSE); + getChild(PNL_REGION_MSG)->setVisible(FALSE); getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE); return TRUE; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 816ef68093..8bcc5bbe7a 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -200,8 +200,6 @@ public: virtual S32 getParcelId() override { return INVALID_PARCEL_ID; } - static void updateEstateName(const std::string& name); - protected: static const U32 DIRTY_FLAG_OVERRIDE; @@ -609,13 +607,6 @@ 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"); @@ -3773,6 +3764,11 @@ bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region) setNoSelection(true); setControlsEnabled(false); mCurEnvVersion = INVALID_PARCEL_ENVIRONMENT_VERSION; + getChild("region_text")->setValue(LLSD("")); + } + else + { + getChild("region_text")->setValue(LLSD(region->getName())); } setNoSelection(false); @@ -3832,15 +3828,6 @@ 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); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 61aa0778ef..75d0c3ea5c 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -107,8 +107,6 @@ public: void enableTopButtons(); void disableTopButtons(); - static void updateEstateName(const std::string& estate_name); - private: LLFloaterRegionInfo(const LLSD& seed); diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index c4fa4244b1..2ad7a23278 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -84,6 +84,7 @@ const std::string LLPanelEnvironmentInfo::PNL_ENVIRONMENT_ALTITUDES("pnl_environ const std::string LLPanelEnvironmentInfo::PNL_BUTTONS("pnl_environment_buttons"); const std::string LLPanelEnvironmentInfo::PNL_DISABLED("pnl_environment_disabled"); const std::string LLPanelEnvironmentInfo::TXT_DISABLED("txt_environment_disabled"); +const std::string LLPanelEnvironmentInfo::PNL_REGION_MSG("pnl_environment_region_msg"); const std::string LLPanelEnvironmentInfo::SDT_DROP_TARGET("sdt_drop_target"); const std::string LLPanelEnvironmentInfo::STR_LABEL_USEDEFAULT("str_label_use_default"); @@ -483,7 +484,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) getChild(PNL_BUTTONS)->setVisible(false); getChild(PNL_DISABLED)->setVisible(true); getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(false); - + getChild(PNL_REGION_MSG)->setVisible(false); updateEditFloater(mCurrentEnvironment, false); return false; @@ -491,6 +492,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) getChild(PNL_SETTINGS)->setVisible(true); getChild(PNL_BUTTONS)->setVisible(true); getChild(PNL_DISABLED)->setVisible(false); + getChild(PNL_REGION_MSG)->setVisible(isRegion()); getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled()); getChild(BTN_RST_ALTITUDES)->setVisible(isRegion()); diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 50ec1165be..38e3f09e34 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -80,6 +80,7 @@ protected: static const std::string PNL_ENVIRONMENT_ALTITUDES; static const std::string PNL_BUTTONS; static const std::string PNL_DISABLED; + static const std::string PNL_REGION_MSG; static const std::string TXT_DISABLED; static const std::string SDT_DROP_TARGET; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 296289de09..a0935628d7 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6714,8 +6714,9 @@ 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); - LLFloaterRegionInfo::updateEstateName(estate_name); + LLPanelEstateInfo::updateEstateName(estate_name); LLFloaterBuyLand::updateEstateName(estate_name); std::string owner_name = 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 bc0d59bcc7..edf1e1efd4 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -19,53 +19,42 @@ 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) - + + + + Region: + + + unknown + +