diff --git a/doc/contributions.txt b/doc/contributions.txt
index 0c360e7f84de0a8ed6e1823bef38bbbb99a33936..ca5c11bc484f47146083312a8de571198bb1a0e6 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -85,6 +85,7 @@ Eddy Stryker
 	VWR-15
 	VWR-23
 	VWR-1468
+	VWR-1475
 EponymousDylan Ra
 	VWR-1289
 	VWR-1465
@@ -156,12 +157,14 @@ march Korda
 	SVC-1020
 Matthew Dowd
 	VWR-1344
+	VWR-1651
 	VWR-1736
 	VWR-1737
 	VWR-1761
 McCabe Maxsted
 	VWR-1318
 Michelle2 Zenovka
+	VWR-2652
 	VWR-2834
 Mr Greggan
 	VWR-445
@@ -255,9 +258,11 @@ Renault Clio
 Ryozu Kojima
 	VWR-287
 Seg Baphomet
+	VWR-1475
 	VWR-1525
 	VWR-1585
 	VWR-1586
+	VWR-3206
 SignpostMarv Martin
 	VWR-153
 	VWR-154
@@ -319,3 +324,5 @@ Zi Ree
 Zipherius Turas
 	VWR-76
 	VWR-77
+Kerutsen Sellery
+        VWR-1350
diff --git a/indra/lib/python/indra/base/metrics.py b/indra/lib/python/indra/base/metrics.py
new file mode 100644
index 0000000000000000000000000000000000000000..751757d5b0551e3b3e384e3d043409229c04b6e9
--- /dev/null
+++ b/indra/lib/python/indra/base/metrics.py
@@ -0,0 +1,42 @@
+"""\
+@file metrics.py
+@author Phoenix
+@date 2007-11-27
+@brief simple interface for logging metrics
+
+$LicenseInfo:firstyear=2007&license=mit$
+
+Copyright (c) 2007, Linden Research, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+$/LicenseInfo$
+"""
+
+import sys
+from indra.base import llsd
+
+def log(location, stats, file=None):
+    "Write a standard llmetrics log"
+    metrics = {'location':location, 'stats':stats}
+    if file is None:
+        # do this check here in case sys.stdout changes at some
+        # point. as a default parameter, it will never be
+        # re-evaluated.
+        file = sys.stdout
+    print >>file, "LLMETRICS:", llsd.format_notation(metrics)
diff --git a/indra/llcommon/llkeythrottle.h b/indra/llcommon/llkeythrottle.h
index 708f23f3b1fbcb7f4abe604704a2ecfc8f7085f2..6ed1f26599f363cec0b7646e6703b79b325f7f35 100644
--- a/indra/llcommon/llkeythrottle.h
+++ b/indra/llcommon/llkeythrottle.h
@@ -21,11 +21,16 @@
 #include <map>
 
 
+// forward declaration so LLKeyThrottleImpl can befriend it
+template <class T> class LLKeyThrottle;
+
+
 // Implementation utility class - use LLKeyThrottle, not this
 template <class T>
 class LLKeyThrottleImpl
 {
-public:
+	friend class LLKeyThrottle<T>;
+protected:
 	struct Entry {
 		U32		count;
 		BOOL	blocked;
@@ -47,7 +52,9 @@ class LLKeyThrottleImpl
 		// currMap started counting at this time
 		// prevMap covers the previous interval
 	
-	LLKeyThrottleImpl() : prevMap(0), currMap(0) { }
+	LLKeyThrottleImpl() : prevMap(0), currMap(0),
+			      countLimit(0), interval_usec(0),
+			      start_usec(0) { };
 
 	static U64 getTime()
 	{
diff --git a/indra/llcommon/llsecondlifeurls.cpp b/indra/llcommon/llsecondlifeurls.cpp
index 4417b0972331746d1c237e19a4ebe26d32fa4a51..bf09453c165311bf56a342a86261eb34930f8540 100644
--- a/indra/llcommon/llsecondlifeurls.cpp
+++ b/indra/llcommon/llsecondlifeurls.cpp
@@ -62,6 +62,9 @@ const char AMD_AGP_URL[] =
 const char VIA_URL[] = 
 	"http://secondlife.com/support/";
 
+const char SUPPORT_URL[] = 
+    "http://secondlife.com/support/";
+
 const char INTEL_CHIPSET_URL[] = 
 	"http://secondlife.com/support/";
 
diff --git a/indra/llcommon/llsecondlifeurls.h b/indra/llcommon/llsecondlifeurls.h
index 0eb3d647cb0187f5d5fb4e854a5ec320931ee87d..b8d8aa2402d6a560487d5eb497e8cde9ab90961d 100644
--- a/indra/llcommon/llsecondlifeurls.h
+++ b/indra/llcommon/llsecondlifeurls.h
@@ -57,6 +57,9 @@ extern const char DIRECTX_9_URL[];
 // Out of date VIA chipset
 extern const char VIA_URL[];
 
+// Support URL
+extern const char SUPPORT_URL[];
+
 // Linden Blogs page
 extern const char BLOGS_URL[];
 
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp
index deeee3173dfd1b5e251d10a1f5b91120067e554d..0f6ddd9bc6bfc1851a547423a2767a9677d6cd89 100644
--- a/indra/llcommon/lluri.cpp
+++ b/indra/llcommon/lluri.cpp
@@ -43,28 +43,68 @@
 // system includes
 #include <boost/tokenizer.hpp>
 
+void encode_character(std::ostream& ostr, std::string::value_type val)
+{
+	ostr << "%" << std::uppercase << std::hex << std::setw(2) << std::setfill('0') 
+	     // VWR-4010 Cannot cast to U32 because sign-extension on 
+	     // chars > 128 will result in FFFFFFC3 instead of F3.
+	     << static_cast<S32>(static_cast<U8>(c));
+}
+
 // static
-std::string LLURI::escape(const std::string& str, const std::string & allowed)
+std::string LLURI::escape(
+	const std::string& str,
+	const std::string& allowed,
+	bool is_allowed_sorted)
 {
-	std::ostringstream ostr;
+	// *NOTE: This size determination feels like a good value to
+	// me. If someone wante to come up with a more precise heuristic
+	// with some data to back up the assertion that 'sort is good'
+	// then feel free to change this test a bit.
+	if(!is_allowed_sorted && (str.size() > 2 * allowed.size()))
+	{
+		// if it's already sorted, or if the url is quite long, we
+		// want to optimize this process.
+		std::string sorted_allowed(allowed);
+		std::sort(sorted_allowed.begin(), sorted_allowed.end());
+		return escape(str, sorted_allowed, true);
+	}
 
+	std::ostringstream ostr;
 	std::string::const_iterator it = str.begin();
 	std::string::const_iterator end = str.end();
-	for(; it != end; ++it)
+	std::string::value_type c;
+	if(is_allowed_sorted)
 	{
-		std::string::value_type c = *it;
-		if(allowed.find(c) == std::string::npos)
-		  {
-		    ostr << "%"
-			 << std::uppercase << std::hex << std::setw(2) << std::setfill('0')
-			 // VWR-4010 Cannot cast to U32 because sign-extension on 
-			 // chars > 128 will result in FFFFFFC3 instead of F3.
-			 << static_cast<S32>(static_cast<U8>(c));
-		  }
-		else
-		  {
-		    ostr << c;
-		  }
+		std::string::const_iterator allowed_begin(allowed.begin());
+		std::string::const_iterator allowed_end(allowed.end());
+		for(; it != end; ++it)
+		{
+			c = *it;
+			if(std::binary_search(allowed_begin, allowed_end, c))
+			{
+				ostr << c;
+			}
+			else
+			{
+				encode_character(ostr, c);
+			}
+		}
+	}
+	else
+	{
+		for(; it != end; ++it)
+		{
+			c = *it;
+			if(allowed.find(c) == std::string::npos)
+			{
+				encode_character(ostr, c);
+			}
+			else
+			{
+				ostr << c;
+			}
+		}
 	}
 	return ostr.str();
 }
@@ -121,11 +161,18 @@ namespace
 		{ return LLURI::escape(s, unreserved() + ":@!$'()*+,="); }	// sub_delims - "&;" + ":@"
 }
 
-// TODO: USE CURL!! After http textures gets merged everywhere.
+// *TODO: Consider using curl. After http textures gets merged everywhere.
 // static
 std::string LLURI::escape(const std::string& str)
 {
-	return escape(str,unreserved()  + ":@!$'()*+,=");
+	static std::string default_allowed(unreserved() + ":@!$'()*+,=/?&#;");
+	static bool initialized = false;
+	if(!initialized)
+	{
+		std::sort(default_allowed.begin(), default_allowed.end());
+		initialized = true;
+	}
+	return escape(str, default_allowed, true);
 }
 
 LLURI::LLURI()
diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index bfe673c2f749a933b743a7961c37362119b29150..953e6527043287a272c25f2469f7db64eaee0d42 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -125,12 +125,52 @@ class LLURI
 
 	/** @name Escaping Utilities */
 	//@{
-	// Escape a string by urlencoding all the characters that aren't
-	// in the allowed string.
+	/**
+	 * @brief Escape a raw url with a reasonable set of allowed characters.
+	 *
+	 * The default set was chosen to match HTTP urls and general
+     *  guidelines for naming resources. Passing in a raw url does not
+     *  produce well defined results because you really need to know
+     *  which segments are path parts because path parts are supposed
+     *  to be escaped individually. The default set chosen is:
+	 *
+	 *  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+	 *  0123456789
+	 *  -._~
+	 *  :@!$'()*+,=/?&#;
+	 *
+	 * *NOTE: This API is basically broken because it does not
+     *  allow you to specify significant path characters. For example,
+     *  if the filename actually contained a /, then you cannot use
+     *  this function to generate the serialized url for that
+     *  resource.
+	 *
+	 * @param str The raw URI to escape.
+	 * @return Returns the escaped uri or an empty string.
+	 */
 	static std::string escape(const std::string& str);
+
+	/**
+	 * @brief Escape a string with a specified set of allowed characters.
+	 *
+	 * Escape a string by urlencoding all the characters that aren't
+	 * in the allowed string.
+	 * @param str The raw URI to escape.
+	 * @param allowed Character array of allowed characters
+	 * @param is_allowed_sorted Optimization hint if allowed array is sorted.
+	 * @return Returns the escaped uri or an empty string.
+	 */
 	static std::string escape(
 		const std::string& str,
-		const std::string & allowed); 
+		const std::string& allowed,
+		bool is_allowed_sorted = false);
+
+	/**
+	 * @brief unescape an escaped URI string.
+	 *
+	 * @param str The escped URI to unescape.
+	 * @return Returns the unescaped uri or an empty string.
+	 */
 	static std::string unescape(const std::string& str);
 	//@}
 
diff --git a/indra/llcommon/u64.cpp b/indra/llcommon/u64.cpp
index f2efef1c0196e56751c3dc8ceb6f9b63d4bc30ae..f3422770aeb43eabe729969c4d9837c1d1daf815 100644
--- a/indra/llcommon/u64.cpp
+++ b/indra/llcommon/u64.cpp
@@ -107,8 +107,8 @@ F64 U64_to_F64(const U64 value)
 U64	llstrtou64(const char* str, char** end, S32 base)
 {
 #ifdef LL_WINDOWS
-				return _strtoui64(str,end,base);
+	return _strtoui64(str,end,base);
 #else
-				return strtoull(str,end,base);
+	return strtoull(str,end,base);
 #endif
 }
diff --git a/indra/llcommon/u64.h b/indra/llcommon/u64.h
index ad93ebffe7d64dfbb0b3e68ff622554d6e188769..f4580513bcef2ff826b1320d705f9e8836bae5a7 100644
--- a/indra/llcommon/u64.h
+++ b/indra/llcommon/u64.h
@@ -32,11 +32,41 @@
 #ifndef LL_U64_H
 #define LL_U64_H
 
+/**
+ * @brief Forgivingly parse a null terminated character array.
+ *
+ * @param str The string to parse.
+ * @return Returns the first U64 value found in the string or 0 on failure.
+ */
 U64 str_to_U64(const char* str);
+
+/**
+ * @brief Given a U64 value, return a printable representation.
+ *
+ * The client of this function is expected to provide an allocated
+ * buffer. The function then snprintf() into that buffer, so providing
+ * NULL has undefined behavior. Providing a buffer which is too small
+ * will truncate the printable value, so usually you want to declare
+ * the buffer:
+ *
+ *  char result[U64_BUF];
+ *  std::cout << "value: " << U64_to_str(value, result, U64_BUF);
+ *
+ * @param value The U64 to turn into a printable character array.
+ * @param result The buffer to use
+ * @param result_size The size of the buffer allocated. Use U64_BUF.
+ * @return Returns the result pointer.
+ */
 char* U64_to_str(U64 value, char* result, S32 result_size);
 
+/**
+ * @brief Convert a U64 to the closest F64 value.
+ */
 F64 U64_to_F64(const U64 value);
 
+/**
+ * @brief Helper function to wrap strtoull() which is not available on windows.
+ */
 U64 llstrtou64(const char* str, char** end, S32 base);
 
 #endif
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index 7a323c83541bc2f9f59c849464593a8b54685006..d7be11887597b57f68d3326355bbe7823a842a84 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -40,8 +40,10 @@
 
 const char* fallbackEngineInfoLLImageJ2CImpl()
 {
-	return (std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ")
-		+ opj_version()).c_str();
+	static std::string version_string =
+		std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ")
+		+ opj_version();
+	return version_string.c_str();
 }
 
 LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl()
@@ -183,15 +185,25 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
 	for (S32 comp = first_channel, dest=0; comp < first_channel + channels;
 		comp++, dest++)
 	{
-		S32 offset = dest;
-		for (S32 y = (height - 1); y >= 0; y--)
+		if (image->comps[comp].data)
 		{
-			for (S32 x = 0; x < width; x++)
+			S32 offset = dest;
+			for (S32 y = (height - 1); y >= 0; y--)
 			{
-				rawp[offset] = image->comps[comp].data[y*comp_width + x];
-				offset += channels;
+				for (S32 x = 0; x < width; x++)
+				{
+					rawp[offset] = image->comps[comp].data[y*comp_width + x];
+					offset += channels;
+				}
 			}
 		}
+		else // Some rare OpenJPEG versions have this bug.
+		{
+			fprintf(stderr, "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)\n");
+			opj_image_destroy(image);
+
+			return TRUE; // done
+		}
 	}
 
 	/* free image data structure */
@@ -219,10 +231,29 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
 
 	/* set encoding parameters to default values */
 	opj_set_default_encoder_parameters(&parameters);
-	parameters.tcp_rates[0] = 0;
-	parameters.tcp_numlayers++;
-	parameters.cp_disto_alloc = 1;
 	parameters.cod_format = 0;
+	parameters.cp_disto_alloc = 1;
+
+	if (reversible)
+	{
+		parameters.tcp_numlayers = 1;
+		parameters.tcp_rates[0] = 0.0f;
+	}
+	else
+	{
+		parameters.tcp_numlayers = 5;
+                parameters.tcp_rates[0] = 1920.0f;
+                parameters.tcp_rates[1] = 480.0f;
+                parameters.tcp_rates[2] = 120.0f;
+                parameters.tcp_rates[3] = 30.0f;
+		parameters.tcp_rates[4] = 10.0f;
+		parameters.irreversible = 1;
+		if (raw_image.getComponents() >= 3)
+		{
+			parameters.tcp_mct = 1;
+		}
+	}
+
 	if (!comment_text)
 	{
 		parameters.cp_comment = "";
@@ -298,7 +329,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
 	cio = opj_cio_open((opj_common_ptr)cinfo, NULL, 0);
 
 	/* encode the image */
-	bool bSuccess = opj_encode(cinfo, cio, image, parameters.index);
+	bool bSuccess = opj_encode(cinfo, cio, image, NULL);
 	if (!bSuccess)
 	{
 		opj_cio_close(cio);
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 5efb8bed0633e958120b7ae5734ef56d3c2cb417..85d8f4b5c21073602d8fad99a947320bcb2c9cfa 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -233,7 +233,7 @@ LLColor3 LLKeywords::readColor( const LLString& s )
 
 // Walk through a string, applying the rules specified by the keyword token list and
 // create a list of color segments.
-void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWString& wtext)
+void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWString& wtext, const LLColor4 &defaultColor)
 {
 	std::for_each(seg_list->begin(), seg_list->end(), DeletePointer());
 	seg_list->clear();
@@ -245,7 +245,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
 	
 	S32 text_len = wtext.size();
 
-	seg_list->push_back( new LLTextSegment( LLColor3(0,0,0), 0, text_len ) );
+	seg_list->push_back( new LLTextSegment( LLColor3(defaultColor), 0, text_len ) ); 
 
 	const llwchar* base = wtext.c_str();
 	const llwchar* cur = base;
@@ -299,7 +299,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
 						//llinfos << "Seg: [" << (char*)LLString( base, seg_start, seg_end-seg_start) << "]" << llendl;
 						LLTextSegment* text_segment = new LLTextSegment( cur_token->getColor(), seg_start, seg_end );
 						text_segment->setToken( cur_token );
-						insertSegment( seg_list, text_segment, text_len);
+						insertSegment( seg_list, text_segment, text_len, defaultColor);
 						line_done = TRUE; // to break out of second loop.
 						break;
 					}
@@ -409,7 +409,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
 					//llinfos << "Seg: [" << (char*)LLString( base, seg_start, seg_end-seg_start ) << "]" << llendl;
 					LLTextSegment* text_segment = new LLTextSegment( cur_delimiter->getColor(), seg_start, seg_end );
 					text_segment->setToken( cur_delimiter );
-					insertSegment( seg_list, text_segment, text_len);
+					insertSegment( seg_list, text_segment, text_len, defaultColor);
 
 					// Note: we don't increment cur, since the end of one delimited seg may be immediately
 					// followed by the start of another one.
@@ -442,7 +442,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
 
 						LLTextSegment* text_segment = new LLTextSegment( cur_token->getColor(), seg_start, seg_end );
 						text_segment->setToken( cur_token );
-						insertSegment( seg_list, text_segment, text_len);
+						insertSegment( seg_list, text_segment, text_len, defaultColor);
 					}
 					cur += seg_len; 
 					continue;
@@ -457,7 +457,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
 	}
 }
 
-void LLKeywords::insertSegment(std::vector<LLTextSegment*>* seg_list, LLTextSegment* new_segment, S32 text_len )
+void LLKeywords::insertSegment(std::vector<LLTextSegment*>* seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor )
 {
 	LLTextSegment* last = seg_list->back();
 	S32 new_seg_end = new_segment->getEnd();
@@ -475,7 +475,7 @@ void LLKeywords::insertSegment(std::vector<LLTextSegment*>* seg_list, LLTextSegm
 
 	if( new_seg_end < text_len )
 	{
-		seg_list->push_back( new LLTextSegment( LLColor3(0,0,0), new_seg_end, text_len ) );
+		seg_list->push_back( new LLTextSegment( defaultColor, new_seg_end, text_len ) );
 	}
 }
 
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index 4309f16cae08b446b8c6cb0bae1e48c0ed41e5b8..d279d2e627d52c0ecd7b766736f9e087831527c0 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -84,7 +84,7 @@ class LLKeywords
 	BOOL		loadFromFile(const LLString& filename);
 	BOOL		isLoaded()	{ return mLoaded; }
 
-	void		findSegments(std::vector<LLTextSegment *> *seg_list, const LLWString& text );
+	void		findSegments(std::vector<LLTextSegment *> *seg_list, const LLWString& text, const LLColor4 &defaultColor );
 
 #ifdef _DEBUG
 	void		dump();
@@ -98,7 +98,7 @@ class LLKeywords
 
 private:
 	LLColor3	readColor(const LLString& s);
-	void		insertSegment(std::vector<LLTextSegment *> *seg_list, LLTextSegment* new_segment, S32 text_len);
+	void		insertSegment(std::vector<LLTextSegment *> *seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor);
 
 private:
 	BOOL						 mLoaded;
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 8b9353eb8e10ab69608e13701df9795ce3a6c6a5..7cd164ec1425db0a19911e141f1cb3dcf1924a47 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -302,6 +302,7 @@ LLTextEditor::LLTextEditor(
 	mOnScrollEndData( NULL ),
 	mCursorColor(		LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
 	mFgColor(			LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
+	mDefaultColor(		LLUI::sColorsGroup->getColor( "TextDefaultColor" ) ),
 	mReadOnlyFgColor(	LLUI::sColorsGroup->getColor( "TextFgReadOnlyColor" ) ),
 	mWriteableBgColor(	LLUI::sColorsGroup->getColor( "TextBgWriteableColor" ) ),
 	mReadOnlyBgColor(	LLUI::sColorsGroup->getColor( "TextBgReadOnlyColor" ) ),
@@ -3799,7 +3800,7 @@ void LLTextEditor::loadKeywords(const LLString& filename,
 			mKeywords.addToken(LLKeywordToken::WORD, name.c_str(), color, tooltips.get(i) );
 		}
 
-		mKeywords.findSegments( &mSegments, mWText );
+		mKeywords.findSegments( &mSegments, mWText, mDefaultColor );
 
 		llassert( mSegments.front()->getStart() == 0 );
 		llassert( mSegments.back()->getEnd() == getLength() );
@@ -3811,7 +3812,7 @@ void LLTextEditor::updateSegments()
 	if (mKeywords.isLoaded())
 	{
 		// HACK:  No non-ascii keywords for now
-		mKeywords.findSegments(&mSegments, mWText);
+		mKeywords.findSegments(&mSegments, mWText, mDefaultColor);
 	}
 	else if (mAllowEmbeddedItems)
 	{
@@ -4192,6 +4193,7 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const
 
 	addColorXML(node, mCursorColor, "cursor_color", "TextCursorColor");
 	addColorXML(node, mFgColor, "text_color", "TextFgColor");
+	addColorXML(node, mDefaultColor, "text_default_color", "TextDefaultColor");
 	addColorXML(node, mReadOnlyFgColor, "text_readonly_color", "TextFgReadOnlyColor");
 	addColorXML(node, mReadOnlyBgColor, "bg_readonly_color", "TextBgReadOnlyColor");
 	addColorXML(node, mWriteableBgColor, "bg_writeable_color", "TextBgWriteableColor");
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index a2ce0d2c471c0841832562573346da8c47ff9576..838154655c1a3723caa5480e434ca6ff1bfe4d9e 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -187,6 +187,7 @@ class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
 
 	void 			setCursorColor(const LLColor4& c)			{ mCursorColor = c; }
 	void 			setFgColor( const LLColor4& c )				{ mFgColor = c; }
+	void			setTextDefaultColor( const LLColor4& c )				{ mDefaultColor = c; }
 	void 			setReadOnlyFgColor( const LLColor4& c )		{ mReadOnlyFgColor = c; }
 	void 			setWriteableBgColor( const LLColor4& c )	{ mWriteableBgColor = c; }
 	void 			setReadOnlyBgColor( const LLColor4& c )		{ mReadOnlyBgColor = c; }
@@ -429,6 +430,7 @@ class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
 	LLColor4		mCursorColor;
 
 	LLColor4		mFgColor;
+	LLColor4		mDefaultColor;
 	LLColor4		mReadOnlyFgColor;
 	LLColor4		mWriteableBgColor;
 	LLColor4		mReadOnlyBgColor;
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 91d59a2c6b2224f602b3ae8532efa6b2a0ae3a72..4b9bf655b5ff77c5d1fdcd5ecb394b3b817aa210 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -119,6 +119,7 @@ NVIDIA GeForce Go 6800			.*NVIDIA.*GeForce Go 68.*				2
 NVIDIA GeForce Go 7300			.*NVIDIA.*GeForce Go 73.*				3
 NVIDIA GeForce Go 7400			.*NVIDIA.*GeForce Go 74.*				3
 NVIDIA GeForce Go 7600			.*NVIDIA.*GeForce Go 76.*				3
+NVIDIA GeForce Go 7700			.*NVIDIA.*GeForce Go 77.*				3
 NVIDIA GeForce Go 7800			.*NVIDIA.*GeForce Go 78.*				3
 NVIDIA GeForce Go 7900			.*NVIDIA.*GeForce Go 79.*				3
 NVIDIA GeForce Go 6				.*GeForce Go 6.*						2
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a692ef6a3e8d43a800510f7e69b16ae3e28c176b..f406d61a9eed0126183d5f02ff44d1fb855fa1e1 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -305,7 +305,7 @@ LLAgent::LLAgent()
 
 	mbAlwaysRun(FALSE),
 	mShowAvatar(TRUE),
-
+	
 	mCameraAnimating( FALSE ),
 	mAnimationCameraStartGlobal(),
 	mAnimationFocusStartGlobal(),
@@ -410,6 +410,8 @@ LLAgent::LLAgent()
 	mCameraUpVector = LLVector3::z_axis;// default is straight up 
 	mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
 	//end ventrella
+
+	mCustomAnim = FALSE ;
 }
 
 // Requires gSavedSettings to be initialized.
@@ -2861,8 +2863,14 @@ void LLAgent::endAnimationUpdateUI()
 
 		if (mAvatarObject)
 		{
-			sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
-			sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+			if(mCustomAnim)
+			{
+				sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
+				sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+
+				mCustomAnim = FALSE ;
+			}
+			
 		}
 		setLookAt(LOOKAT_TARGET_CLEAR);
 	}
@@ -4188,7 +4196,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate)
 //-----------------------------------------------------------------------------
 // changeCameraToCustomizeAvatar()
 //-----------------------------------------------------------------------------
-void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
+void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate)
 {
 	setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up
 	gViewerWindow->getWindow()->resetBusyCount();
@@ -4203,16 +4211,16 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
 	gSavedSettings.setBOOL("ThirdPersonBtnState", FALSE);
 	gSavedSettings.setBOOL("BuildBtnState", FALSE);
 
-	if (animate)
+	if (camera_animate)
 	{
 		startCameraAnimation();
 	}
 
 	// Remove any pitch from the avatar
-	LLVector3 at = mFrameAgent.getAtAxis();
-	at.mV[VZ] = 0.f;
-	at.normVec();
-	gAgent.resetAxes(at);
+	//LLVector3 at = mFrameAgent.getAtAxis();
+	//at.mV[VZ] = 0.f;
+	//at.normVec();
+	//gAgent.resetAxes(at);
 
 	if( mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR )
 	{
@@ -4231,22 +4239,31 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
 		LLVOAvatar::onCustomizeStart();
 	}
 
-	if (animate && !mAvatarObject.isNull())
+	if (!mAvatarObject.isNull())
 	{
-		sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
-		mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
-		LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
-
-		if (turn_motion)
+		if(avatar_animate)
 		{
-			mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+				// Remove any pitch from the avatar
+			LLVector3 at = mFrameAgent.getAtAxis();
+			at.mV[VZ] = 0.f;
+			at.normVec();
+			gAgent.resetAxes(at);
 
-		}
-		else
-		{
-			mAnimationDuration = gSavedSettings.getF32("ZoomTime");
-		}
+			sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
+			mCustomAnim = TRUE ;
+			mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
+			LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
+
+			if (turn_motion)
+			{
+				mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
 
+			}
+			else
+			{
+				mAnimationDuration = gSavedSettings.getF32("ZoomTime");
+			}
+		}
 
 
 
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4e9b882250085acd1d0f9752a7416e1a7c6b55ba..5e5a58cffbaa57214a6d621257d0dd3d86e1e7fd 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -183,7 +183,7 @@ class LLAgent : public LLObservable
 	void			changeCameraToDefault();
 	void			changeCameraToMouselook(BOOL animate = TRUE);
 	void			changeCameraToThirdPerson(BOOL animate = TRUE);
-	void			changeCameraToCustomizeAvatar(BOOL animate = TRUE);			// trigger transition animation
+	void			changeCameraToCustomizeAvatar(BOOL avatar_animate = TRUE, BOOL camera_animate = TRUE);			// trigger transition animation
 	// Ventrella
 	void			changeCameraToFollow(BOOL animate = TRUE);
 	//end Ventrella
@@ -735,6 +735,7 @@ class LLAgent : public LLObservable
 	ECameraMode		mLastCameraMode;
 	BOOL			mViewsPushed;					// keep track of whether or not we have pushed views.
 
+	BOOL            mCustomAnim ;                   //current animation is ANIM_AGENT_CUSTOMIZE ?
 	BOOL			mbAlwaysRun;					// should the avatar run rather than walk
 	BOOL			mShowAvatar;					// should we render the avatar?
 	BOOL			mCameraAnimating;				// camera is transitioning from one mode to another
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index be31d2481e0de9dc5c484f7a542ae7f504214ff4..96d9670ac95e5edbe516e38e75b3651e62a17498 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1263,7 +1263,7 @@ bool LLAppViewer::init()
 	#if LL_WINDOWS && LL_LCD_COMPILE
 		// start up an LCD window on a logitech keyboard, if there is one
 		HINSTANCE hInstance = GetModuleHandle(NULL);
-		gLcdScreen = new llLCD(hInstance);
+		gLcdScreen = new LLLCD(hInstance);
 		CreateLCDDebugWindows();
 	#endif
 
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index b5570b1198a8f484f220fd23797bf332af5572be..17593766b9c6bae3b747ce17ce0275632d87b854 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1036,12 +1036,15 @@ F32 LLDrawable::getVisibilityRadius() const
 	}
 	else if (isLight())
 	{
-		return llmax(getRadius(), getVOVolume()->getLightRadius());
-	}
-	else
-	{
-		return getRadius();
+		const LLVOVolume *vov = getVOVolume();
+		if (vov)
+		{
+			return llmax(getRadius(), vov->getLightRadius());
+		} else {
+			// llwarns ?
+		}
 	}
+	return getRadius();
 }
 
 void LLDrawable::updateUVMinMax()
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 25a88e6e7cfed74dac92e6dd02cf20efe07ecf0d..b7b3cef76baefe7770a9dcb6cbe20b730990ff48 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -79,7 +79,7 @@
 #ifndef LL_LOGITECH_LCD_H
 #include "lllogitechlcd.h"
 #endif
-extern llLCD	*gLcdScreen; 
+extern LLLCD	*gLcdScreen; 
 #endif
 
 const S32 PREF_BORDER = 4;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index eaf7832eabbe8c69c35f954929670b4857214d7f..ca0314cce1e59e6f09a6b471f8bdccc214dfe795 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2378,7 +2378,12 @@ BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
 	}
 	else if (name == "estate_manager_name_list")
 	{
-		btn_name = "remove_estate_manager_btn";
+		//ONLY OWNER CAN ADD /DELET ESTATE MANAGER
+		LLViewerRegion* region = gAgent.getRegion();
+		if (region && (region->getOwner() == gAgent.getID()))
+		{
+			btn_name = "remove_estate_manager_btn";
+		}
 	}
 
 	// enable the remove button if something is selected
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d8841afe22416514e2f5329b8c21495394de5973..0c8d17e1aa1d25bc8b6269a6bf3d199277a886b2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -211,6 +211,45 @@ void LLInvFVBridge::showProperties()
 
 void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch)
 {
+	// Deactivate gestures when moving them into Trash
+	LLInvFVBridge* bridge;
+	LLInventoryModel* model = mInventoryPanel->getModel();
+	LLViewerInventoryItem* item = NULL;
+	LLViewerInventoryCategory* cat = NULL;
+	LLInventoryModel::cat_array_t	descendent_categories;
+	LLInventoryModel::item_array_t	descendent_items;
+	S32 count = batch.count();
+	S32 i,j;
+	for(i = 0; i < count; ++i)
+	{	
+		bridge = (LLInvFVBridge*)(batch.get(i));
+		if(!bridge || !bridge->isItemRemovable()) continue;
+		item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
+		if (item)
+		{
+			if(LLAssetType::AT_GESTURE == item->getType())
+			{
+				gGestureManager.deactivateGesture(item->getUUID());
+			}
+		}
+	}
+	for(i = 0; i < count; ++i)
+	{		
+		bridge = (LLInvFVBridge*)(batch.get(i));
+		if(!bridge || !bridge->isItemRemovable()) continue;
+		cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
+		if (cat)
+		{
+			gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE );
+			for (j=0; j<descendent_items.count(); j++)
+			{
+				if(LLAssetType::AT_GESTURE == descendent_items[j]->getType())
+				{
+					gGestureManager.deactivateGesture(descendent_items[j]->getUUID());
+				}
+			}
+		}
+	}
 	removeBatchNoCheck(batch);
 }
 
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 08c33cb7441732298c3749174d6715ba23aa8af8..4ee155931cc04e5ae18d836f3f806344ccd98075 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -290,6 +290,7 @@ void LLPanelAvatarSecondLife::updatePartnerName()
 			childSetTextArg("partner_edit", "[FIRST]", LLString(first));
 			childSetTextArg("partner_edit", "[LAST]", LLString(last));
 		}
+		childSetEnabled("partner_info", TRUE);
 	}
 }
 
@@ -394,6 +395,16 @@ void LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL(S32 option, void* userda
     LLWeb::loadURL("http://secondlife.com/partner");
 }
 
+// static
+void LLPanelAvatarSecondLife::onClickPartnerInfo(void *data)
+{
+	LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*) data;
+	if (self->mPartnerID.notNull())
+	{
+		LLFloaterAvatarInfo::showFromProfile(self->mPartnerID,
+											 self->getScreenRect());
+	}
+}
 
 //-----------------------------------------------------------------------------
 // LLPanelAvatarFirstLife()
@@ -421,6 +432,8 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
 	childSetEnabled("born", FALSE);
 	childSetEnabled("partner_edit", FALSE);
 	childSetAction("partner_help",onClickPartnerHelp,this);
+	childSetAction("partner_info", onClickPartnerInfo, this);
+	childSetEnabled("partner_info", mPartnerID.notNull());
 	
 	childSetAction("?",onClickPublishHelp,this);
 	BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index d4b935f09cf5800b30bf054769db119da95558a4..7d491c61436498905807b429a4bfc18cbb6622ed 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -119,6 +119,7 @@ class LLPanelAvatarSecondLife
 	static void onClickPublishHelp(void *userdata);
 	static void onClickPartnerHelp(void *userdata);
 	static void onClickPartnerHelpLoadURL(S32 option, void* userdata);
+	static void onClickPartnerInfo(void *userdata);
 
 	// Clear out the controls anticipating new network data.
 	void clearControls();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 21c97c2678ffe917d40f7b179cd582d3f1613af0..96af7d2bd2d1e3c5c796292dbb7fb7fbb478b53c 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -122,6 +122,7 @@
 #include "llpanelgroupnotices.h"
 #include "llpreview.h"
 #include "llpreviewscript.h"
+#include "llsecondlifeurls.h"
 #include "llselectmgr.h"
 #include "llsky.h"
 #include "llsrv.h"
@@ -153,6 +154,7 @@
 #include "llviewerwindow.h"
 #include "llvoavatar.h"
 #include "llvoclouds.h"
+#include "llweb.h"
 #include "llworld.h"
 #include "llworldmap.h"
 #include "llxfermanager.h"
@@ -166,7 +168,6 @@
 #include "llnamelistctrl.h"
 #include "llnamebox.h"
 #include "llnameeditor.h"
-#include "llurlsimstring.h"
 
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
@@ -2537,17 +2538,22 @@ void set_startup_status(const F32 frac, const char *string, const char* msg)
 
 void login_alert_status(S32 option, void* user_data)
 {
-	if (0 == option)
-	{
-		// OK button
-	}
-	else if (1 == option)
-	{
-		// Help button
-		std::string help_path;
-		help_path = gDirUtilp->getExpandedFilename(LL_PATH_HELP, "unable_to_connect.html");
-		load_url_local_file(help_path.c_str() );
-	}
+    // Buttons
+    switch( option )
+    {
+        case 0:     // OK
+            break;
+        case 1:     // Help
+            LLWeb::loadURL( SUPPORT_URL );
+            break;
+        case 2:     // Teleport
+            // Restart the login process, starting at our home locaton
+            LLURLSimString::setString(LLURLSimString::sLocationStringHome);
+            LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
+            break;
+        default:
+            llwarns << "Missing case in login_alert_status switch" << llendl;
+    }
 
 	LLPanelLogin::giveFocus();
 }
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 88a97ba71aa51f347281ddfbbe501671817169df..d0f3e66fa915c38e221f80011bd2441ab62d2151 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -48,9 +48,21 @@ class LLFrameTimer;
 class LLStatGraph;
 
 // used by LCD screen
-class cLLRegionDetails
+class LLRegionDetails
 {
 public:
+	LLRegionDetails()
+	{
+		mRegionName = LLString("Unknown");
+		mParcelName = "Unknown";
+		mAccesString = "Unknown";
+		mX = 0;
+		mY = 0;
+		mZ = 0;
+		mArea = 0;
+		mForSale = FALSE;
+		snprintf(mOwner, MAX_STRING, "Unknown");
+	}
 	LLString mRegionName;
 	char	*mParcelName;
 	char	*mAccesString;
@@ -100,7 +112,7 @@ class LLStatusBar
 	S32 getSquareMetersCredit() const;
 	S32 getSquareMetersCommitted() const;
 	S32 getSquareMetersLeft() const;
-	cLLRegionDetails mRegionDetails;
+	LLRegionDetails mRegionDetails;
 
 private:
 	// simple method to setup the part that holds the date
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 413b26309d280ed38d889ac46220d61fc44e2440..baff994bdd9accf4f838f7e3abe210a91aba409a 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1199,6 +1199,16 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
 		return TRUE;
 	}
 
+	// In case the inventory has not been updated (e.g. due to some recent operation
+	// causing a dirty inventory), stall the user while fetching the inventory.
+	if (hit_obj->isInventoryDirty())
+	{
+		hit_obj->fetchInventoryFromServer();
+		LLString::format_map_t args;
+		args["[ERROR_MESSAGE]"] = "Unable to add texture.\nPlease wait a few seconds and try again.";
+		gViewerWindow->alertXml("ErrorMessage", args);
+		return FALSE;
+	}
 	if (hit_obj->getInventoryItemByAsset(item->getAssetUUID()))
 	{
 		// if the asset is already in the object's inventory 
@@ -1259,6 +1269,8 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
 
 		// Add the texture item to the target object's inventory.
 		hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true);
+		// Force the object to update its refetch its inventory so it has this texture.
+		hit_obj->fetchInventoryFromServer();
  		// TODO: Check to see if adding the item was successful; if not, then
 		// we should return false here.
 	}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b5316d29e03515f2f460ed4edf356706a8936870..981605d1fa64f50c2383551d3ebcf498bc7bb875 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -47,7 +47,7 @@
 
 #include "llviewerregion.h"
 #include "llviewerobjectlist.h"
-
+#include "llpreviewgesture.h"
 ///----------------------------------------------------------------------------
 /// Local function declarations, constants, enums, and typedefs
 ///----------------------------------------------------------------------------
@@ -643,6 +643,26 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item)
 	gGestureManager.activateGesture(inv_item);
 }
 
+void CreateGestureCallback::fire(const LLUUID& inv_item)
+{
+	if (inv_item.isNull())
+		return;
+
+	gGestureManager.activateGesture(inv_item);
+	
+	LLViewerInventoryItem* item = gInventory.getItem(inv_item);
+	if (!item) return;
+    gInventory.updateItem(item);
+    gInventory.notifyObservers();
+
+	if(!LLPreview::show(inv_item,FALSE))
+	{
+		LLPreviewGesture* preview = LLPreviewGesture::show(LLString("Gesture: ") + item->getName(), inv_item,  LLUUID::null);
+		// Force to be entirely onscreen.
+		gFloaterView->adjustToFitScreen(preview, FALSE);
+	}
+}
+
 LLInventoryCallbackManager gInventoryCallbacks;
 
 void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 2aba7f454fdea4513e1023c7d8eb2b6d194e0f41..fd6928243b4b07c6ccb7ea07b3c057e3d85503df 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -223,6 +223,12 @@ class ActivateGestureCallback : public LLInventoryCallback
 	void fire(const LLUUID& inv_item);
 };
 
+class CreateGestureCallback : public LLInventoryCallback
+{
+public:
+	void fire(const LLUUID& inv_item);
+};
+
 // misc functions
 //void inventory_reliable_callback(void**, S32 status);
 
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 54396d083e41f4a8f7badc4786a2080f6ed8a2ae..4c7229b0d9fda5a6f1d089c77c4082e2b0963c46 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5272,7 +5272,7 @@ class LLShowFloater : public view_listener_t
 		{
 			if (gAgent.getWearablesLoaded())
 			{
-				gAgent.changeCameraToCustomizeAvatar();
+				gAgent.changeCameraToCustomizeAvatar(gSavedSettings.getBOOL("AppearanceCameraMovement"));
 			}
 		}
 		else if (floater_name == "friends")
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dd786da4d3458622492ce6cc3e1aaf469ef5b2a4..2e799039ab334caa91e703837ddb12c10908e964 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -284,6 +284,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
 
 void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
 {
+	if(!gWorldp) return;
 	LLViewerRegion *regionp = gWorldp->getRegion(mesgsys->getSender());
 
 	if (!regionp || gNoRender)
@@ -2609,6 +2610,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
 
 	// Viewer trusts the simulator.
 	gMessageSystem->enableCircuit(sim_host, TRUE);
+	if(!gWorldp) return;
 	LLViewerRegion* regionp =  gWorldp->addRegion(region_handle, sim_host);
 
 /*
@@ -2716,6 +2718,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
 
 	F32 x, y;
 	from_region_handle(region_handle, &x, &y);
+	if(!gWorldp) return;
 	LLViewerRegion* regionp = gWorldp->getRegionFromHandle(region_handle);
 	if (!regionp)
 	{
@@ -2889,6 +2892,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
 
 	send_complete_agent_movement(sim_host);
 
+	if(!gWorldp) return;
 	LLViewerRegion* regionp = gWorldp->addRegion(region_handle, sim_host);
 	regionp->setSeedCapability(std::string(seedCap));
 }
@@ -3273,6 +3277,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
 	mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunDirection, sun_direction);
 	mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunAngVelocity, sun_ang_velocity);
 
+	if(!gWorldp) return;
 	gWorldp->setSpaceTimeUSec(space_time_usec);
 
 	//lldebugs << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f242b06d9b8c2a662583fba3e0808f4426825644..3a0daba8aab6ec1728146709826d9b5c972d18fb 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2343,8 +2343,19 @@ void LLViewerObject::requestInventory()
 		doInventoryCallback();
 	}
 	// throw away duplicate requests
-	else if (! mInventoryPending)
+	else
 	{
+		fetchInventoryFromServer();
+	}
+}
+
+void LLViewerObject::fetchInventoryFromServer()
+{
+	if (!mInventoryPending)
+	{
+		delete mInventory;
+		mInventory = NULL;
+		mInventoryDirty = FALSE;
 		LLMessageSystem* msg = gMessageSystem;
 		msg->newMessageFast(_PREHASH_RequestTaskInventory);
 		msg->nextBlockFast(_PREHASH_AgentData);
@@ -2631,6 +2642,9 @@ LLInventoryObject* LLViewerObject::getInventoryRoot()
 
 LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id)
 {
+	if (mInventoryDirty)
+		llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl;
+
 	LLViewerInventoryItem* rv = NULL;
 	if(mInventory)
 	{
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index b30bf7e1b87c95ea26373502f6c006a447cb23f1..f2ddc173a089f274ef3b47cd20f58a1a93fe15f1 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -373,6 +373,7 @@ class LLViewerObject : public LLPrimitive, public LLRefCount
 	BOOL isInventoryPending() { return mInventoryPending; }
 	void clearInventoryListeners();
 	void requestInventory();
+	void fetchInventoryFromServer();
 	static void processTaskInv(LLMessageSystem* msg, void** user_data);
 	void removeInventory(const LLUUID& item_id);
 
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 0ffa37525f82200be47a3205aeb005348c0ef024..2844cf9356ad8649c23d3cf510b608c44bf72d51 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -687,6 +687,7 @@ F32 LLViewerParcelMgr::agentDrawDistance() const
 
 BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
 {
+	if (!gWorldp) return FALSE;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
 	if (!region) return FALSE;
 
@@ -700,6 +701,7 @@ BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
 
 BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
 {
+	if (!gWorldp) return FALSE;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
 	if (!region) return FALSE;
 
@@ -713,6 +715,7 @@ BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
 
 BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
 {
+	if (!gWorldp) return FALSE;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
 	if (!region) return FALSE;
 
@@ -726,6 +729,7 @@ BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
 
 BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
 {
+	if (!gWorldp) return FALSE;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global );
 	if (!region) return FALSE;
 
@@ -769,6 +773,7 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
 
 BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
 {
+	if (!gWorldp) return FALSE;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(pos_global);
 	if (region != gAgent.getRegion())
 	{
@@ -826,7 +831,8 @@ void LLViewerParcelMgr::render()
 	{
 		// Rendering is done in agent-coordinates, so need to supply
 		// an appropriate offset to the render code.
-		LLViewerRegion *regionp = gWorldp->getRegionFromPosGlobal( mWestSouth );
+		if (!gWorldp) return;
+		LLViewerRegion* regionp = gWorldp->getRegionFromPosGlobal(mWestSouth);
 		if (!regionp) return;
 
 		renderHighlightSegments(mHighlightSegments, regionp);
@@ -858,6 +864,7 @@ void LLViewerParcelMgr::sendParcelAccessListRequest(U32 flags)
 		return;
 	}
 
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region) return;
 
@@ -893,6 +900,7 @@ void LLViewerParcelMgr::sendParcelDwellRequest()
 		return;
 	}
 
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region) return;
 
@@ -925,6 +933,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
 	east_north_region_check.mdV[VX] -= 0.5;
 	east_north_region_check.mdV[VY] -= 0.5;
 
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region)
 	{
@@ -981,7 +990,8 @@ void LLViewerParcelMgr::sendParcelGodForceToContent()
 		gViewerWindow->alertXml("CannotContentifyNothingSelected");
 		return;
 	}
-	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
+	if(!gWorldp) return;
+	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region)
 	{
 		gViewerWindow->alertXml("CannotContentifyNoRegion");
@@ -1006,6 +1016,7 @@ void LLViewerParcelMgr::sendParcelRelease()
 		return;
 	}
 
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region)
 	{
@@ -1068,6 +1079,7 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
 		return NULL;
 	}
 
+	if(!gWorldp) return NULL;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region)
 	{
@@ -1178,6 +1190,7 @@ void LLViewerParcelMgr::sendParcelDeed(const LLUUID& group_id)
 		gViewerWindow->alertXml("CannotDeedLandNoGroup");
 		return;
 	}
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region)
 	{
@@ -1245,7 +1258,7 @@ const LLString& LLViewerParcelMgr::getAgentParcelName() const
 void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel)
 {
 	if (!parcel) return;
-
+	if(!gWorldp) return;
 	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region) return;
 
@@ -1271,7 +1284,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel)
 
 void LLViewerParcelMgr::requestHoverParcelProperties(const LLVector3d& pos)
 {
-	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( pos );
+	if(!gWorldp) return;
+	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos );
 	if (!region)
 	{
 		return;
@@ -1519,7 +1533,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
 							(request_result == PARCEL_RESULT_MULTIPLE);
 
 		// Select the whole parcel
-		LLViewerRegion *region = gWorldp->getRegion( msg->getSender() );
+		if(!gWorldp) return;
+		LLViewerRegion* region = gWorldp->getRegion( msg->getSender() );
 		if (region)
 		{
 			if (!snap_selection)
@@ -1975,7 +1990,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which)
 		return;
 	}
 
-	LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth );
+	if(!gWorldp) return;
+	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth );
 	if (!region) return;
 
 	LLMessageSystem* msg = gMessageSystem;
@@ -2166,6 +2182,7 @@ void LLViewerParcelMgr::startReleaseLand()
 	}
 
 	LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0;
+	if(!gWorldp) return;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
 	if (!region)
 	{
@@ -2270,6 +2287,7 @@ void LLViewerParcelMgr::callbackDivideLand(S32 option, void* data)
 	LLViewerParcelMgr* self = (LLViewerParcelMgr*)data;
 
 	LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0;
+	if(!gWorldp) return;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
 	if (!region)
 	{
@@ -2328,6 +2346,7 @@ void LLViewerParcelMgr::callbackJoinLand(S32 option, void* data)
 	LLViewerParcelMgr* self = (LLViewerParcelMgr*)data;
 
 	LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0;
+	if(!gWorldp) return;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
 	if (!region)
 	{
@@ -2376,6 +2395,7 @@ void LLViewerParcelMgr::startDeedLandToGroup()
 	}
 
 	LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0;
+	if(!gWorldp) return;
 	LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center);
 	if (!region)
 	{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6001cd3e58f4c3410664dac468f5c8191d1013d1..ef4ae7652c330c1de03cfe08f7778072908c31be 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -846,6 +846,7 @@ class CoarseLocationUpdate : public LLHTTPNode
 		const LLSD& context,
 		const LLSD& input) const
 	{
+		if(!gWorldp) return;
 		LLHost host(input["sender"].asString());
 		LLViewerRegion* region = gWorldp->getRegion(host);
 		if( !region )
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 5c613052eafbb2a43c68c24ebee95c261fd61791..bd488577e34f07e5600740f162b550dd3fb0cae1 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -1355,7 +1355,11 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, BOOL saved)
 void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item )
 {
 	// See if we can bring an existing preview to the front
-	if( !LLPreview::show( item->getUUID() ) )
+	// *NOTE:  Just for embedded Texture , we should use getAssetUUID(), 
+	// not getUUID(), because LLPreviewTexture pass in AssetUUID into 
+	// LLPreview constructor ItemUUID parameter.
+
+	if( !LLPreview::show( item->getAssetUUID() ) )
 	{
 		// There isn't one, so make a new preview
 		if(item)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2a496f66981e00709ab4b5709c67a8e377832910..405a705b62fc12624d96eb5f1a2e6607ddff4148 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1781,6 +1781,22 @@ void adjust_rect_bottom_center(const LLString& control, const LLRect& window)
 	}
 }
 
+
+void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height)
+{
+	if (delta_width || delta_height )
+	{
+		LLRect mXMLRect = gSavedSettings.getRect(control);
+		//hard code it all follows the right and top
+		mXMLRect.mRight += delta_width;
+		mXMLRect.mTop += delta_height;
+		mXMLRect.mLeft = llmax (0, mXMLRect.mLeft+delta_width);
+		mXMLRect.mBottom = llmax(0,mXMLRect.mBottom+delta_height);
+		gSavedSettings.setRect(control,mXMLRect);
+	}
+}
+
+
 // Many rectangles can't be placed until we know the screen size.
 // These rectangles have their bottom-left corner as 0,0
 void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
@@ -2059,7 +2075,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
 		glViewport(0, 0, width, height );
 
 		if (height > 0 && gCamera)
-		{
+		{ 
 			gCamera->setViewHeightInPixels( height );
 			if (mWindow->getFullscreen())
 			{
@@ -2072,6 +2088,9 @@ void LLViewerWindow::reshape(S32 width, S32 height)
 			}
 		}
 
+		// changes in window's width and hight
+		S32 delta_width  = width - mWindowRect.getWidth();
+		S32 delta_height = height - mWindowRect.getHeight();
 		// update our window rectangle
 		mWindowRect.mRight = mWindowRect.mLeft + width;
 		mWindowRect.mTop = mWindowRect.mBottom + height;
@@ -2122,6 +2141,12 @@ void LLViewerWindow::reshape(S32 width, S32 height)
 			{
 				gSavedSettings.setS32("WindowWidth", window_size.mX);
 				gSavedSettings.setS32("WindowHeight", window_size.mY);
+				if (!gFloaterMap)
+				{					
+					update_saved_window_size("FloaterWorldMapRect",delta_width, delta_height);	
+					update_saved_window_size("FloaterMapRect",delta_width, delta_height);		
+				}
+				
 			}
 		}
 
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 612484e2dce437842d28717ef93d923e7ad8b748..1053234e8fb79a4fa8c00f463e1d7f8514acbd49 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -382,7 +382,7 @@ void toggle_flying(void*);
 void toggle_first_person();
 void toggle_build(void*);
 void reset_viewer_state_on_sim(void);
-
+void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height);
 //
 // Constants
 //
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index e76123557cdcaf44f01f7c20be0a6ffb74ba5900..ead4654c7f9e479771408a92db1eb145c27e70da 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -770,6 +770,7 @@ void LLWorld::printPacketsLost()
 
 void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)
 {
+	if(!gWorldp) return;
 	LLViewerRegion* region = gWorldp->getRegion(msg->getSender());
 	if( region )
 	{
@@ -1026,6 +1027,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
 
 	// Viewer trusts the simulator.
 	msg->enableCircuit(sim, TRUE);
+	if(!gWorldp) return;
 	gWorldp->addRegion(handle, sim);
 
 	// give the simulator a message it can use to get ip and port
@@ -1063,6 +1065,7 @@ class LLEstablishAgentCommunication : public LLHTTPNode
 
 		LLHost sim(input["body"]["sim-ip-and-port"].asString());
 	
+		if(!gWorldp) return;
 		LLViewerRegion* regionp = gWorldp->getRegion(sim);
 		if (!regionp)
 		{
@@ -1081,6 +1084,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
 	LLHost host = mesgsys->getSender();
 
 	//llinfos << "Disabling simulator with message from " << host << llendl;
+	if(!gWorldp) return;
 	gWorldp->removeRegion(host);
 
 	mesgsys->disableCircuit(host);
@@ -1090,6 +1094,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
 void process_region_handshake(LLMessageSystem* msg, void** user_data)
 {
 	LLHost host = msg->getSender();
+	if(!gWorldp) return;
 	LLViewerRegion* regionp = gWorldp->getRegion(host);
 	if (!regionp)
 	{
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index ec277b1a1b8b711be0b60cd3a4ce529e97cf990a..b188c70b7046736b564332ee32ee164d63315efc 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -100,6 +100,16 @@ S32 LLWorldMapView::sTrackingArrowY = 0;
 F32 LLWorldMapView::sPixelsPerMeter = 1.f;
 F32 CONE_SIZE = 0.6f;
 
+
+#define SIM_NULL_MAP_SCALE 1 // width in pixels, where we start drawing "null" sims
+#define SIM_MAP_AGENT_SCALE 2 // width in pixels, where we start drawing agents
+#define SIM_MAP_SCALE 1 // width in pixels, where we start drawing sim tiles
+
+// Updates for agent locations.
+#define AGENTS_UPDATE_TIME 60.0 // in seconds
+
+
+
 void LLWorldMapView::initClass()
 {
 	LLUUID image_id;
@@ -458,7 +468,7 @@ void LLWorldMapView::draw()
 		LLViewerImage* simimage = info->mCurrentImage;
 		LLViewerImage* overlayimage = info->mOverlayImage;
 
-		if (gMapScale < 8.f)
+		if (gMapScale < SIM_MAP_SCALE)
 		{
 			simimage->setBoostLevel(0);
 			if (overlayimage) overlayimage->setBoostLevel(0);
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 28ffb421b0a06e4df193d5166ff06ac7646f1d01..f3c5d654b6950a7b53783f0a80bacc6ab45c6868 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -52,13 +52,6 @@ class LLCoordGL;
 class LLViewerImage;
 class LLTextBox;
 
-#define SIM_NULL_MAP_SCALE 2 // width in pixels, where we start drawing "null" sims
-#define SIM_MAP_AGENT_SCALE 20 // width in pixels, where we start drawing agents
-#define SIM_MAP_SCALE 90 // width in pixels, where we start drawing sim tiles
-
-// Updates for agent locations.
-#define AGENTS_UPDATE_TIME 60.0 // in seconds
-
 
 class LLWorldMapView : public LLPanel
 {