summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-01-23 08:54:34 -0800
committerRider Linden <rider@lindenlab.com>2018-01-23 08:54:34 -0800
commit1b8c2b5ebbe0d42f147730bc9b6528fa8c6796ce (patch)
tree577e909cd6f0c620dcda1393fb572100fd4faf7e /indra/newview/llfloaterland.cpp
parenta0c228d84240a80437b63e0a2cd1cee24e8004a0 (diff)
MAINT-8052: Initial support for new EEP cap
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r--indra/newview/llfloaterland.cpp80
1 files changed, 66 insertions, 14 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index fc4ab0a7a7..5d6e8885de 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -139,31 +139,21 @@ protected:
LLPanelExperienceListEditor* mBlocked;
};
-#if 0
+
class LLPanelLandEnvironment
- : public LLPanel
+ : public LLPanelEnvironmentInfo
{
public:
LLPanelLandEnvironment(LLSafeHandle<LLParcelSelection>& parcelp);
- // TODO: LAPRAS
-#if 0
+
virtual BOOL postBuild();
void refresh();
- void experienceAdded(const LLUUID& id, U32 xp_type, U32 access_type);
- void experienceRemoved(const LLUUID& id, U32 access_type);
protected:
- LLPanelExperienceListEditor* setupList(const char* control_name, U32 xp_type, U32 access_type);
- void refreshPanel(LLPanelExperienceListEditor* panel, U32 xp_type);
LLSafeHandle<LLParcelSelection>& mParcel;
-
- LLPanelExperienceListEditor* mAllowed;
- LLPanelExperienceListEditor* mBlocked;
-#endif
};
-#endif
// inserts maturity info(icon and text) into target textbox
// names_floater - pointer to floater which contains strings with maturity icons filenames
@@ -346,6 +336,7 @@ void LLFloaterLand::refresh()
mPanelAccess->refresh();
mPanelCovenant->refresh();
mPanelExperiences->refresh();
+ mPanelEnvironment->refresh();
}
@@ -418,7 +409,7 @@ void* LLFloaterLand::createPanelLandExperiences(void* data)
void* LLFloaterLand::createPanelLandEnvironment(void* data)
{
LLFloaterLand* self = (LLFloaterLand*)data;
- self->mPanelEnvironment = new LLPanelEnvironmentInfo(/*self->mParcel*/);
+ self->mPanelEnvironment = new LLPanelLandEnvironment(self->mParcel);
return self->mPanelEnvironment;
}
@@ -3247,3 +3238,64 @@ void LLPanelLandExperiences::refresh()
refreshPanel(mAllowed, EXPERIENCE_KEY_TYPE_ALLOWED);
refreshPanel(mBlocked, EXPERIENCE_KEY_TYPE_BLOCKED);
}
+
+//=========================================================================
+
+LLPanelLandEnvironment::LLPanelLandEnvironment(LLSafeHandle<LLParcelSelection>& parcelp):
+ LLPanelEnvironmentInfo(),
+ mParcel(parcelp)
+{
+}
+
+BOOL LLPanelLandEnvironment::postBuild()
+{
+ if (!LLPanelEnvironmentInfo::postBuild())
+ return FALSE;
+
+ mAllowOverRide->setVisible(FALSE);
+ return TRUE;
+}
+
+void LLPanelLandEnvironment::refresh()
+{
+ LLParcel* parcel = mParcel->getParcel();
+ if (!parcel)
+ {
+ mRegionSettingsRadioGroup->setEnabled(FALSE);
+ mDayLengthSlider->setEnabled(FALSE);
+ mDayOffsetSlider->setEnabled(FALSE);
+ mAllowOverRide->setEnabled(FALSE);
+
+ return;
+ }
+
+ //BOOL owner_or_god = gAgent.isGodlike() || (parcel owner or group)
+ BOOL owner_or_god = true;
+ //BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager());
+
+ F64Hours daylength;
+ F64Hours dayoffset;
+
+ daylength = parcel->getDayLength();
+ dayoffset = parcel->getDayOffset();
+
+ if (dayoffset.value() > 12.0)
+ dayoffset = dayoffset - F32Hours(24.0f);
+
+ mDayLengthSlider->setValue(daylength.value());
+ mDayOffsetSlider->setValue(dayoffset.value());
+
+ mRegionSettingsRadioGroup->setSelectedIndex(parcel->getUsesDefaultDayCycle() ? 0 : 1);
+
+ setControlsEnabled(owner_or_god);
+
+ if (!parcel->getUsesDefaultDayCycle())
+ mEditingDayCycle = parcel->getParcelDayCycle()->buildClone();
+ else
+ {
+ LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
+ if (regionp)
+ mEditingDayCycle = regionp->getRegionDayCycle()->buildClone();
+ }
+
+}