SL-12024 Remove 'Estate warning' message and show just region name instead

master
maxim_productengine 2019-10-07 12:41:00 +03:00
parent 7a7f68fb3c
commit 7ff09d05f2
7 changed files with 42 additions and 62 deletions

View File

@ -3329,6 +3329,7 @@ BOOL LLPanelLandEnvironment::postBuild()
getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(FALSE);
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(FALSE);
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE);
return TRUE;

View File

@ -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<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");
@ -3773,6 +3764,11 @@ bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region)
setNoSelection(true);
setControlsEnabled(false);
mCurEnvVersion = INVALID_PARCEL_ENVIRONMENT_VERSION;
getChild<LLUICtrl>("region_text")->setValue(LLSD(""));
}
else
{
getChild<LLUICtrl>("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<LLTextBox>("estate_name").setText(name);
}
}
void LLPanelRegionEnvironment::onChkAllowOverride(bool value)
{
setDirtyFlag(DIRTY_FLAG_OVERRIDE);

View File

@ -107,8 +107,6 @@ public:
void enableTopButtons();
void disableTopButtons();
static void updateEstateName(const std::string& estate_name);
private:
LLFloaterRegionInfo(const LLSD& seed);

View File

@ -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<LLUICtrl>(PNL_BUTTONS)->setVisible(false);
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(false);
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
updateEditFloater(mCurrentEnvironment, false);
return false;
@ -491,6 +492,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(true);
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(true);
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(false);
getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(isRegion());
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled());
getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setVisible(isRegion());

View File

@ -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;

View File

@ -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 =

View File

@ -19,53 +19,42 @@
<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="400"
follows="all"
layout="topleft"
left="0"
left="0"
animate="false"
orientation="vertical">
<layout_panel
user_resize="false"
auto_resize="false"
height="20"
name="pnl_environment_region_msg"
top="0">
<text follows="left|top"
font="SansSerif"
height="20"
layout="topleft"
left="10"
name="region_text_lbl"
top="6"
width="100">
Region:
</text>
<text follows="left|top"
font="SansSerif"
height="20"
layout="topleft"
left_delta="50"
name="region_text"
top_delta="0"
width="400">
unknown
</text>
</layout_panel>
<layout_panel
user_resize="false"
name="pnl_environment_disabled"
@ -82,6 +71,7 @@
<layout_panel
user_resize="false"
min_height="0"
top="0"
name="pnl_environment_config"
visible="true">
<layout_stack