From 6bb02e0e260df2d00ab53376cf15af5e7e2fd12f Mon Sep 17 00:00:00 2001
From: Celierra Darling <none@none>
Date: Mon, 10 Jan 2011 15:06:30 -0500
Subject: STORM-1126 WIP Windlight Estate Settings port from 1.23: Various
 changes to allow compilation

(resubmitted by Vadim ProductEngine)
---
 indra/newview/llappviewer.cpp         |  3 +--
 indra/newview/llenvmanager.cpp        | 15 ++++++++++-----
 indra/newview/llfloaterdaycycle.cpp   | 11 ++++++-----
 indra/newview/llfloaterregioninfo.h   |  2 --
 indra/newview/llfloaterwater.cpp      |  2 ++
 indra/newview/llfloaterwater.h        |  4 ++--
 indra/newview/llwaterparammanager.cpp |  5 -----
 indra/newview/llwaterparammanager.h   |  3 ---
 8 files changed, 21 insertions(+), 24 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index aa781122ce..189e61bcb8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1469,8 +1469,7 @@ bool LLAppViewer::cleanup()
 	llinfos << "Cleaning up Objects" << llendflush;
 	
 	LLViewerObject::cleanupVOClasses();
-
-	LLWaterParamManager::cleanupClass();
+	
 	LLPostProcess::cleanupClass();
 
 	LLTracker::cleanupInstance();
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index a257e4ea24..daf3f90234 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -44,7 +44,7 @@
 #include "llwlparammanager.h"
 #include "llwaterparammanager.h"
 #include "llfloaterregioninfo.h"
-#include "llwindlightscrubbers.h"
+//#include "llwindlightscrubbers.h" // *HACK commented out since this code isn't released (yet)
 #include "llwlhandlers.h"
 #include "llnotifications.h"
 
@@ -269,11 +269,16 @@ bool LLEnvManager::processIncomingMessage(const LLSD& unvalidated_content, const
 	updateUIFromEditability();
 
 	// Validate
-	std::set<std::string> empty_set;
-	LLWLPacketScrubber scrubber(scope, empty_set);
-	LLSD windlight_llsd = scrubber.scrub(unvalidated_content);
+	//std::set<std::string> empty_set;
+	//LLWLPacketScrubber scrubber(scope, empty_set);
+	//LLSD windlight_llsd = scrubber.scrub(unvalidated_content);
 
-	bool valid = windlight_llsd.isDefined(); // successful scrub
+	//bool valid = windlight_llsd.isDefined(); // successful scrub
+
+	// *HACK - Don't have the validator, so just use content without validating.  Should validate here for third-party grids.
+	LLSD windlight_llsd(unvalidated_content);
+	bool valid = true;
+	// end HACK
 
 	mLastReceivedID = unvalidated_content[0]["messageID"].asUUID();		// if the message was valid, grab the UUID from it and save it for next outbound update message
 
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
index 48f91aa64a..c54540d827 100644
--- a/indra/newview/llfloaterdaycycle.cpp
+++ b/indra/newview/llfloaterdaycycle.cpp
@@ -58,7 +58,7 @@
 #include "llwlparammanager.h"
 #include "llpostprocess.h"
 #include "llfloaterwindlight.h"
-#include "llwindlightscrubbers.h"
+//#include "llwindlightscrubbers.h" // *HACK commented out since this code isn't released (yet)
 #include "llenvmanager.h"
 #include "llfloaterreg.h"
 
@@ -73,8 +73,9 @@ LLFloaterDayCycle::LLFloaterDayCycle(const LLSD &key) : LLFloater(key)
 {
 	sOriginalTitle = getTitle();
 
-	llassert(LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES <= getChild<LLMultiSliderCtrl>("WLDayCycleKeys")->getMaxValue() &&
-		     LLWLPacketScrubber::MAX_REGION_KEY_FRAMES <= getChild<LLMultiSliderCtrl>("WLDayCycleKeys")->getMaxValue());
+	// *HACK commented out since this code isn't released (yet)
+	//llassert(LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES <= getChild<LLMultiSliderCtrl>("WLDayCycleKeys")->getMaxValue() &&
+	//	     LLWLPacketScrubber::MAX_REGION_KEY_FRAMES <= getChild<LLMultiSliderCtrl>("WLDayCycleKeys")->getMaxValue());
 
 	// add the time slider
 	LLMultiSliderCtrl* sldr = getChild<LLMultiSliderCtrl>("WLTimeSlider");
@@ -530,10 +531,10 @@ void LLFloaterDayCycle::onAddKey(void* userData)
 	switch(sScope)
 	{
 		case LLEnvKey::SCOPE_LOCAL:
-			max_sliders = LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES;
+			max_sliders = 20; // *HACK this should be LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES;
 			break;
 		case LLEnvKey::SCOPE_REGION:
-			max_sliders = LLWLPacketScrubber::MAX_REGION_KEY_FRAMES;
+			max_sliders = 12; // *HACK this should be LLWLPacketScrubber::MAX_REGION_KEY_FRAMES;
 			break;
 		default:
 			max_sliders = (S32)kSldr->getMaxValue();
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index b1f7e88d33..bb5afeb70b 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -355,8 +355,6 @@ public:
 	// If visible from mainland, allowed agent and allowed groups
 	// are ignored, so must disable UI.
 	void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban);
-
-	virtual void close(bool app_quitting = false);
 protected:
 	virtual BOOL sendUpdate();
 	// confirmation dialog callback
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp
index 4bc8523d0a..85bb20a1db 100644
--- a/indra/newview/llfloaterwater.cpp
+++ b/indra/newview/llfloaterwater.cpp
@@ -59,6 +59,8 @@
 
 #undef max
 
+LLFloaterWater* LLFloaterWater::sWater = NULL;
+
 std::set<std::string> LLFloaterWater::sDefaultPresets;
 LLEnvKey::EScope LLFloaterWater::sScope;
 std::string LLFloaterWater::sOriginalTitle;
diff --git a/indra/newview/llfloaterwater.h b/indra/newview/llfloaterwater.h
index 8b3915bfe9..3bdec389f3 100644
--- a/indra/newview/llfloaterwater.h
+++ b/indra/newview/llfloaterwater.h
@@ -107,8 +107,8 @@ public:
 
 private:
 	static std::set<std::string> sDefaultPresets;
-        static LLEnvKey::EScope sScope;
-        static std::string sOriginalTitle;
+	static LLEnvKey::EScope sScope;
+	static std::string sOriginalTitle;
 
 	static LLFloaterWater* sWater;
 };
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 61a69bdde1..5d705f1e0c 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -78,11 +78,6 @@ LLWaterParamManager::~LLWaterParamManager()
 {
 }
 
-LLWaterParamManager::cleanupClass()
-{
-	// TODO: what needs to be cleaned up?
-}
-
 void LLWaterParamManager::loadAllPresets(const std::string& file_name)
 {
 	std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index d5919bbf68..3fe0f0d861 100644
--- a/indra/newview/llwaterparammanager.h
+++ b/indra/newview/llwaterparammanager.h
@@ -235,9 +235,6 @@ public:
 	/// Update shader uniforms that have changed.
 	void updateShaderUniforms(LLGLSLShader * shader);
 
-	// Cleanup of global data that's only inited once per class.
-	static void cleanupClass();
-
 	/// add a param to the list
 	bool addParamSet(const std::string& name, LLWaterParamSet& param);
 
-- 
cgit v1.2.3