summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-07 08:19:30 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-07 08:19:30 -0800
commit40208fd820cf99681aff01d0cd688c861ae7acb7 (patch)
treee4d60a88e3641304bab71ad18c1eac6d77b2a4ec /indra/newview
parent75171ee5d1a68e25abe899fdb997ba6df06f7529 (diff)
parent64e45b5b6ef8ded7bbea1b376e5bf2cbb0d6f5a4 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
-rw-r--r--indra/newview/llflyoutcombobtn.cpp6
-rw-r--r--indra/newview/llflyoutcombobtn.h1
-rw-r--r--indra/newview/llpanelenvironment.cpp4
-rw-r--r--indra/newview/llviewerregion.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml3
6 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 41582ffcc3..cb6fd611ec 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -113,6 +113,9 @@ namespace {
const std::string ACTION_APPLY_REGION("apply_region");
const F32 DAY_CYCLE_PLAY_TIME_SECONDS = 60;
+
+ const std::string STR_COMMIT_PARCEL("commit_parcel");
+ const std::string STR_COMMIT_REGION("commit_region");
}
//=========================================================================
@@ -440,6 +443,17 @@ void LLFloaterEditExtDayCycle::refresh()
bool show_commit = ((mEditContext == CONTEXT_PARCEL) || (mEditContext == CONTEXT_REGION));
bool show_apply = (mEditContext == CONTEXT_INVENTORY);
+ if (show_commit)
+ {
+ std::string commit_text;
+ if (mEditContext == CONTEXT_PARCEL)
+ commit_text = getString(STR_COMMIT_PARCEL);
+ else
+ commit_text = getString(STR_COMMIT_REGION);
+
+ mFlyoutControl->setMenuItemLabel(ACTION_COMMIT, commit_text);
+ }
+
mFlyoutControl->setMenuItemVisible(ACTION_COMMIT, show_commit);
mFlyoutControl->setMenuItemVisible(ACTION_SAVE, is_inventory_avail);
mFlyoutControl->setMenuItemVisible(ACTION_SAVEAS, is_inventory_avail);
diff --git a/indra/newview/llflyoutcombobtn.cpp b/indra/newview/llflyoutcombobtn.cpp
index b008ee13be..48bfb85072 100644
--- a/indra/newview/llflyoutcombobtn.cpp
+++ b/indra/newview/llflyoutcombobtn.cpp
@@ -112,6 +112,12 @@ void LLFlyoutComboBtnCtrl::setMenuItemVisible(const std::string &item, bool visi
mFlyoutMenu->setItemVisible(item, visible);
}
+
+void LLFlyoutComboBtnCtrl::setMenuItemLabel(const std::string &item, const std::string &label)
+{
+ mFlyoutMenu->setItemLabel(item, label);
+}
+
void LLFlyoutComboBtnCtrl::onFlyoutButton(LLUICtrl *ctrl, const LLSD &data)
{
S32 x, y;
diff --git a/indra/newview/llflyoutcombobtn.h b/indra/newview/llflyoutcombobtn.h
index b0dd4abadf..e41cd0cecb 100644
--- a/indra/newview/llflyoutcombobtn.h
+++ b/indra/newview/llflyoutcombobtn.h
@@ -46,6 +46,7 @@ public:
void setMenuItemEnabled(const std::string &item, bool enabled);
void setShownBtnEnabled(bool enabled);
void setMenuItemVisible(const std::string &item, bool visible);
+ void setMenuItemLabel(const std::string &item, const std::string &label);
U32 getItemCount();
void setSelectedItem(S32 itemno);
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 3e0bb43d71..a150e66085 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -299,9 +299,11 @@ void LLPanelEnvironmentInfo::refreshFromEstate()
{
/*TODO: Unfortunately only estate manager may get information from the LLEstateInfoModel.
* The proletariat is not allowed to know what options are set for an estate. We should fix this.*/
+ LLViewerRegion *pRegion = gAgent.getRegion();
bool oldAO = mAllowOverride;
- mAllowOverride = (!isRegion()) || LLEstateInfoModel::instance().getAllowEnvironmentOverride();
+ //mAllowOverride = (!isRegion()) || LLEstateInfoModel::instance().getAllowEnvironmentOverride();
+ mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
if (oldAO != mAllowOverride)
refresh();
}
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index d5266ec873..0e39e9b284 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -131,6 +131,7 @@ public:
inline BOOL isPrelude() const;
inline BOOL getAllowTerraform() const;
inline BOOL getRestrictPushObject() const;
+ inline BOOL getAllowEnvironmentOverride() const;
inline BOOL getReleaseNotesRequested() const;
bool isAlive(); // can become false if circuit disconnects
@@ -635,6 +636,11 @@ inline BOOL LLViewerRegion::getRestrictPushObject() const
return ((mRegionFlags & REGION_FLAGS_RESTRICT_PUSHOBJECT) != 0);
}
+inline BOOL LLViewerRegion::getAllowEnvironmentOverride() const
+{
+ return ((mRegionFlags & REGION_FLAGS_ALLOW_ENVIRONMENT_OVERRIDE) != 0);
+}
+
inline BOOL LLViewerRegion::getReleaseNotesRequested() const
{
return mReleaseNotesRequested;
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index a3dbab2509..a6868d7f90 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -24,6 +24,9 @@
<string name="sky_label">Sky</string>
<string name="water_label">Water</string>
+ <string name="commit_parcel">Apply To Parcel</string>
+ <string name="commit_region">Apply To Region</string>
+
<!-- Layout -->
<layout_stack name="outer_stack"
width="705"