diff --git a/.hgtags b/.hgtags
index 6db0a64173d7a30414aadc3a235e0c22040d361d..2272b0118ca676d7d7ef5713cf73aaae91dff028 100755
--- a/.hgtags
+++ b/.hgtags
@@ -498,3 +498,5 @@ bc61801f614022c920cb5c3df1d7d67a9561ce1f 3.7.22-release
 3be800e1afad9615442159e388d6d137be7b951e 3.7.23-release
 d3d0101e980ec95043e0af9b7903045d3bc447e4 3.7.24-release
 9978a8c3a2ffce4a5e1c186256581c2ac139c9dc 3.7.25-release
+000e9dda4162cbf0a83ba88558b19473654a09a9 3.7.26-release
+afd8d4756e8eda3c8f760625d1c17a2ad40ad6c8 3.7.27-release
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index d4e3b763865d211f036e38fa166237ab794e2ca6..1a3e3076634416ef83f902169949461d05542d38 100755
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -261,6 +261,9 @@ public:
 	static std::vector< LLCharacter* > sInstances;
 	static BOOL sAllowInstancesChange ; //debug use
 
+	virtual void	setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
+	const LLVector3& getHoverOffset() const { return mHoverOffset; }
+
 protected:
 	LLMotionController	mMotionController;
 
@@ -273,7 +276,6 @@ protected:
 	U32					mSkeletonSerialNum;
 	LLAnimPauseRequest	mPauseRequest;
 
-
 private:
 	// visual parameter stuff
 	typedef std::map<S32, LLVisualParam *> 		visual_param_index_map_t;
@@ -284,6 +286,8 @@ private:
 	visual_param_name_map_t  					mVisualParamNameMap;
 
 	static LLStringTable sVisualParamNames;	
+
+	LLVector3 mHoverOffset;
 };
 
 #endif // LL_LLCHARACTER_H
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 6f22a7c6b72b9a6280211bc9c9ded18fdaf6c79e..8fa08a2a6ce0ea7314e94973661c376164ec1eec 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -290,7 +290,7 @@ const LLVector3& LLJoint::getPosition()
 
 bool do_debug_joint(const std::string& name)
 {
-	return true;
+	return false;
 }
 
 //--------------------------------------------------------------------
@@ -361,7 +361,6 @@ void LLJoint::removeAttachmentPosOverride( const LLUUID& mesh_id, const std::str
 		}
 		updatePos(av_info);
 	}
-
 }
 
 //--------------------------------------------------------------------
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h
index b9c91f80b5d1a0020d9bf13e6a575a8918de7c63..1ccc6b50937ecfe66eb0e9c1252ffc63a18783d1 100755
--- a/indra/llcharacter/lljointstate.h
+++ b/indra/llcharacter/lljointstate.h
@@ -64,22 +64,18 @@ protected:
 public:
 	// Constructor
 	LLJointState()
-	{
-		mUsage = 0;
-		mJoint = NULL;
-		mUsage = 0;
-		mWeight = 0.f;
-		mPriority = LLJoint::USE_MOTION_PRIORITY;
-	}
+		: mUsage(0)
+		, mJoint(NULL)
+		, mWeight(0.f)
+		, mPriority(LLJoint::USE_MOTION_PRIORITY)
+	{}
 
 	LLJointState(LLJoint* joint)
-	{
-		mUsage = 0;
-		mJoint = joint;
-		mUsage = 0;
-		mWeight = 0.f;
-		mPriority = LLJoint::USE_MOTION_PRIORITY;
-	}
+		: mUsage(0)
+		, mJoint(joint)
+		, mWeight(0.f)
+		, mPriority(LLJoint::USE_MOTION_PRIORITY)
+	{}
 
 	// joint that this state is applied to
 	LLJoint* getJoint()				{ return mJoint; }
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index ed80af36d895231bb722eecee1bb180fb85dc0fd..f942a976b7ecba321780038b53000b595be329e7 100755
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -118,6 +118,12 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
 
   buffer_space = 64 - buffer_index;  // how much space is left in buffer
 
+  // now, transform each 64-byte piece of the input, bypassing the buffer
+  if (input == NULL || input_length == 0){
+	  std::cerr << "LLMD5::update:  Invalid input!" << std::endl;
+	  return;
+  }
+
   // Transform as many times as possible.
   if (input_length >= buffer_space) { // ie. we have enough to fill the buffer
     // fill the rest of the buffer and transform
@@ -127,12 +133,6 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
 		buffer_space);
     transform (buffer);
 
-    // now, transform each 64-byte piece of the input, bypassing the buffer
-  if (input == NULL || input_length == 0){
-	std::cerr << "LLMD5::update:  Invalid input!" << std::endl;
-	return;
-  }
-
     for (input_index = buffer_space; input_index + 63 < input_length; 
 	 input_index += 64)
       transform (input+input_index);
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index e0b2aa87c2e5f9d0ee60bee3d5ebf6799f074513..ae11988df8d705fae858fbedb69f1f5c6dbed88c 100755
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -63,13 +63,18 @@ LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sM
 
 void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
 {
-#ifdef SHOW_ASSERT
-	// Redundant, place to set breakpoints.
-	if (ptr%alignment!=0)
-	{
-		LL_WARNS() << "alignment check failed" << LL_ENDL;
-	}
-	llassert(ptr%alignment==0);
+#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
+	//do not check
+	return;
+#else
+	#ifdef SHOW_ASSERT
+		// Redundant, place to set breakpoints.
+		if (ptr%alignment!=0)
+		{
+			LL_WARNS() << "alignment check failed" << LL_ENDL;
+		}
+		llassert(ptr%alignment==0);
+	#endif
 #endif
 }
 
@@ -2148,3 +2153,60 @@ void LLPrivateMemoryPoolTester::fragmentationtest()
 }
 #endif
 //--------------------------------------------------------------------
+
+#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
+
+#include <map>
+
+struct mem_info {
+	std::map<void*, void*> memory_info;
+	LLMutex mutex;
+
+	static mem_info& get() {
+		static mem_info instance;
+		return instance;
+	}
+
+private:
+	mem_info(){}
+};
+
+void* ll_aligned_malloc_fallback( size_t size, int align )
+{
+	SYSTEM_INFO sysinfo;
+	GetSystemInfo(&sysinfo);
+	
+	unsigned int for_alloc = sysinfo.dwPageSize;
+	while(for_alloc < size) for_alloc += sysinfo.dwPageSize;
+	
+	void *p = VirtualAlloc(NULL, for_alloc+sysinfo.dwPageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
+	if(NULL == p) {
+		// call debugger
+		__asm int 3;
+	}
+	DWORD old;
+	BOOL Res = VirtualProtect((void*)((char*)p + for_alloc), sysinfo.dwPageSize, PAGE_NOACCESS, &old);
+	if(FALSE == Res) {
+		// call debugger
+		__asm int 3;
+	}
+
+	void* ret = (void*)((char*)p + for_alloc-size);
+	
+	{
+		LLMutexLock lock(&mem_info::get().mutex);
+		mem_info::get().memory_info.insert(std::pair<void*, void*>(ret, p));
+	}
+	
+
+	return ret;
+}
+
+void ll_aligned_free_fallback( void* ptr )
+{
+	LLMutexLock lock(&mem_info::get().mutex);
+	VirtualFree(mem_info::get().memory_info.find(ptr)->second, 0, MEM_RELEASE);
+	mem_info::get().memory_info.erase(ptr);
+}
+
+#endif
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 7d1d541a4b6b40cb6b03da8b4e6764d7357f158c..c4c9cc0566151cd3e15d9482a904eb76dfc64c63 100755
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -94,32 +94,44 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
 
 #define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16)
 
-
-inline void* ll_aligned_malloc_fallback( size_t size, int align )
-{
-#if defined(LL_WINDOWS)
-	return _aligned_malloc(size, align);
+//------------------------------------------------------------------------------------------------
+//------------------------------------------------------------------------------------------------
+	// for enable buffer overrun detection predefine LL_DEBUG_BUFFER_OVERRUN in current library
+	// change preprocessro code to: #if 1 && defined(LL_WINDOWS)
+
+#if 0 && defined(LL_WINDOWS)
+	void* ll_aligned_malloc_fallback( size_t size, int align );
+	void ll_aligned_free_fallback( void* ptr );
+//------------------------------------------------------------------------------------------------
 #else
-	void* mem = malloc( size + (align - 1) + sizeof(void*) );
-	char* aligned = ((char*)mem) + sizeof(void*);
-	aligned += align - ((uintptr_t)aligned & (align - 1));
-
-	((void**)aligned)[-1] = mem;
-	return aligned;
-#endif
-}
+	inline void* ll_aligned_malloc_fallback( size_t size, int align )
+	{
+	#if defined(LL_WINDOWS)
+		return _aligned_malloc(size, align);
+	#else
+		void* mem = malloc( size + (align - 1) + sizeof(void*) );
+		char* aligned = ((char*)mem) + sizeof(void*);
+		aligned += align - ((uintptr_t)aligned & (align - 1));
+
+		((void**)aligned)[-1] = mem;
+		return aligned;
+	#endif
+	}
 
-inline void ll_aligned_free_fallback( void* ptr )
-{
-#if defined(LL_WINDOWS)
-	_aligned_free(ptr);
-#else
-	if (ptr)
+	inline void ll_aligned_free_fallback( void* ptr )
 	{
-		free( ((void**)ptr)[-1] );
+	#if defined(LL_WINDOWS)
+		_aligned_free(ptr);
+	#else
+		if (ptr)
+		{
+			free( ((void**)ptr)[-1] );
+		}
+	#endif
 	}
 #endif
-}
+//------------------------------------------------------------------------------------------------
+//------------------------------------------------------------------------------------------------
 
 #if !LL_USE_TCMALLOC
 inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index e0e905638079cad672f6e3adf61e7d81a0316a41..bbf0e1e141faa940f59a25b00e4c49c8d720e28a 100755
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -125,6 +125,30 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
 	return false;
 }
 
+void ll_get_stack_trace_internal(std::vector<std::string>& lines)
+{
+	const S32 MAX_STACK_DEPTH = 100;
+	const S32 STRING_NAME_LENGTH = 256;
+
+	HANDLE process = GetCurrentProcess();
+	SymInitialize( process, NULL, TRUE );
+
+	void *stack[MAX_STACK_DEPTH];
+
+	unsigned short frames = RtlCaptureStackBackTrace_fn( 0, MAX_STACK_DEPTH, stack, NULL );
+	SYMBOL_INFO *symbol = (SYMBOL_INFO*)calloc(sizeof(SYMBOL_INFO) + STRING_NAME_LENGTH * sizeof(char), 1);
+	symbol->MaxNameLen = STRING_NAME_LENGTH-1;
+	symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
+
+	for(unsigned int i = 0; i < frames; i++) 
+	{
+		SymFromAddr(process, (DWORD64)(stack[i]), 0, symbol);
+		lines.push_back(symbol->Name);
+	}
+
+	free( symbol );
+}
+
 #else
 
 bool ll_get_stack_trace(std::vector<std::string>& lines)
@@ -132,5 +156,10 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
 	return false;
 }
 
+void ll_get_stack_trace_internal(std::vector<std::string>& lines)
+{
+
+}
+
 #endif
 
diff --git a/indra/llcommon/llstacktrace.h b/indra/llcommon/llstacktrace.h
index ca72c64c5d61f6f94fd44fe1cc5005d6f8138259..335765386a0481a1d0892834831f5a5fe0454de0 100755
--- a/indra/llcommon/llstacktrace.h
+++ b/indra/llcommon/llstacktrace.h
@@ -33,6 +33,7 @@
 #include <string>
 
 LL_COMMON_API bool ll_get_stack_trace(std::vector<std::string>& lines);
+LL_COMMON_API void ll_get_stack_trace_internal(std::vector<std::string>& lines);
 
 #endif
 
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index ef4481d32ffe3ceff97fb0635de80e2708bca987..8270c630d84174ec4adaacf7f1bcad825392c4eb 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -29,7 +29,7 @@
 #include "linden_common.h"
 #include "lluriparser.h"
 
-LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mRes(0)
+LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedTmp(false), mRes(0)
 {
 	mState.uri = &mUri;
 
@@ -118,17 +118,39 @@ void LLUriParser::fragment(const std::string& s)
 
 void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
 {
+	str = "";
+
+	if(&textRange == NULL)
+	{
+		return;
+	}
+
+	if(textRange.first == NULL)
+	{
+		return;
+	}
+
+	if(textRange.afterLast == NULL)
+	{
+		return;
+	}
+
 	S32 len = textRange.afterLast - textRange.first;
 	if (len)
 	{
-		str = textRange.first;
-		str = str.substr(0, len);
+		str.assign(textRange.first, len);
 	}
 }
 
 void LLUriParser::extractParts()
 {
-	if (mTmpScheme)
+	if(&mUri == NULL)
+	{
+		LL_WARNS() << "mUri is NULL for uri: " << mNormalizedUri << LL_ENDL;
+		return;
+	}
+
+	if (mTmpScheme || mNormalizedTmp)
 	{
 		mScheme.clear();
 	}
@@ -157,6 +179,7 @@ void LLUriParser::extractParts()
 
 S32 LLUriParser::normalize()
 {
+	mNormalizedTmp = mTmpScheme;
 	if (!mRes)
 	{
 		mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
@@ -175,29 +198,58 @@ S32 LLUriParser::normalize()
 				if (!mRes)
 				{
 					mNormalizedUri = &label_buf[mTmpScheme ? 7 : 0];
+					mTmpScheme = false;
 				}
 			}
 		}
 	}
 
+	if(mTmpScheme)
+	{
+		mNormalizedUri = mNormalizedUri.substr(7);
+		mTmpScheme = false;
+	}
+
 	return mRes;
 }
 
 void LLUriParser::glue(std::string& uri) const
+{
+	std::string first_part;
+	glueFirst(first_part);
+
+	std::string second_part;
+	glueSecond(second_part);
+
+	uri = first_part + second_part;
+}
+
+void LLUriParser::glueFirst(std::string& uri) const
 {
 	if (mScheme.size())
 	{
 		uri = mScheme;
 		uri += "://";
 	}
+	else
+	{
+		uri.clear();
+	}
 
 	uri += mHost;
+}
 
+void LLUriParser::glueSecond(std::string& uri) const
+{
 	if (mPort.size())
 	{
-		uri += ':';
+		uri = ':';
 		uri += mPort;
 	}
+	else
+	{
+		uri.clear();
+	}
 
 	uri += mPath;
 
diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h
index 719f916837056fbb2dcc6d98725afefe269f6a88..561431e8f905c01375ac7cbf1e7aab23e666eaba 100644
--- a/indra/llcommon/lluriparser.h
+++ b/indra/llcommon/lluriparser.h
@@ -60,6 +60,8 @@ public:
 
 	void extractParts();
 	void glue(std::string& uri) const;
+	void glueFirst(std::string& uri) const;
+	void glueSecond(std::string& uri) const;
 	bool test() const;
 	S32 normalize();
 
@@ -79,6 +81,7 @@ private:
 
 	S32 mRes;
 	bool mTmpScheme;
+	bool mNormalizedTmp;
 };
 
 #endif // LL_LLURIPARSER_H
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index c8b0e872f6536a7e9dd6983fe0e339e9bb9fc33b..4875fe700198edc91015228311de23a01b03bc65 100755
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -143,7 +143,8 @@ bool LLImageDecodeThread::ImageRequest::processRequest()
 											  mFormattedImage->getComponents());
 		}
 		done = mFormattedImage->decode(mDecodedImageRaw, decode_time_slice); // 1ms
-		mDecodedRaw = done;
+		// some decoders are removing data when task is complete and there were errors
+		mDecodedRaw = done && mDecodedImageRaw->getData();
 	}
 	if (done && mNeedsAux && !mDecodedAux && mFormattedImage.notNull())
 	{
@@ -155,7 +156,7 @@ bool LLImageDecodeThread::ImageRequest::processRequest()
 											  1);
 		}
 		done = mFormattedImage->decodeChannels(mDecodedImageAux, decode_time_slice, 4, 4); // 1ms
-		mDecodedAux = done;
+		mDecodedAux = done && mDecodedImageAux->getData();
 	}
 
 	return done;
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index c030b105fb736f4f071c264babdae1a146365c3b..51c5c635562c2c5b7f776245a0dc74110cf18e44 100755
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -67,6 +67,8 @@ LLImageRaw::~LLImageRaw() { }
 void LLImageRaw::deleteData() { }
 U8* LLImageRaw::allocateData(S32 size) { return NULL; }
 U8* LLImageRaw::reallocateData(S32 size) { return NULL; }
+const U8* LLImageBase::getData() const { return NULL; }
+U8* LLImageBase::getData() { return NULL; }
 
 // End Stubbing
 // -------------------------------------------------------------------------------------------
diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp
index 740047b93afe5eb9125e886cfa267efbe9b83f71..a8d6200488dfae1188f040af9da356cb0226fd9f 100755
--- a/indra/llmath/llsphere.cpp
+++ b/indra/llmath/llsphere.cpp
@@ -248,8 +248,8 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
 		// compute the starting step-size
 		F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ]));
 		F32 step_length = bounding_radius - minimum_radius;
-		S32 step_count = 0;
-		S32 max_step_count = 12;
+		//S32 step_count = 0;
+		//S32 max_step_count = 12;
 		F32 half_milimeter = 0.0005f;
 
 		// wander the center around in search of tighter solutions
@@ -258,7 +258,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
 		S32 last_dz = 2;
 
 		while (step_length > half_milimeter
-				&& step_count < max_step_count)
+				/*&& step_count < max_step_count*/)
 		{
 			// the algorithm for testing the maximum radius could be expensive enough
 			// that it makes sense to NOT duplicate testing when possible, so we keep
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index d9a68cb577a33c8b75247b0d3d9c261034cd0da5..adf6e790d3aeada2d126b78919afd4b0862ae348 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2685,6 +2685,17 @@ void LLVolume::setMeshAssetLoaded(BOOL loaded)
 	mIsMeshAssetLoaded = loaded;
 }
 
+void LLVolume::copyFacesTo(std::vector<LLVolumeFace> &faces) const 
+{
+	faces = mVolumeFaces;
+}
+
+void LLVolume::copyFacesFrom(const std::vector<LLVolumeFace> &faces)
+{
+	mVolumeFaces = faces;
+	mSculptLevel = 0;
+}
+
 void LLVolume::copyVolumeFaces(const LLVolume* volume)
 {
 	mVolumeFaces = volume->mVolumeFaces;
@@ -5970,7 +5981,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
 	}
 	else
 	{ //degenerate, make up a value
-		normal.set(0,0,1);
+		if(normal.getF32ptr()[2] >= 0)
+			normal.set(0.f,0.f,1.f);
+		else
+			normal.set(0.f,0.f,-1.f);
 	}
 
 	llassert(llfinite(normal.getF32ptr()[0]));
@@ -6284,6 +6298,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
 	num_vertices = mNumS*mNumT;
 	num_indices = (mNumS-1)*(mNumT-1)*6;
 
+	partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build;
+
 	if (!partial_build)
 	{
 		resizeVertices(num_vertices);
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 2f38ae7203386ae5ef6cd9b48cba05a1545296b2..c8476f689796cb1aeff0a06097f9d3f05d430227 100755
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -993,6 +993,7 @@ public:
 	void resizePath(S32 length);
 	const LLAlignedArray<LLVector4a,64>&	getMesh() const				{ return mMesh; }
 	const LLVector4a& getMeshPt(const U32 i) const			{ return mMesh[i]; }
+	
 
 	void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); }
 
@@ -1045,6 +1046,8 @@ public:
 	
 	void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level);
 	void copyVolumeFaces(const LLVolume* volume);
+	void copyFacesTo(std::vector<LLVolumeFace> &faces) const;
+	void copyFacesFrom(const std::vector<LLVolumeFace> &faces);
 	void cacheOptimize();
 
 private:
diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp
index 5aaada63b152308c971801329318ed60b06d6764..955a66f864579b5b1e6a2f3b3dd8859ef520da60 100755
--- a/indra/llmessage/llcircuit.cpp
+++ b/indra/llmessage/llcircuit.cpp
@@ -103,6 +103,7 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,
 	mPeakBPSOut(0.f),
 	mPeriodTime(0.0),
 	mExistenceTimer(),
+	mAckCreationTime(0.f),
 	mCurrentResendCount(0),
 	mLastPacketGap(0),
 	mHeartbeatInterval(circuit_heartbeat_interval), 
@@ -1078,60 +1079,69 @@ BOOL LLCircuitData::collectRAck(TPACKETID packet_num)
 	}
 
 	mAcks.push_back(packet_num);
+	if (mAckCreationTime == 0)
+	{
+		mAckCreationTime = getAgeInSeconds();
+	}
 	return TRUE;
 }
 
 // this method is called during the message system processAcks() to
 // send out any acks that did not get sent already.
-void LLCircuit::sendAcks()
+void LLCircuit::sendAcks(F32 collect_time)
 {
+	collect_time = llclamp(collect_time, 0.f, LL_COLLECT_ACK_TIME_MAX);
 	LLCircuitData* cd;
-	circuit_data_map::iterator end = mSendAckMap.end();
-	for(circuit_data_map::iterator it = mSendAckMap.begin(); it != end; ++it)
+	circuit_data_map::iterator it = mSendAckMap.begin();
+	while (it != mSendAckMap.end())
 	{
-		cd = (*it).second;
-
+		circuit_data_map::iterator cur_it = it++;
+		cd = (*cur_it).second;
 		S32 count = (S32)cd->mAcks.size();
-		if(count > 0)
+		F32 age = cd->getAgeInSeconds() - cd->mAckCreationTime;
+		if (age > collect_time || count == 0)
 		{
-			// send the packet acks
-			S32 acks_this_packet = 0;
-			for(S32 i = 0; i < count; ++i)
+			if (count>0)
 			{
-				if(acks_this_packet == 0)
+				// send the packet acks
+				S32 acks_this_packet = 0;
+				for(S32 i = 0; i < count; ++i)
 				{
-					gMessageSystem->newMessageFast(_PREHASH_PacketAck);
+					if(acks_this_packet == 0)
+					{
+						gMessageSystem->newMessageFast(_PREHASH_PacketAck);
+					}
+					gMessageSystem->nextBlockFast(_PREHASH_Packets);
+					gMessageSystem->addU32Fast(_PREHASH_ID, cd->mAcks[i]);
+					++acks_this_packet;
+					if(acks_this_packet > 250)
+					{
+						gMessageSystem->sendMessage(cd->mHost);
+						acks_this_packet = 0;
+					}
 				}
-				gMessageSystem->nextBlockFast(_PREHASH_Packets);
-				gMessageSystem->addU32Fast(_PREHASH_ID, cd->mAcks[i]);
-				++acks_this_packet;
-				if(acks_this_packet > 250)
+				if(acks_this_packet > 0)
 				{
 					gMessageSystem->sendMessage(cd->mHost);
-					acks_this_packet = 0;
 				}
-			}
-			if(acks_this_packet > 0)
-			{
-				gMessageSystem->sendMessage(cd->mHost);
-			}
 
-			if(gMessageSystem->mVerboseLog)
-			{
-				std::ostringstream str;
-				str << "MSG: -> " << cd->mHost << "\tPACKET ACKS:\t";
-				std::ostream_iterator<TPACKETID> append(str, " ");
-				std::copy(cd->mAcks.begin(), cd->mAcks.end(), append);
-				LL_INFOS() << str.str() << LL_ENDL;
-			}
+				if(gMessageSystem->mVerboseLog)
+				{
+					std::ostringstream str;
+					str << "MSG: -> " << cd->mHost << "\tPACKET ACKS:\t";
+					std::ostream_iterator<TPACKETID> append(str, " ");
+					std::copy(cd->mAcks.begin(), cd->mAcks.end(), append);
+					LL_INFOS() << str.str() << LL_ENDL;
+				}
 
-			// empty out the acks list
-			cd->mAcks.clear();
+				// empty out the acks list
+				cd->mAcks.clear();
+				cd->mAckCreationTime = 0.f;
+			}
+			// remove data map
+			mSendAckMap.erase(cur_it);
 		}
 	}
-
-	// All acks have been sent, clear the map
-	mSendAckMap.clear();
 }
 
 
diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h
index 5b109fc2182bb9f897fa2fb1b88c9773af410ec2..b8021bc9f053c9dd19c5a87c4bb3afd6b97e3786 100755
--- a/indra/llmessage/llcircuit.h
+++ b/indra/llmessage/llcircuit.h
@@ -60,6 +60,7 @@ const U8 LL_PACKET_ID_SIZE = 6;
 
 const S32 LL_MAX_RESENT_PACKETS_PER_FRAME = 100;
 const S32 LL_MAX_ACKED_PACKETS_PER_FRAME = 200;
+const F32 LL_COLLECT_ACK_TIME_MAX = 2.f;
 
 //
 // Prototypes and Predefines
@@ -237,6 +238,7 @@ protected:
 	packet_time_map							mPotentialLostPackets;
 	packet_time_map							mRecentlyReceivedReliablePackets;
 	std::vector<TPACKETID> mAcks;
+	F32 mAckCreationTime; // first ack creation time
 
 	typedef std::map<TPACKETID, LLReliablePacket *> reliable_map;
 	typedef reliable_map::iterator					reliable_iter;
@@ -302,7 +304,7 @@ public:
 
 	// this method is called during the message system processAcks()
 	// to send out any acks that did not get sent already. 
-	void sendAcks();
+	void sendAcks(F32 collect_time);
 
 	friend std::ostream& operator<<(std::ostream& s, LLCircuit &circuit);
 	void getInfo(LLSD& info) const;
@@ -333,6 +335,7 @@ protected:
 	circuit_data_map mCircuitData;
 
 	typedef std::set<LLCircuitData *, LLCircuitData::less> ping_set_t; // Circuits sorted by next ping time
+
 	ping_set_t mPingSet;
 
 	// This variable points to the last circuit data we found to
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index cc2d5d66ad6200fba2ad069a25b04e805b2c4055..3d81bf31d5f54366d66c94567901d12165a4a619 100755
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -787,7 +787,7 @@ S32	LLMessageSystem::getReceiveBytes() const
 }
 
 
-void LLMessageSystem::processAcks()
+void LLMessageSystem::processAcks(F32 collect_time)
 {
 	F64Seconds mt_sec = getMessageTimeSeconds();
 	{
@@ -813,7 +813,7 @@ void LLMessageSystem::processAcks()
 		mCircuitInfo.resendUnackedPackets(mUnackedListDepth, mUnackedListSize);
 
 		//cycle through ack list for each host we need to send acks to
-		mCircuitInfo.sendAcks();
+		mCircuitInfo.sendAcks(collect_time);
 
 		if (!mDenyTrustedCircuitSet.empty())
 		{
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index da06b64506ff1cdddf02d1848a072dadbe9102e2..348b09b9923bbde5fe023c4d2df7a478af0969e5 100755
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -331,7 +331,7 @@ public:
 
 	BOOL	poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received
 	BOOL	checkMessages( S64 frame_count = 0 );
-	void	processAcks();
+	void	processAcks(F32 collect_time = 0.f);
 
 	BOOL	isMessageFast(const char *msg);
 	BOOL	isMessage(const char *msg)
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index e0f69dc2d3f9dcaf6853e86ffccd059aac324997..5c6b3d5fab165b60bdf4d78f3414733731483e2f 100755
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -1383,5 +1383,7 @@ char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->
 char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData");
 char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion");
 char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion");
+char const* const _PREHASH_AppearanceHover = LLMessageStringTable::getInstance()->getString("AppearanceHover");
+char const* const _PREHASH_HoverHeight = LLMessageStringTable::getInstance()->getString("HoverHeight");
 char const* const _PREHASH_Experience = LLMessageStringTable::getInstance()->getString("Experience");
 char const* const _PREHASH_ExperienceID = LLMessageStringTable::getInstance()->getString("ExperienceID");
diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h
index fb8dcc17fb2b35f1f02f8ad2ae59cac6c1896344..e696c3b0cae394faa12b8dd2ff2791cdb8682ea5 100755
--- a/indra/llmessage/message_prehash.h
+++ b/indra/llmessage/message_prehash.h
@@ -1383,6 +1383,8 @@ extern char const* const _PREHASH_GroupAVSounds;
 extern char const* const _PREHASH_AppearanceData;
 extern char const* const _PREHASH_AppearanceVersion;
 extern char const* const _PREHASH_CofVersion;
+extern char const* const _PREHASH_AppearanceHover;
+extern char const* const _PREHASH_HoverHeight;
 extern char const* const _PREHASH_Experience;
 extern char const* const _PREHASH_ExperienceID;
 #endif
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index aa8dd7697cb0e36c78d8dfcecfbaa69e49bc7ac0..e0294cfd6ad414d140ab84ee75458b670727494e 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1681,11 +1681,11 @@ LLSD LLModel::writeModel(
 						}
 					}
 					
-					F32* src_tc = (F32*) face.mTexCoords[j].mV;
-
 					//texcoord
 					if (face.mTexCoords)
 					{
+						F32* src_tc = (F32*) face.mTexCoords[j].mV;
+
 						for (U32 k = 0; k < 2; ++k)
 						{ //for each component
 							//convert to 16-bit normalized
@@ -2012,7 +2012,7 @@ bool LLModel::loadModel(std::istream& is)
 		}
 	}
 
-	std::string nm[] = 
+	static const std::string nm[] = 
 	{
 		"lowest_lod",
 		"low_lod",
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index a505ea04a743f3e844a3782a08a881b29f32ff9a..eb074822278ec82e1867d515d5c32b593519a2c2 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -324,6 +324,11 @@ S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMateri
 	return mTextureList.setMaterialParams(index, pMaterialParams);
 }
 
+LLMaterialPtr LLPrimitive::getTEMaterialParams(const U8 index)
+{
+	return mTextureList.getMaterialParams(index);
+}
+
 //===============================================================
 S32  LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
 {
@@ -1360,9 +1365,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
 		retval |= setTEBumpShinyFullbright(i, tec.bump[i]);
 		retval |= setTEMediaTexGen(i, tec.media_flags[i]);
 		retval |= setTEGlow(i, (F32)tec.glow[i] / (F32)0xFF);
-		
-                retval |= setTEMaterialID(i, tec.material_ids[i]);
-		
+		retval |= setTEMaterialID(i, tec.material_ids[i]);
+
 		coloru = LLColor4U(tec.colors + 4*i);
 
 		// Note:  This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index cdb3f273c21e8cdb45475eafb11539101f7e1631..1bf83e36b4f14ba8d6b97160416b24a188c22c86 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -389,6 +389,8 @@ public:
 	virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
 	virtual void setTESelected(const U8 te, bool sel);
 
+	LLMaterialPtr getTEMaterialParams(const U8 index);
+
 	void copyTEs(const LLPrimitive *primitive);
 	S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
 	S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index dfae9699ecaf0ec5cb121c8d44e06f151f603651..f4f08248b82dde355796be88bd2abce6c72abc59 100755
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -377,6 +377,16 @@ S32 LLPrimTextureList::setMaterialParams(const U8 index, const LLMaterialPtr pMa
 	return TEM_CHANGE_NONE;
 }
 
+LLMaterialPtr LLPrimTextureList::getMaterialParams(const U8 index)
+{
+	if (index < mEntryList.size())
+	{
+		return mEntryList[index]->getMaterialParams();
+	}
+	
+	return LLMaterialPtr();
+}
+
 S32 LLPrimTextureList::size() const
 {
 	return mEntryList.size();
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index d7fabbbb79a9f4fc080af18240f2830bfde35d98..49c636e40f1866004e0831facd4a2f4d7f7cfc5d 100755
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
@@ -107,6 +107,8 @@ public:
 	S32 setMaterialID(const U8 index, const LLMaterialID& pMaterialID);
 	S32 setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams);
 
+	LLMaterialPtr getMaterialParams(const U8 index);
+
 	S32 size() const;
 
 //	void forceResize(S32 new_size);
diff --git a/indra/llprimitive/object_flags.h b/indra/llprimitive/object_flags.h
index 31dbd15ae0e7bdd8ee91cb24fd94d64b26d174dd..88eaeb034a675c0e77f226896526b83ca61a0a8d 100755
--- a/indra/llprimitive/object_flags.h
+++ b/indra/llprimitive/object_flags.h
@@ -69,6 +69,7 @@ const U32   FLAGS_TEMPORARY_ON_REZ     = (1U << 29);
 //const U32 FLAGS_UNUSED_007           = (1U << 31); // was FLAGS_ZLIB_COMPRESSED
 
 const U32   FLAGS_LOCAL                = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE;
+const U32   FLAGS_WORLD                = FLAGS_USE_PHYSICS | FLAGS_PHANTOM | FLAGS_TEMPORARY_ON_REZ;
 
 typedef enum e_havok_joint_type
 {
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 0af402efea701eb68c23de328d31cf3af2bd393e..1ca6e99ecf95e3b4632f13c50233f5a8d2d939d1 100755
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -53,7 +53,7 @@ bool LLRender::sGLCoreProfile = false;
 static const U32 LL_NUM_TEXTURE_LAYERS = 32; 
 static const U32 LL_NUM_LIGHT_UNITS = 8;
 
-static GLenum sGLTextureType[] =
+static const GLenum sGLTextureType[] =
 {
 	GL_TEXTURE_2D,
 	GL_TEXTURE_RECTANGLE_ARB,
@@ -61,14 +61,14 @@ static GLenum sGLTextureType[] =
 	GL_TEXTURE_2D_MULTISAMPLE
 };
 
-static GLint sGLAddressMode[] =
+static const GLint sGLAddressMode[] =
 {	
 	GL_REPEAT,
 	GL_MIRRORED_REPEAT,
 	GL_CLAMP_TO_EDGE
 };
 
-static GLenum sGLCompareFunc[] =
+static const GLenum sGLCompareFunc[] =
 {
 	GL_NEVER,
 	GL_ALWAYS,
@@ -82,7 +82,7 @@ static GLenum sGLCompareFunc[] =
 
 const U32 immediate_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD0;
 
-static GLenum sGLBlendFactor[] =
+static const GLenum sGLBlendFactor[] =
 {
 	GL_ONE,
 	GL_ZERO,
@@ -99,12 +99,12 @@ static GLenum sGLBlendFactor[] =
 };
 
 LLTexUnit::LLTexUnit(S32 index)
-: mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT), 
-mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT),
-mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR),
-mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA),
-mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0),
-mHasMipMaps(false)
+	: mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT), 
+	mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT),
+	mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR),
+	mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA),
+	mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0),
+	mHasMipMaps(false)
 {
 	llassert_always(index < (S32)LL_NUM_TEXTURE_LAYERS);
 	mIndex = index;
@@ -1189,7 +1189,7 @@ void LLRender::syncMatrices()
 
 	if (shader)
 	{
-		llassert(shader);
+		//llassert(shader);
 
 		bool mvp_done = false;
 
@@ -1288,7 +1288,7 @@ void LLRender::syncMatrices()
 	}
 	else if (!LLGLSLShader::sNoFixedFunction)
 	{
-		GLenum mode[] = 
+		static const GLenum mode[] = 
 		{
 			GL_MODELVIEW,
 			GL_PROJECTION,
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 474b545f00c3c25a83fff71aed6f05683386d590..00d553e457724fbac83891c813a3bdd5e3caae9b 100755
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1611,7 +1611,7 @@ void LLFolderView::update()
 
 	LLFolderViewFilter& filter_object = getFolderViewModel()->getFilter();
 
-	if (filter_object.isModified() && filter_object.isNotDefault())
+	if (filter_object.isModified() && filter_object.isNotDefault() && mParentPanel.get()->getVisible())
 	{
 		mNeedsAutoSelect = TRUE;
 	}
@@ -1653,8 +1653,10 @@ void LLFolderView::update()
 		scrollToShowSelection();
 	}
 
-	BOOL filter_finished = getViewModelItem()->passedFilter()
-						&& mViewModel->contentsReady();
+	BOOL filter_finished = mViewModel->contentsReady()
+							&& (getViewModelItem()->passedFilter()
+								|| ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration()
+									&& !filter_object.isModified()));
 	if (filter_finished 
 		|| gFocusMgr.childHasKeyboardFocus(mParentPanel.get())
 		|| gFocusMgr.childHasMouseCapture(mParentPanel.get()))
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 31df853ab47bca3e9dac25035f500789558becb0..22fcadb60a17280f2de4df296c8744594240b3c0 100755
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3696,7 +3696,7 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
 			{
 				handled = pMenu->handleKey(key, mask, TRUE);
 			}
-			else
+			else if (mask == MASK_NONE || (key >= KEY_LEFT && key <= KEY_DOWN))
 			{
 				//highlight first enabled one
 				if(pMenu->highlightNextItem(NULL))
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 5f72ee3ac637e99133e37d0399a41027cc95bf9e..c59a4fb8608856642ffd062c50a7b752922d1ac9 100755
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1825,6 +1825,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
 				return TRUE;
 			}
 		}
+		return LLUICtrl::handleRightMouseDown(x, y, mask);
 	}
 	return FALSE;
 }
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 62c5ecb8f125a15d5d3776aae0dcecdcbf0ebfd7..2da39fa54b5fc417e97b2652abf43b7569e5541c 100755
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -58,7 +58,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
 	mPrecision(p.decimal_digits),
 	mTextEnabledColor(p.text_color()),
 	mTextDisabledColor(p.text_disabled_color()),
-	mLabelWidth(p.label_width)
+	mLabelWidth(p.label_width),
+	mEditorCommitSignal(NULL)
 {
 	S32 top = getRect().getHeight();
 	S32 bottom = 0;
@@ -196,6 +197,11 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
 	updateText();
 }
 
+LLSliderCtrl::~LLSliderCtrl()
+{
+	delete mEditorCommitSignal;
+}
+
 // static
 void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
 {
@@ -308,6 +314,8 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
 	if( success )
 	{
 		self->onCommit();
+		if (self->mEditorCommitSignal)
+			(*(self->mEditorCommitSignal))(self, self->getValueF32());
 	}
 	else
 	{
@@ -421,6 +429,11 @@ boost::signals2::connection LLSliderCtrl::setSliderMouseUpCallback( const commit
 	return mSlider->setMouseUpCallback( cb );
 }
 
+boost::signals2::connection LLSliderCtrl::setSliderEditorCommitCallback( const commit_signal_t::slot_type& cb )   
+{ 
+	if (!mEditorCommitSignal) mEditorCommitSignal = new commit_signal_t();
+	return mEditorCommitSignal->connect(cb); 
+}
 void LLSliderCtrl::onTabInto()
 {
 	if( mEditor )
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index 5153e33f49f11178fb4d4e507a219dbf294bc9d5..67cca9ef04efc701fbde13bcd692d0f8330938dd 100755
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -81,7 +81,7 @@ protected:
 	LLSliderCtrl(const Params&);
 	friend class LLUICtrlFactory;
 public:
-	virtual ~LLSliderCtrl() {} // Children all cleaned up by default view destructor.
+	virtual ~LLSliderCtrl();
 
 	/*virtual*/ F32	getValueF32() const { return mSlider->getValueF32(); }
 	void			setValue(F32 v, BOOL from_event = FALSE);
@@ -112,6 +112,7 @@ public:
 
 	boost::signals2::connection setSliderMouseDownCallback(	const commit_signal_t::slot_type& cb );
 	boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
+	boost::signals2::connection setSliderEditorCommitCallback( const commit_signal_t::slot_type& cb );
 
 	/*virtual*/ void	onTabInto();
 
@@ -150,6 +151,8 @@ private:
 
 	LLUIColor	mTextEnabledColor;
 	LLUIColor	mTextDisabledColor;
+
+	commit_signal_t*	mEditorCommitSignal;
 };
 
 #endif  // LL_LLSLIDERCTRL_H
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 09f923e74fc2277667e7c89d4ac64c3d1046748d..eca57d1c235f2c6c0572a0a6b0cf7c8eb15695f4 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2063,8 +2063,16 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
 			LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted());
 
 			// output the styled Url
-			//appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
 			appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly());
+
+			// show query part of url with gray color only for LLUrlEntryHTTP and LLUrlEntryHTTPNoProtocol url entries
+			std::string label = match.getQuery();
+			if (label.size())
+			{
+				link_params.color = LLColor4::grey;
+				link_params.readonly_color = LLColor4::grey;
+				appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
+			}
 			
 			// set the tooltip for the Url label
 			if (! match.getTooltip().empty())
@@ -2855,13 +2863,44 @@ void LLTextBase::updateRects()
 		needsReflow();
 	}
 
+	// update mTextBoundingRect after mVisibleTextRect took scrolls into account
+	if (!mLineInfoList.empty() && mScroller)
+	{
+		S32 delta_pos = 0;
+
+		switch(mVAlign)
+		{
+		case LLFontGL::TOP:
+			delta_pos = llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom);
+			break;
+		case LLFontGL::VCENTER:
+			delta_pos = (llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2;
+			break;
+		case LLFontGL::BOTTOM:
+			delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom;
+			break;
+		case LLFontGL::BASELINE:
+			// do nothing
+			break;
+		}
+		// move line segments to fit new visible rect
+		if (delta_pos != 0)
+		{
+			for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it)
+			{
+				it->mRect.translate(0, delta_pos);
+			}
+			mTextBoundingRect.translate(0, delta_pos);
+		}
+	}
+
 	// update document container again, using new mVisibleTextRect (that has scrollbars enabled as needed)
 	doc_rect.mBottom = llmin(mVisibleTextRect.mBottom,  mTextBoundingRect.mBottom);
 	doc_rect.mLeft = 0;
 	doc_rect.mRight = mScroller 
 		? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight)
 		: mVisibleTextRect.getWidth();
-	doc_rect.mTop = llmax(mVisibleTextRect.mTop, mTextBoundingRect.mTop);
+	doc_rect.mTop = llmax(mVisibleTextRect.getHeight(), mTextBoundingRect.getHeight()) + doc_rect.mBottom;
 	if (!mScroller)
 	{
 		// push doc rect to top of text widget
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index cf5fdef539c346db3ebf1ace01de2def482ddc5b..1f169c3eb58eb045bbdde5064a71138a21271941 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -814,7 +814,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
 	BOOL	handled = FALSE;
 
 	// if I'm not currently selecting text
-	if (!(hasSelection() && hasMouseCapture()))
+	if (!(mIsSelecting && hasMouseCapture()))
 	{
 		// let text segments handle mouse event
 		handled = LLTextBase::handleMouseUp(x, y, mask);
@@ -2448,12 +2448,30 @@ void LLTextEditor::updateLinkSegments()
 		LLTextSegment *segment = *it;
 		if (segment && segment->getStyle() && segment->getStyle()->isLink())
 		{
-			// if the link's label (what the user can edit) is a valid Url,
-			// then update the link's HREF to be the same as the label text.
-			// This lets users edit Urls in-place.
 			LLStyleConstSP style = segment->getStyle();
 			LLStyleSP new_style(new LLStyle(*style));
 			LLWString url_label = wtext.substr(segment->getStart(), segment->getEnd()-segment->getStart());
+
+			segment_set_t::const_iterator next_it = mSegments.upper_bound(segment);
+			LLTextSegment *next_segment = *next_it;
+			if (next_segment)
+			{
+				LLWString next_url_label = wtext.substr(next_segment->getStart(), next_segment->getEnd()-next_segment->getStart());
+				std::string link_check = wstring_to_utf8str(url_label) + wstring_to_utf8str(next_url_label);
+				LLUrlMatch match;
+
+				if ( LLUrlRegistry::instance().findUrl(link_check, match))
+				{
+					if(match.getQuery() == wstring_to_utf8str(next_url_label))
+					{
+						continue;
+					}
+				}
+			}
+
+			// if the link's label (what the user can edit) is a valid Url,
+			// then update the link's HREF to be the same as the label text.
+			// This lets users edit Urls in-place.
 			if (LLUrlRegistry::instance().hasUrl(url_label))
 			{
 				std::string new_url = wstring_to_utf8str(url_label);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 71a0f594b0f64dd36bbac9667344ec80e7f52df5..4d6e3b70e1eb011f1b01f880cfc4522b32358d98 100755
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -49,7 +49,8 @@ std::string localize_slapp_label(const std::string& url, const std::string& full
 
 
 LLUrlEntryBase::LLUrlEntryBase()
-{}
+{
+}
 
 LLUrlEntryBase::~LLUrlEntryBase()
 {
@@ -188,6 +189,30 @@ bool LLUrlEntryBase::isWikiLinkCorrect(std::string url)
 	return (LLUrlRegistry::instance().hasUrl(label)) ? false : true;
 }
 
+std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const
+{
+	LLUriParser up(unescapeUrl(url));
+	up.normalize();
+
+	std::string label;
+	up.extractParts();
+	up.glueFirst(label);
+
+	return label;
+}
+
+std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const
+{
+	LLUriParser up(unescapeUrl(url));
+
+	std::string query;
+	up.extractParts();
+	up.glueSecond(query);
+
+	return query;
+}
+
+
 static std::string getStringAfterToken(const std::string str, const std::string token)
 {
 	size_t pos = str.find(token);
@@ -204,6 +229,7 @@ static std::string getStringAfterToken(const std::string str, const std::string
 // LLUrlEntryHTTP Describes generic http: and https: Urls
 //
 LLUrlEntryHTTP::LLUrlEntryHTTP()
+	: LLUrlEntryBase()
 {
 	mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
 							boost::regex::perl|boost::regex::icase);
@@ -212,6 +238,25 @@ LLUrlEntryHTTP::LLUrlEntryHTTP()
 }
 
 std::string LLUrlEntryHTTP::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+	return urlToLabelWithGreyQuery(url);
+}
+
+std::string LLUrlEntryHTTP::getQuery(const std::string &url) const
+{
+	return urlToGreyQuery(url);
+}
+
+std::string LLUrlEntryHTTP::getUrl(const std::string &string) const
+{
+	if (string.find("://") == std::string::npos)
+	{
+		return "http://" + escapeUrl(string);
+	}
+	return escapeUrl(string);
+}
+
+std::string LLUrlEntryHTTP::getTooltip(const std::string &url) const
 {
 	return unescapeUrl(url);
 }
@@ -248,6 +293,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const
 // LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com
 //
 LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol()
+	: LLUrlEntryBase()
 {
 	mPattern = boost::regex("("
 				"\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR
@@ -261,7 +307,12 @@ LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol()
 
 std::string LLUrlEntryHTTPNoProtocol::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
 {
-	return unescapeUrl(url);
+	return urlToLabelWithGreyQuery(url);
+}
+
+std::string LLUrlEntryHTTPNoProtocol::getQuery(const std::string &url) const
+{
+	return urlToGreyQuery(url);
 }
 
 std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
@@ -273,6 +324,95 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
 	return escapeUrl(string);
 }
 
+std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const
+{
+	return unescapeUrl(url);
+}
+
+LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
+	: LLUrlEntryBase()
+{
+	mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+									boost::regex::perl|boost::regex::icase);
+	mMenuName = "menu_url_http.xml";
+	mTooltip = LLTrans::getString("TooltipHttpUrl");
+}
+
+std::string LLUrlEntryInvalidSLURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+
+	return escapeUrl(url);
+}
+
+std::string LLUrlEntryInvalidSLURL::getUrl(const std::string &string) const
+{
+	return escapeUrl(string);
+}
+
+std::string LLUrlEntryInvalidSLURL::getTooltip(const std::string &url) const
+{
+	return unescapeUrl(url);
+}
+
+bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
+{
+	S32 actual_parts;
+
+	if(url.find(".com/secondlife/") != std::string::npos)
+	{
+	   actual_parts = 5;
+	}
+	else if(url.find("/app/") != std::string::npos)
+	{
+		actual_parts = 6;
+	}
+	else
+	{
+		actual_parts = 3;
+	}
+
+	LLURI uri(url);
+	LLSD path_array = uri.pathArray();
+	S32 path_parts = path_array.size();
+	S32 x,y,z;
+
+	if (path_parts == actual_parts)
+	{
+		// handle slurl with (X,Y,Z) coordinates
+		LLStringUtil::convertToS32(path_array[path_parts-3],x);
+		LLStringUtil::convertToS32(path_array[path_parts-2],y);
+		LLStringUtil::convertToS32(path_array[path_parts-1],z);
+
+		if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0))
+		{
+			return TRUE;
+		}
+	}
+	else if (path_parts == (actual_parts-1))
+	{
+		// handle slurl with (X,Y) coordinates
+
+		LLStringUtil::convertToS32(path_array[path_parts-2],x);
+		LLStringUtil::convertToS32(path_array[path_parts-1],y);
+		;
+		if((x>= 0 && x<= 256) && (y>= 0 && y<= 256))
+		{
+				return TRUE;
+		}
+	}
+	else if (path_parts == (actual_parts-2))
+	{
+		// handle slurl with (X) coordinate
+		LLStringUtil::convertToS32(path_array[path_parts-1],x);
+		if(x>= 0 && x<= 256)
+		{
+			return TRUE;
+		}
+	}
+
+	return FALSE;
+}
+
 //
 // LLUrlEntrySLURL Describes generic http: and https: Urls
 //
@@ -294,6 +434,7 @@ std::string LLUrlEntrySLURL::getLabel(const std::string &url, const LLUrlLabelCa
 	//   - http://slurl.com/secondlife/Place/X
 	//   - http://slurl.com/secondlife/Place
 	//
+
 	LLURI uri(url);
 	LLSD path_array = uri.pathArray();
 	S32 path_parts = path_array.size();
@@ -346,29 +487,53 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
 }
 
 //
-// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link
+// LLUrlEntrySeconlifeURL Describes *secondlife.com/ and *lindenlab.com/ urls to substitute icon 'hand.png' before link
 //
-LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL()
-{ 
-	mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?(/\\S*)?\\b",
+LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
+{                              
+	mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*",
 		boost::regex::perl|boost::regex::icase);
 	
 	mIcon = "Hand";
 	mMenuName = "menu_url_http.xml";
 }
 
-std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+std::string LLUrlEntrySecondlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
 {
-	LLUriParser up(url);
-	up.extractParts();
-	return up.host();
+	return urlToLabelWithGreyQuery(url);
 }
 
-std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const
+std::string LLUrlEntrySecondlifeURL::getQuery(const std::string &url) const
+{
+	return urlToGreyQuery(url);
+}
+
+std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const
 {
 	return url;
 }
 
+std::string LLUrlEntrySecondlifeURL::getUrl(const std::string &string) const
+{
+	if (string.find("://") == std::string::npos)
+	{
+		return "http://" + escapeUrl(string);
+	}
+	return escapeUrl(string);
+}
+
+//
+// LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link
+//
+LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL()
+  {
+	mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)",
+		boost::regex::perl|boost::regex::icase);
+
+	mIcon = "Hand";
+	mMenuName = "menu_url_http.xml";
+}
+
 //
 // LLUrlEntryAgent Describes a Second Life agent Url, e.g.,
 // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 41af3dfccf9816c88609c73afcee0a6fee4fc336..eabe29b1c0d02d3a59574d08eb52fc41aa89b6e4 100755
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -78,6 +78,9 @@ public:
 	/// Given a matched Url, return a label for the Url
 	virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; }
 
+	/// Return port, query and fragment parts for the Url
+	virtual std::string getQuery(const std::string &url) const { return ""; }
+
 	/// Return an icon that can be displayed next to Urls of this type
 	virtual std::string getIcon(const std::string &url);
 
@@ -104,6 +107,8 @@ public:
 
 	bool isWikiLinkCorrect(std::string url);
 
+	virtual bool isSLURLvalid(const std::string &url) const { return TRUE; };
+
 protected:
 	std::string getIDStringFromUrl(const std::string &url) const;
 	std::string escapeUrl(const std::string &url) const;
@@ -111,6 +116,8 @@ protected:
 	std::string getLabelFromWikiLink(const std::string &url) const;
 	std::string getUrlFromWikiLink(const std::string &string) const;
 	void addObserver(const std::string &id, const std::string &url, const LLUrlLabelCallback &cb); 
+	std::string urlToLabelWithGreyQuery(const std::string &url) const;
+	std::string urlToGreyQuery(const std::string &url) const;
 	virtual void callObservers(const std::string &id, const std::string &label, const std::string& icon);
 
 	typedef struct {
@@ -133,6 +140,9 @@ class LLUrlEntryHTTP : public LLUrlEntryBase
 public:
 	LLUrlEntryHTTP();
 	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+	/*virtual*/ std::string getQuery(const std::string &url) const;
+	/*virtual*/ std::string getUrl(const std::string &string) const;
+	/*virtual*/ std::string getTooltip(const std::string &url) const;
 };
 
 ///
@@ -155,7 +165,20 @@ class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase
 public:
 	LLUrlEntryHTTPNoProtocol();
 	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+	/*virtual*/ std::string getQuery(const std::string &url) const;
 	/*virtual*/ std::string getUrl(const std::string &string) const;
+	/*virtual*/ std::string getTooltip(const std::string &url) const;
+};
+
+class LLUrlEntryInvalidSLURL : public LLUrlEntryBase
+{
+public:
+	LLUrlEntryInvalidSLURL();
+	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+	/*virtual*/ std::string getUrl(const std::string &string) const;
+	/*virtual*/ std::string getTooltip(const std::string &url) const;
+
+	bool isSLURLvalid(const std::string &url) const;
 };
 
 ///
@@ -172,16 +195,24 @@ public:
 ///
 /// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls
 ///
-class LLUrlEntrySeconlifeURL : public LLUrlEntryBase
+class LLUrlEntrySecondlifeURL : public LLUrlEntryBase
 {
 public:
-	LLUrlEntrySeconlifeURL();
+	LLUrlEntrySecondlifeURL();
 	bool isTrusted() const { return true; }
 	/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+	/*virtual*/ std::string getQuery(const std::string &url) const;
 	/*virtual*/ std::string getTooltip(const std::string &url) const;
+	/*virtual*/ std::string getUrl(const std::string &string) const;
+};
 
-private:
-	std::string mLabel;
+///
+/// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls
+///
+class LLUrlEntrySimpleSecondlifeURL : public LLUrlEntrySecondlifeURL
+{
+public:
+	LLUrlEntrySimpleSecondlifeURL();
 };
 
 ///
diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp
index 016d1ca92d816ce3bd54addfbccd37aaed533ed1..2f2ac969e1ad293e36a8c7a1a7eeb39a0424f0e4 100755
--- a/indra/llui/llurlmatch.cpp
+++ b/indra/llui/llurlmatch.cpp
@@ -42,8 +42,8 @@ LLUrlMatch::LLUrlMatch() :
 {
 }
 
-void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
-						   const std::string &label, const std::string &tooltip,
+void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std::string &label,
+						   const std::string& query, const std::string &tooltip,
 						   const std::string &icon, const LLStyle::Params& style,
 						   const std::string &menu, const std::string &location,
 						   const LLUUID& id, bool underline_on_hover_only, bool trusted)
@@ -52,6 +52,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
 	mEnd = end;
 	mUrl = url;
 	mLabel = label;
+	mQuery = query;
 	mTooltip = tooltip;
 	mIcon = icon;
 	mStyle = style;
diff --git a/indra/llui/llurlmatch.h b/indra/llui/llurlmatch.h
index 9f8960b32f55d1d2aba5b8a843df5e39b98e5d2d..ff699902caa97d8a04d066ba21d91222af32deb3 100755
--- a/indra/llui/llurlmatch.h
+++ b/indra/llui/llurlmatch.h
@@ -62,6 +62,9 @@ public:
 	/// return a label that can be used for the display of this Url
 	std::string getLabel() const { return mLabel; }
 
+	/// return a right part of url which should be drawn in grey
+	std::string getQuery() const { return mQuery; }
+
 	/// return a message that could be displayed in a tooltip or status bar
 	std::string getTooltip() const { return mTooltip; }
 
@@ -85,10 +88,10 @@ public:
 
 	/// Change the contents of this match object (used by LLUrlRegistry)
 	void setValues(U32 start, U32 end, const std::string &url, const std::string &label,
-	               const std::string &tooltip, const std::string &icon,
+	               const std::string& query, const std::string &tooltip, const std::string &icon,
 				   const LLStyle::Params& style, const std::string &menu, 
 				   const std::string &location, const LLUUID& id,
-				   bool underline_on_hover_only = false, bool trusted = false );
+				   bool underline_on_hover_only = false, bool trusted = false);
 
 	const LLUUID& getID() const { return mID; }
 private:
@@ -96,6 +99,7 @@ private:
 	U32         mEnd;
 	std::string mUrl;
 	std::string mLabel;
+	std::string mQuery;
 	std::string mTooltip;
 	std::string mIcon;
 	std::string mMenuName;
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index e6f2b6e4b33dfd899be0190b18c9ab7275277f0d..a16ae5e4ae4d66f23d2dc9a1cb7be818b4d6338a 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -44,10 +44,13 @@ LLUrlRegistry::LLUrlRegistry()
 	registerUrl(new LLUrlEntryNoLink());
 	mUrlEntryIcon = new LLUrlEntryIcon();
 	registerUrl(mUrlEntryIcon);
+	mLLUrlEntryInvalidSLURL = new LLUrlEntryInvalidSLURL();
+	registerUrl(mLLUrlEntryInvalidSLURL);
 	registerUrl(new LLUrlEntrySLURL());
 
 	// decorated links for host names like: secondlife.com and lindenlab.com
-	registerUrl(new LLUrlEntrySeconlifeURL());
+	registerUrl(new LLUrlEntrySecondlifeURL());
+	registerUrl(new LLUrlEntrySimpleSecondlifeURL());
 
 	registerUrl(new LLUrlEntryHTTP());
 	mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel();
@@ -189,6 +192,14 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
 			if (start < match_start || match_entry == NULL)
 			{
 
+				if((mLLUrlEntryInvalidSLURL == *it))
+				{
+					if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1)))
+					{
+						continue;
+					}
+				}
+
 				if((mUrlEntryHTTPLabel == *it) || (mUrlEntrySLLabel == *it))
 				{
 					if(url_entry && !url_entry->isWikiLinkCorrect(text.substr(start, end - start + 1)))
@@ -217,6 +228,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
 		match.setValues(match_start, match_end,
 						match_entry->getUrl(url),
 						match_entry->getLabel(url, cb),
+						match_entry->getQuery(url),
 						match_entry->getTooltip(url),
 						match_entry->getIcon(url),
 						match_entry->getStyle(),
@@ -253,6 +265,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr
 
 		match.setValues(start, end, match.getUrl(), 
 						match.getLabel(),
+						match.getQuery(),
 						match.getTooltip(),
 						match.getIcon(),
 						match.getStyle(),
diff --git a/indra/llui/llurlregistry.h b/indra/llui/llurlregistry.h
index 1cb403dfc9f250e78881be0b474046fa7699e4a9..d85fbcb012ae82064c47e56a62a813923bfad2d8 100755
--- a/indra/llui/llurlregistry.h
+++ b/indra/llui/llurlregistry.h
@@ -94,6 +94,7 @@ private:
 
 	std::vector<LLUrlEntryBase *> mUrlEntry;
 	LLUrlEntryBase*	mUrlEntryIcon;
+	LLUrlEntryBase* mLLUrlEntryInvalidSLURL;
 	LLUrlEntryBase* mUrlEntryHTTPLabel;
 	LLUrlEntryBase* mUrlEntrySLLabel;
 };
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 55c1efefefd1c15ef9a5f06aad7a87ceb0cdeaf1..843886eb69794402e25ef5299048b929826e47d5 100755
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -151,7 +151,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure("empty()", match.empty());
 
-		match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(0, 1, "http://secondlife.com", "", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure("! empty()", ! match.empty());
 	}
 
@@ -164,7 +164,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getStart() == 0", match.getStart(), 0);
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getStart() == 10", match.getStart(), 10);
 	}
 
@@ -177,7 +177,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getEnd() == 0", match.getEnd(), 0);
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getEnd() == 20", match.getEnd(), 20);
 	}
 
@@ -190,10 +190,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getUrl() == ''", match.getUrl(), "");
 
-		match.setValues(10, 20, "http://slurl.com/", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "http://slurl.com/", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getUrl() == '' (2)", match.getUrl(), "");
 	}
 
@@ -206,10 +206,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getLabel() == ''", match.getLabel(), "");
 
-		match.setValues(10, 20, "", "Label", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "Label", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getLabel() == '' (2)", match.getLabel(), "");
 	}
 
@@ -222,10 +222,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getTooltip() == ''", match.getTooltip(), "");
 
-		match.setValues(10, 20, "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getTooltip() == '' (2)", match.getTooltip(), "");
 	}
 
@@ -238,10 +238,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getIcon() == ''", match.getIcon(), "");
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure_equals("getIcon() == '' (2)", match.getIcon(), "");
 	}
 
@@ -254,10 +254,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure("getMenuName() empty", match.getMenuName().empty());
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null);
 		ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure("getMenuName() empty (2)", match.getMenuName().empty());
 	}
 
@@ -270,10 +270,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure("getLocation() empty", match.getLocation().empty());
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null);
 		ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
+		match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
 		ensure("getLocation() empty (2)", match.getLocation().empty());
 	}
 }
diff --git a/indra/llwindow/llwindowheadless.cpp b/indra/llwindow/llwindowheadless.cpp
index e6e6bc67ff0ee0bc9dbf13c0e22f19a2012f463c..70f473281b6170f1c16ebb0bdbd66874952be003 100755
--- a/indra/llwindow/llwindowheadless.cpp
+++ b/indra/llwindow/llwindowheadless.cpp
@@ -51,4 +51,3 @@ LLWindowHeadless::~LLWindowHeadless()
 void LLWindowHeadless::swapBuffers()
 {
 }
-
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 1f767f4c97d65716942ba819684b4fc217478951..c692666df140d2203d35c2f2fe8c38b028efda79 100755
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -75,7 +75,8 @@ public:
 	/*virtual*/ void delayInputProcessing() {};
 	/*virtual*/ void swapBuffers();
 
-	// handy coordinate space conversion routines
+	
+    // handy coordinate space conversion routines
 	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
 	/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
 	/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index d7aa47f378d50f20990d84fa5143b7988de2a13e..fc1ea06d104b3f1514fe7f32c7a0f2af71ecf559 100755
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -904,6 +904,11 @@ void LLWindowMacOSX::swapBuffers()
 	CGLFlushDrawable(mContext);
 }
 
+void LLWindowMacOSX::restoreGLContext()
+{
+    CGLSetCurrentContext(mContext);
+}
+
 F32 LLWindowMacOSX::getGamma()
 {
 	F32 result = 2.2;	// Default to something sane
@@ -1158,6 +1163,8 @@ void LLWindowMacOSX::beforeDialog()
 
 void LLWindowMacOSX::afterDialog()
 {
+    //For fix problem with Core Flow view on OSX
+    restoreGLContext();
 }
 
 
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 825fd05c5f7cbdbfc499761e14aa534c56d59a68..9e9bd8ae394c2012254a12b104984a15e15a4e41 100755
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -87,7 +87,7 @@ public:
 	/*virtual*/ void gatherInput();
 	/*virtual*/ void delayInputProcessing() {};
 	/*virtual*/ void swapBuffers();
-
+	
 	// handy coordinate space conversion routines
 	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
 	/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to);
@@ -155,7 +155,9 @@ protected:
     
     //Satisfy MAINT-3135 and MAINT-3288 with a flag.
     /*virtual */ void setOldResize(bool oldresize) {setResizeMode(oldresize, mGLView); }
- 
+
+private:
+    void restoreGLContext();
 
 protected:
 	//
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index 8f70aee4f61c9c031d85a5b5dcf7cf8fcd1e102b..00e42240e6581ab5711eec62321480177ee121d9 100755
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -77,6 +77,7 @@ public:
 	/*virtual*/ void gatherInput() {};
 	/*virtual*/ void delayInputProcessing() {};
 	/*virtual*/ void swapBuffers();
+	/*virtual*/ void restoreGLContext() {};
 
 	// handy coordinate space conversion routines
 	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index c5ce892a042c9d0ea423610d07b5875b6d23cea5..7193e6f45ab2205bb71084c99bc75ce17674a07a 100755
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -97,6 +97,7 @@ public:
 	/*virtual*/ void processMiscNativeEvents();
 	/*virtual*/ void gatherInput();
 	/*virtual*/ void swapBuffers();
+	/*virtual*/ void restoreGLContext() {};
 
 	/*virtual*/ void delayInputProcessing() { };
 
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 169d264808d18677a807a5520e82783eeab7e750..2ca8d48fc7dc96f973a23e077d53bc09224c7aa4 100755
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -83,6 +83,7 @@ public:
 	/*virtual*/ void gatherInput();
 	/*virtual*/ void delayInputProcessing();
 	/*virtual*/ void swapBuffers();
+	/*virtual*/ void restoreGLContext() {};
 
 	// handy coordinate space conversion routines
 	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 8a6b760a10672bbc959044050c889ed81207fae8..6acb0edbfc58007eaf56b6daefa32f2e485f2f6a 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -250,6 +250,7 @@ set(viewer_SOURCE_FILES
     llfloaterhandler.cpp
     llfloaterhardwaresettings.cpp
     llfloaterhelpbrowser.cpp
+    llfloaterhoverheight.cpp
     llfloaterhud.cpp
     llfloaterimagepreview.cpp
     llfloaterimsessiontab.cpp
@@ -865,6 +866,7 @@ set(viewer_HEADER_FILES
     llfloaterhandler.h
     llfloaterhardwaresettings.h
     llfloaterhelpbrowser.h
+    llfloaterhoverheight.h
     llfloaterhud.h
     llfloaterimagepreview.h
     llfloaterimnearbychat.h
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 15cb5bc0ebd8f47778ca03807261ccc44c50d1eb..de3732f339c6d84cf6ad7bf84c3e246d366de09e 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,6 +43,7 @@
 					<key>tags</key>
 						<array>
 						<!-- sample entry for debugging specific items	
+						     <string>Avatar</string>
 						     <string>Inventory</string>
 						     <string>SceneLoadTiming</string>
 						     <string>Avatar</string>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 94d3c8a59fca5661fef53a4f3ffd6b3cb20a6526..2eb780ec5d711c73256cadba18b8310b67731e78 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -49,6 +49,17 @@
       <key>Value</key>
       <real>300</real>
     </map>
+    <key>AckCollectTime</key>
+    <map>
+      <key>Comment</key>
+      <string>Ack messages collection and grouping time</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+      <real>0.1</real>
+    </map>
     <key>AdminMenu</key>
     <map>
       <key>Comment</key>
@@ -654,6 +665,21 @@
       <key>Value</key>
       <integer>2</integer>
     </map>
+    <key>AvatarPosFinalOffset</key>
+    <map>
+      <key>Comment</key>
+      <string>After-everything-else fixup for avatar position.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Vector3</string>
+      <key>Value</key>
+      <array>
+        <real>0.0</real>
+        <real>0.0</real>
+        <real>0.0</real>
+      </array>
+    </map>
     <key>AvatarPickerURL</key>
     <map>
       <key>Comment</key>
@@ -5004,6 +5030,7 @@
       <key>Type</key>
       <string>LLSD</string>
       <key>Value</key>
+      <array />
     </map>
     <key>LSLFindCaseInsensitivity</key>
         <map>
@@ -11759,7 +11786,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <integer>0.0</integer>
+    <real>0.0</real>
   </map>
     <key>TextureFetchSource</key>
     <map>
@@ -13202,6 +13229,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>EnvironmentPersistAcrossLogin</key>
+    <map>
+      <key>Comment</key>
+      <string>Keep Environment settings consistent across sessions</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>UseDayCycle</key>
     <map>
       <key>Comment</key>
@@ -14093,17 +14131,6 @@
       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>MaxFPS</key>
-    <map>
-      <key>Comment</key>
-      <string>Yield some time to the local host if we reach a threshold framerate.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>-1.0</real>
-    </map>
     <key>ForcePeriodicRenderingTime</key>
     <map>
       <key>Comment</key>
@@ -15595,7 +15622,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-
 </map>
 </llsd>
 
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index fc6f1f6395f7f0cbbdec0d4bf70c2c02967acf22..d119504017d6ae6a1dbb1a9c1f9fbcf6904492c6 100755
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -1,5 +1,16 @@
 <llsd>
     <map>
+    <key>AvatarHoverOffsetZ</key>
+    <map>
+      <key>Comment</key>
+      <string>After-everything-else fixup for avatar Z position.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+        <real>0.0</real>
+    </map>
     <key>DoNotDisturbResponseChanged</key>
         <map>
         <key>Comment</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 5cb03cd2ae89689634fc64e791b4d11b90fe8d37..99fa12fc3268b5ec77e05bf5ade1707b76a93915 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -398,6 +398,8 @@ LLAgent::LLAgent() :
 	mAutoPilotFinishedCallback(NULL),
 	mAutoPilotCallbackData(NULL),
 	
+	mMovementKeysLocked(FALSE),
+
 	mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))),
 
 	mHaveHomePosition(FALSE),
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index a2e9cedd8841cf4ba11f0d8759859e30923fa905..33088283da50b2bc1c82155bbf3339c974ae82e2 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -515,6 +515,9 @@ public:
 	void			moveYaw(F32 mag, bool reset_view = true);
 	void			movePitch(F32 mag);
 
+	BOOL			isMovementLocked() const				{ return mMovementKeysLocked; }
+	void			setMovementLocked(BOOL set_locked)	{ mMovementKeysLocked = set_locked; }
+
 	//--------------------------------------------------------------------
  	// Move the avatar's frame
 	//--------------------------------------------------------------------
@@ -569,6 +572,7 @@ private:
 	void			(*mAutoPilotFinishedCallback)(BOOL, void *);
 	void*			mAutoPilotCallbackData;
 	LLUUID			mLeaderID;
+	BOOL			mMovementKeysLocked;
 	
 /**                    Movement
  **                                                                            **
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 2356a8468848a0297f582227600b66c65531f415..b0b2cfd435b3526539559dce7a8e8f398a8b172e 100755
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -35,6 +35,7 @@
 #include "llfloaterreg.h"
 #include "llhudmanager.h"
 #include "lljoystickbutton.h"
+#include "llmorphview.h"
 #include "llmoveview.h"
 #include "llselectmgr.h"
 #include "llsmoothstep.h"
@@ -2269,7 +2270,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
 
 		gFocusMgr.setKeyboardFocus( NULL );
 		gFocusMgr.setMouseCapture( NULL );
-
+		if( gMorphView )
+		{
+			gMorphView->setVisible( TRUE );
+		}
 		// Remove any pitch or rotation from the avatar
 		LLVector3 at = gAgent.getAtAxis();
 		at.mV[VZ] = 0.f;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4dc791feb216e09ad450e20fb6cbae412d7c3a41..b3fc642f6a2e2add05becc850b14d559d13d7e77 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -686,6 +686,8 @@ LLAppViewer::LLAppViewer()
 	mQuitRequested(false),
 	mLogoutRequestSent(false),
 	mYieldTime(-1),
+	mLastAgentControlFlags(0),
+	mLastAgentForceUpdate(0),
 	mMainloopTimeout(NULL),
 	mAgentRegionLastAlive(false),
 	mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
@@ -4838,22 +4840,24 @@ void LLAppViewer::idle()
 			gAgentPilot.updateTarget();
 			gAgent.autoPilot(&yaw);
 		}
-    
-	    static LLFrameTimer agent_update_timer;
-	    static U32 				last_control_flags;
-    
-	    //	When appropriate, update agent location to the simulator.
-	    F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
-	    BOOL flags_changed = gAgent.controlFlagsDirty() || (last_control_flags != gAgent.getControlFlags());
-		    
-	    if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
-	    {
-		    LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
-		    // Send avatar and camera info
-		    last_control_flags = gAgent.getControlFlags();
-		    send_agent_update(TRUE);
-		    agent_update_timer.reset();
-	    }
+
+		static LLFrameTimer agent_update_timer;
+
+		// When appropriate, update agent location to the simulator.
+		F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
+		F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
+		BOOL force_update = gAgent.controlFlagsDirty()
+							|| (mLastAgentControlFlags != gAgent.getControlFlags())
+							|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
+		if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
+		{
+			LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
+			// Send avatar and camera info
+			mLastAgentControlFlags = gAgent.getControlFlags();
+			mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
+			send_agent_update(force_update);
+			agent_update_timer.reset();
+		}
 	}
 
 	//////////////////////////////////////
@@ -5417,7 +5421,7 @@ void LLAppViewer::idleNetwork()
 		}
 
 		// Handle per-frame message system processing.
-		gMessageSystem->processAcks();
+		gMessageSystem->processAcks(gSavedSettings.getF32("AckCollectTime"));
 
 #ifdef TIME_THROTTLE_MESSAGES
 		if (total_time >= CheckMessagesMaxTime)
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 95b31cb94ef7071444df534ef2e46a868f19ec8b..718871138eba3350cb37456bd653f51d504b4baf 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -279,6 +279,8 @@ private:
     bool mQuitRequested;				// User wants to quit, may have modified documents open.
     bool mLogoutRequestSent;			// Disconnect message sent to simulator, no longer safe to send messages to the sim.
     S32 mYieldTime;
+	U32 mLastAgentControlFlags;
+	F32 mLastAgentForceUpdate;
 	struct SettingsFiles* mSettingsLocationList;
 
 	LLWatchdogTimeout* mMainloopTimeout;
@@ -318,6 +320,7 @@ public:
 
 // consts from viewer.h
 const S32 AGENT_UPDATES_PER_SECOND  = 10;
+const S32 AGENT_FORCE_UPDATES_PER_SECOND  = 1;
 
 // Globals with external linkage. From viewer.h
 // *NOTE:Mani - These will be removed as the Viewer App Cleanup project continues.
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index a98ff64d0a452b2580aa883012e7a2df45a03d0c..02e88a8b896e5e2d3f15f912ddbb53bd9a2f6be4 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -229,21 +229,34 @@ void LLAssetUploadResponder::httpFailure()
 {
 	// *TODO: Add adaptive retry policy?
 	LL_WARNS() << dumpResponse() << LL_ENDL;
-	LLSD args;
+	std::string reason;
 	if (isHttpClientErrorStatus(getStatus()))
 	{
-		args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
-		args["REASON"] = "Error in upload request.  Please visit "
+		reason = "Error in upload request.  Please visit "
 			"http://secondlife.com/support for help fixing this problem.";
-		LLNotificationsUtil::add("CannotUploadReason", args);
 	}
 	else
 	{
-		args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
-		args["REASON"] = "The server is experiencing unexpected "
+		reason = "The server is experiencing unexpected "
 			"difficulties.";
-		LLNotificationsUtil::add("CannotUploadReason", args);
 	}
+	LLSD args;
+	args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
+	args["REASON"] = reason;
+	LLNotificationsUtil::add("CannotUploadReason", args);
+
+	// unfreeze script preview
+	if(mAssetType == LLAssetType::AT_LSL_TEXT)
+	{
+		LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
+		if (preview)
+		{
+			LLSD errors;
+			errors.append(LLTrans::getString("UploadFailed") + reason);
+			preview->callbackLSLCompileFailed(errors);
+		}
+	}
+
 	LLUploadDialog::modalUploadFinished();
 	LLFilePicker::instance().reset();  // unlock file picker when bulk upload fails
 }
@@ -298,8 +311,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content)
 void LLAssetUploadResponder::uploadFailure(const LLSD& content)
 {
 	LL_WARNS() << dumpResponse() << LL_ENDL;
+
+	// unfreeze script preview
+	if(mAssetType == LLAssetType::AT_LSL_TEXT)
+	{
+		LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
+		if (preview)
+		{
+			LLSD errors;
+			errors.append(LLTrans::getString("UploadFailed") + content["message"].asString());
+			preview->callbackLSLCompileFailed(errors);
+		}
+	}
+
 	// remove the "Uploading..." message
 	LLUploadDialog::modalUploadFinished();
+
 	LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
 	if (floater_snapshot)
 	{
@@ -625,7 +652,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
 		  }
 		  else
 		  {
-			  LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id));
+			  LLSD floater_key;
+			  floater_key["taskid"] = task_id;
+			  floater_key["itemid"] = item_id;
+			  LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
 			  if (preview)
 			  {
 				  // Bytecode save completed
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8235b131181e17dccffb17a71b41557269b3979c..8dc8a2ff201ef94c2ce11a50a9ca2bd85d2e1f95 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -745,7 +745,7 @@ namespace action_give_inventory
 		}
 
 		std::string residents;
-		LLAvatarActions::buildResidentsString(avatar_names, residents);
+		LLAvatarActions::buildResidentsString(avatar_names, residents, true);
 
 		std::string items;
 		build_items_string(inventory_selected_uuids, items);
@@ -777,7 +777,7 @@ namespace action_give_inventory
 }
 
 // static
-void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string)
+void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name)
 {
 	llassert(avatar_names.size() > 0);
 	
@@ -785,7 +785,15 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name
 	const std::string& separator = LLTrans::getString("words_separator");
 	for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; )
 	{
-		residents_string.append((*it).getDisplayName());
+		if(complete_name)
+		{
+			residents_string.append((*it).getCompleteName());
+		}
+		else
+		{
+			residents_string.append((*it).getDisplayName());
+		}
+
 		if	(++it == avatar_names.end())
 		{
 			break;
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 85813f2152f99c100d815110184d15825a2716c7..bd0ac24e932c836fc6872bd7875c5d2d57e078e4 100755
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -221,7 +221,7 @@ public:
 	 * @param avatar_names - a vector of given avatar names from which resulting string is built
 	 * @param residents_string - the resulting string
 	 */
-	static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string);
+	static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name = false);
 
 	/**
 	 * Builds a string of residents' display names separated by "words_separator" string.
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index afbb73ee087200079e9ab352ff2c3fe5a4dda993..b6c5496c17d22f84e5964df190e4d7454cef385d 100755
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -860,7 +860,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
 {
 	LLAvatarName av_name;
 	LLAvatarNameCache::get( buddy_id, &av_name);
-	buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id);
+	buddy_map_t::value_type value(buddy_id, av_name.getDisplayName());
 	if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION))
 	{
 		mMappable.insert(value);
@@ -871,7 +871,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
 bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
 {
 	gCacheName->getFullName(buddy_id, mFullName);
-	buddy_map_t::value_type value(mFullName, buddy_id);
+	buddy_map_t::value_type value(buddy_id, mFullName);
 	if(buddy->isOnline())
 	{
 		mOnline.insert(value);
@@ -883,8 +883,8 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud
 {
 	LLAvatarName av_name;
 	LLAvatarNameCache::get(buddy_id, &av_name);
-	mFullName = av_name.getDisplayName();
-	buddy_map_t::value_type value(mFullName, buddy_id);
+	mFullName = av_name.getCompleteName();
+	buddy_map_t::value_type value(buddy_id, mFullName);
 	if(buddy->isOnline())
 	{
 		mOnline.insert(value);
diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h
index 8803cce59d0bda5222103a2233a5d48a48754b69..6e5fc01cd8511dfa025330f9db126f2c0d7c5c60 100755
--- a/indra/newview/llcallingcard.h
+++ b/indra/newview/llcallingcard.h
@@ -233,7 +233,7 @@ public:
 	LLCollectMappableBuddies() {}
 	virtual ~LLCollectMappableBuddies() {}
 	virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
-	typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+	typedef std::map<LLUUID, std::string> buddy_map_t;
 	buddy_map_t mMappable;
 	std::string mFullName;
 };
@@ -245,7 +245,7 @@ public:
 	LLCollectOnlineBuddies() {}
 	virtual ~LLCollectOnlineBuddies() {}
 	virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
-	typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+	typedef std::map<LLUUID, std::string> buddy_map_t;
 	buddy_map_t mOnline;
 	std::string mFullName;
 };
@@ -258,7 +258,7 @@ public:
 	LLCollectAllBuddies() {}
 	virtual ~LLCollectAllBuddies() {}
 	virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
-	typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+	typedef std::map<LLUUID, std::string> buddy_map_t;
 	buddy_map_t mOnline;
 	buddy_map_t mOffline;
 	std::string mFullName;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 84b9ac756a1ac91e44413b32ce950761ac54fd76..f0bd63ba468da1624c7e391d072a9b9f5a9a6868 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -1113,7 +1113,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 
 		if (irc_me && !use_plain_text_chat_history)
 		{
-			message = chat.mFromName + message;
+			std::string from_name = chat.mFromName;
+			LLAvatarName av_name;
+			if (!chat.mFromID.isNull() &&
+						LLAvatarNameCache::get(chat.mFromID, &av_name) &&
+						!av_name.isDisplayNameDefault())
+			{
+				from_name = av_name.getCompleteName();
+			}
+			message = from_name + message;
 		}
 		
 		if (square_brackets)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index c0823182c040ac90e43a463f625f1a0456bc2ee3..46b7679915bec3f6c9a9c4a90f0cbb4d1a715c5c 100755
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -376,6 +376,14 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
 	return TRUE;
 }
 
+void LLIMChiclet::hidePopupMenu()
+{
+	if (mPopupMenu)
+	{
+		mPopupMenu->setVisible(FALSE);
+	}
+}
+
 bool LLIMChiclet::canCreateMenu()
 {
 	if(mPopupMenu)
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index d5e3a55fdf61af1d296daf373736cf7db87abd8d..9201c6bc0082cb678b1d38ea6fb14e0c67d32aff 100755
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -305,6 +305,8 @@ public:
 	 */
 	virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
 
+	void hidePopupMenu();
+
 protected:
 
 	LLIMChiclet(const LLIMChiclet::Params& p);
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 4250aeacd6e4a9ddd7a1ba99a1f25639786326b8..b18e543f0a41cf9a84e7e693caaf4eb1930de4a8 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -296,7 +296,7 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
 	LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
 	LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
 	if (result 
-		&& getRoot()
+		&& getRoot() && (getRoot()->getCurSelectedItem() == this)
 		&& !(volume_floater && volume_floater->isShown() && volume_floater->hasFocus())
 		&& !(chat_volume_floater && chat_volume_floater->isShown() && chat_volume_floater->hasFocus()))
 	{
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
index 131675310ee1b5082a2a33d369a9f7b2bf728427..803e2b2fb22e9544df263b883be8b6c326b1d5b3 100755
--- a/indra/newview/lldaycyclemanager.cpp
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -207,7 +207,7 @@ bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data)
 {
 	if (name.empty())
 	{
-		llassert(name.empty());
+		//llassert(name.empty());
 		return false;
 	}
 
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index c56006d9a3672fa7c3a6305b1a21eb4230ad8afa..73930c2115543849fdaaccdcb8be4be15cab2f43 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1117,7 +1117,14 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
 		retval = gPipeline.getSpatialPartition((LLViewerObject*) mVObjp);
 	}
 	else if (isRoot())
-	{	//must be an active volume
+	{
+		if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment())
+		{
+			// remove obsolete bridge
+			mSpatialBridge->markDead();
+			setSpatialBridge(NULL);
+		}
+		//must be an active volume
 		if (!mSpatialBridge)
 		{
 			if (mVObjp->isHUDAttachment())
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index 41d378fea14f11ec06ac6650c0bebce31ee0604f..a626ad1bffa7b9220cb290ce369c7d806a86d8bb 100755
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -303,7 +303,8 @@ void LLEnvManagerNew::loadUserPrefs()
 	mUserPrefs.mSkyPresetName	= gSavedSettings.getString("SkyPresetName");
 	mUserPrefs.mDayCycleName	= gSavedSettings.getString("DayCycleName");
 
-	mUserPrefs.mUseRegionSettings	= gSavedSettings.getBOOL("UseEnvironmentFromRegion");
+	bool use_region_settings = gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin") ? gSavedSettings.getBOOL("UseEnvironmentFromRegion") : true;
+	mUserPrefs.mUseRegionSettings	= use_region_settings;
 	mUserPrefs.mUseDayCycle			= gSavedSettings.getBOOL("UseDayCycle");
 
 	if (mUserPrefs.mUseRegionSettings)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 32b510b21a57943efbe3692de6d6896a950ccf1f..de349a03d4cafe9878c5e53bbae42b2335995c00 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -330,24 +330,52 @@ void LLFace::dirtyTexture()
 				{
 					vobj->mLODChanged = TRUE;
 
-			LLVOAvatar* avatar = vobj->getAvatar();
-			if (avatar)
-			{ //avatar render cost may have changed
-				avatar->updateVisualComplexity();
-			}
+					LLVOAvatar* avatar = vobj->getAvatar();
+					if (avatar)
+					{ //avatar render cost may have changed
+						avatar->updateVisualComplexity();
+					}
 				}
 				gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
 			}
 		}
 	}
-			
+
 	gPipeline.markTextured(drawablep);
 }
 
+void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{
+	LLDrawable* drawablep = getDrawable();
+	if(mVObjp.notNull() && mVObjp->getVolume())
+	{
+		LLVOVolume *vobj = drawablep->getVOVolume();
+		if(vobj && vobj->notifyAboutCreatingTexture(texture))
+		{
+			gPipeline.markTextured(drawablep);
+			gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+		}
+	}
+}
+
+void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture)
+{
+	LLDrawable* drawablep = getDrawable();
+	if(mVObjp.notNull() && mVObjp->getVolume())
+	{
+		LLVOVolume *vobj = drawablep->getVOVolume();
+		if(vobj && vobj->notifyAboutMissingAsset(texture))
+		{
+			gPipeline.markTextured(drawablep);
+			gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+		}
+	}
+}
+
 void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
 {
 	llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
-	
+
 	if(mTexture[ch] == new_texture)
 	{
 		return ;
@@ -956,6 +984,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
 	const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset);
 	const LLVector4a& normal4a = vf.mNormals[0];
 	const LLVector4a& tangent = vf.mTangents[0];
+	if (!&tangent)
+	{
+		return;
+	}
 
 	LLVector4a binormal4a;
 	binormal4a.setCross3(normal4a, tangent);
@@ -1299,15 +1331,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 			}
 
 			if (shiny_in_alpha)
-		{
-
-			GLfloat alpha[4] =
 			{
-				0.00f,
-				0.25f,
-				0.5f,
-				0.75f
-			};
+
+				static const GLfloat alpha[4] =
+				{
+					0.00f,
+					0.25f,
+					0.5f,
+					0.75f
+				};
 			
 				llassert(tep->getShiny() <= 3);
 				color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index d3a561faccfd6861849f8b78a4f806c84a7245db..ee545acb94104c53bde604d81844acab02e1000f 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -218,7 +218,7 @@ public:
 	void        setHasMedia(bool has_media)  { mHasMedia = has_media ;}
 	BOOL        hasMedia() const ;
 
-	BOOL                  switchTexture() ;
+	BOOL		switchTexture() ;
 
 	//vertex buffer tracking
 	void setVertexBuffer(LLVertexBuffer* buffer);
@@ -230,10 +230,13 @@ public:
 
 	static U32 getRiggedDataMask(U32 type);
 
+	void	notifyAboutCreatingTexture(LLViewerTexture *texture);
+	void	notifyAboutMissingAsset(LLViewerTexture *texture);
+
 public: //aligned members
 	LLVector4a		mExtents[2];
 
-private:	
+private:
 	F32         adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
 	BOOL        calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
 public:
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 513c33e60d61e0c77ac60965ede474d0fa55671a..566a3c9cd3950dc4b90241c58312f1a536976f2c 100755
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -348,11 +348,11 @@ void LLFloaterAvatarPicker::populateFriend()
 	
 	for(it = collector.mOnline.begin(); it!=collector.mOnline.end(); it++)
 	{
-		friends_scroller->addStringUUIDItem(it->first, it->second);
+		friends_scroller->addStringUUIDItem(it->second, it->first);
 	}
 	for(it = collector.mOffline.begin(); it!=collector.mOffline.end(); it++)
 	{
-			friends_scroller->addStringUUIDItem(it->first, it->second);
+		friends_scroller->addStringUUIDItem(it->second, it->first);
 	}
 	friends_scroller->sortByColumnIndex(0, TRUE);
 }
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index ad44c509d99abc0cbcafaf5d8ca4c261f29bbe83..34904cf7eda2fc38695e57d85ba148cfed3cdff5 100755
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -30,10 +30,17 @@
 #include "llsd.h"
 #include "mean_collision_data.h"
 
+#include "llavataractions.h"
 #include "llfloaterbump.h"
+#include "llfloaterreporter.h"
+#include "llmutelist.h"
+#include "llpanelblockedlist.h"
 #include "llscrolllistctrl.h"
+#include "lltrans.h"
 #include "lluictrlfactory.h"
 #include "llviewermessage.h"
+#include "llviewermenu.h"
+#include "llviewerobjectlist.h"
 
 ///----------------------------------------------------------------------------
 /// Class LLFloaterBump
@@ -43,6 +50,18 @@
 LLFloaterBump::LLFloaterBump(const LLSD& key) 
 :	LLFloater(key)
 {
+	mCommitCallbackRegistrar.add("Avatar.SendIM", boost::bind(&LLFloaterBump::startIM, this));
+	mCommitCallbackRegistrar.add("Avatar.ReportAbuse", boost::bind(&LLFloaterBump::reportAbuse, this));
+	mCommitCallbackRegistrar.add("ShowAgentProfile", boost::bind(&LLFloaterBump::showProfile, this));
+	mCommitCallbackRegistrar.add("Avatar.InviteToGroup", boost::bind(&LLFloaterBump::inviteToGroup, this));
+	mCommitCallbackRegistrar.add("Avatar.Call", boost::bind(&LLFloaterBump::startCall, this));
+	mEnableCallbackRegistrar.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
+	mCommitCallbackRegistrar.add("Avatar.AddFriend", boost::bind(&LLFloaterBump::addFriend, this));
+	mEnableCallbackRegistrar.add("Avatar.EnableAddFriend", boost::bind(&LLFloaterBump::enableAddFriend, this));
+	mCommitCallbackRegistrar.add("Avatar.Mute", boost::bind(&LLFloaterBump::muteAvatar, this));
+	mEnableCallbackRegistrar.add("Avatar.EnableMute", boost::bind(&LLFloaterBump::enableMute, this));
+	mCommitCallbackRegistrar.add("PayObject", boost::bind(&LLFloaterBump::payAvatar, this));
+	mCommitCallbackRegistrar.add("Tools.LookAtSelection", boost::bind(&LLFloaterBump::zoomInAvatar, this));
 }
 
 
@@ -51,13 +70,25 @@ LLFloaterBump::~LLFloaterBump()
 {
 }
 
+BOOL LLFloaterBump::postBuild()
+{
+	mList = getChild<LLScrollListCtrl>("bump_list");
+	mList->setAllowMultipleSelection(false);
+	mList->setRightMouseDownCallback(boost::bind(&LLFloaterBump::onScrollListRightClicked, this, _1, _2, _3));
+
+	mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+	mPopupMenu->setItemVisible(std::string("Normal"), false);
+	mPopupMenu->setItemVisible(std::string("Always use impostor"), false);
+	mPopupMenu->setItemVisible(std::string("Never use impostor"), false);
+	mPopupMenu->setItemVisible(std::string("Impostor seperator"), false);
+
+	return TRUE;
+}
 // virtual
 void LLFloaterBump::onOpen(const LLSD& key)
 {
-	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("bump_list");
-	if (!list)
-		return;
-	list->deleteAllItems();
+	mNames.clear();
+	mList->deleteAllItems();
 
 	if (gMeanCollisionList.empty())
 	{
@@ -65,7 +96,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
 		LLSD row;
 		row["columns"][0]["value"] = none_detected;
 		row["columns"][0]["font"] = "SansSerifBold";
-		list->addElement(row);
+		mList->addElement(row);
 	}
 	else
 	{
@@ -73,7 +104,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
 			 iter != gMeanCollisionList.end(); ++iter)
 		{
 			LLMeanCollisionData *mcd = *iter;
-			add(list, mcd);
+			add(mList, mcd);
 		}
 	}
 }
@@ -125,4 +156,94 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
 	row["columns"][0]["value"] = text;
 	row["columns"][0]["font"] = "SansSerifBold";
 	list->addElement(row);
+
+
+	mNames[mcd->mPerp] = mcd->mFullName;
+}
+
+
+void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y)
+{
+	if (!gMeanCollisionList.empty())
+	{
+		LLScrollListItem* item = mList->hitItem(x, y);
+		if (item && mPopupMenu)
+		{
+			mItemUUID = item->getUUID();
+			mPopupMenu->buildDrawLabels();
+			mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
+
+			std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar";
+			mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg));
+			mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID));
+
+			((LLContextMenu*)mPopupMenu)->show(x, y);
+			LLMenuGL::showPopup(ctrl, mPopupMenu, x, y);
+		}
+	}
+}
+
+
+void LLFloaterBump::startIM()
+{
+	LLAvatarActions::startIM(mItemUUID);
+}
+
+void LLFloaterBump::startCall()
+{
+	LLAvatarActions::startCall(mItemUUID);
+}
+
+void LLFloaterBump::reportAbuse()
+{
+	LLFloaterReporter::showFromAvatar(mItemUUID, "av_name");
+}
+
+void LLFloaterBump::showProfile()
+{
+	LLAvatarActions::showProfile(mItemUUID);
+}
+
+void LLFloaterBump::addFriend()
+{
+	LLAvatarActions::requestFriendshipDialog(mItemUUID);
+}
+
+bool LLFloaterBump::enableAddFriend()
+{
+	return !LLAvatarActions::isFriend(mItemUUID);
+}
+
+void LLFloaterBump::muteAvatar()
+{
+	LLMute mute(mItemUUID, mNames[mItemUUID], LLMute::AGENT);
+	if (LLMuteList::getInstance()->isMuted(mute.mID))
+	{
+		LLMuteList::getInstance()->remove(mute);
+	}
+	else
+	{
+		LLMuteList::getInstance()->add(mute);
+		LLPanelBlockedList::showPanelAndSelect(mute.mID);
+	}
+}
+
+void LLFloaterBump::payAvatar()
+{
+	LLAvatarActions::pay(mItemUUID);
+}
+
+void LLFloaterBump::zoomInAvatar()
+{
+	handle_zoom_to_object(mItemUUID);
+}
+
+bool LLFloaterBump::enableMute()
+{
+	return LLAvatarActions::canBlock(mItemUUID);
+}
+
+void LLFloaterBump::inviteToGroup()
+{
+	LLAvatarActions::inviteToGroup(mItemUUID);
 }
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index 5acab6da8cd2e8c016f9bb222e36c4472abce9cc..11b7db9fee054296c83dc9fe08657dfa2143425c 100755
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -29,6 +29,7 @@
 #define LL_LLFLOATERBUMP_H
 
 #include "llfloater.h"
+#include "llmenugl.h"
 
 class LLMeanCollisionData;
 class LLScrollListCtrl;
@@ -39,14 +40,36 @@ class LLFloaterBump
 	friend class LLFloaterReg;
 protected:
 	void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
+	void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y);
 
 public:
+	/*virtual*/	BOOL postBuild();
 	/*virtual*/ void onOpen(const LLSD& key);
 	
+	void startIM();
+	void startCall();
+	void reportAbuse();
+	void showProfile();
+	void addFriend();
+	void inviteToGroup();
+	bool enableAddFriend();
+	void muteAvatar();
+	void payAvatar();
+	void zoomInAvatar();
+	bool enableMute();
+
 private:
 	
 	LLFloaterBump(const LLSD& key);
 	virtual ~LLFloaterBump();
+
+	LLScrollListCtrl* mList;
+	LLMenuGL* mPopupMenu;
+	LLUUID mItemUUID;
+
+	typedef std::map<LLUUID, std::string> uuid_map_t;
+	uuid_map_t mNames;
+
 };
 
 #endif
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index d0939b3eee5f7ddcecc353ad5d3b7caf2ca2f625..ef08db3d33edd0e17904d12dc4e872af18451190 100755
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -32,6 +32,7 @@
 #include "llfloaterreg.h"
 
 // Viewer includes
+#include "llagent.h"
 #include "llagentcamera.h"
 #include "lljoystickbutton.h"
 #include "llviewercontrol.h"
@@ -342,6 +343,8 @@ void LLFloaterCamera::onClose(bool app_quitting)
 
 	switchMode(CAMERA_CTRL_MODE_PAN);
 	mClosed = TRUE;
+
+	gAgent.setMovementLocked(FALSE);
 }
 
 LLFloaterCamera::LLFloaterCamera(const LLSD& val)
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 0c59ba9a6dcfd0fd7c065c4be8c81d428a9dd03f..535cb368bdbdefe7adeb6c8f831612f6c14d946f 100755
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -342,11 +342,6 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
 	curG = curGIn;
 	curB = curBIn;
 
-	if (mApplyImmediateCheck->get())
-	{
-		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
-	}
-
 	// update corresponding HSL values and
 	LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL);
 
@@ -374,11 +369,6 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
 
 	// update corresponding RGB values and
 	hslToRgb ( curH, curS, curL, curR, curG, curB );
-
-	if (mApplyImmediateCheck->get())
-	{
-		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
-	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -467,7 +457,8 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
 
 void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
 {
-	setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
+	// Pipete
+	selectCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
 }
 
 void LLFloaterColorPicker::onMouseCaptureLost()
@@ -642,6 +633,28 @@ const LLColor4& LLFloaterColorPicker::getComplimentaryColor ( const LLColor4& ba
 	return LLColor4::black;
 }
 
+//////////////////////////////////////////////////////////////////////////////
+// set current RGB and rise change event if needed.
+void LLFloaterColorPicker::selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
+{
+	setCurRgb(curRIn, curGIn, curBIn);
+	if (mApplyImmediateCheck->get())
+	{
+		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
+	}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// set current HSL and rise change event if needed.
+void LLFloaterColorPicker::selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
+{
+	setCurHsl(curHIn, curSIn, curLIn);
+	if (mApplyImmediateCheck->get())
+	{
+		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
+	}
+}
+
 //////////////////////////////////////////////////////////////////////////////
 // draw color palette
 void LLFloaterColorPicker::drawPalette ()
@@ -736,7 +749,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
 		}
 
 		// update current RGB (and implicitly HSL)
-		setCurRgb ( rVal, gVal, bVal );
+		selectCurRgb ( rVal, gVal, bVal );
 
 		updateTextEntry ();
 	}
@@ -759,15 +772,10 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
 			lVal = (F32)ctrl->getValue().asReal() / 100.0f;
 
 		// update current HSL (and implicitly RGB)
-		setCurHsl ( hVal, sVal, lVal );
+		selectCurHsl ( hVal, sVal, lVal );
 
 		updateTextEntry ();
 	}
-
-	if (mApplyImmediateCheck->get())
-	{
-		LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
-	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -780,7 +788,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
 		 yPosIn >= mRGBViewerImageTop - mRGBViewerImageHeight )
 	{
 		// update HSL (and therefore RGB) based on new H & S and current L
-		setCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
+		selectCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
 					( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight,
 					getCurL () );
 
@@ -795,7 +803,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
 	{
 
 		// update HSL (and therefore RGB) based on current HS and new L
-		 setCurHsl ( getCurH (),
+		 selectCurHsl ( getCurH (),
 					 getCurS (),
 					( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight );
 
@@ -887,7 +895,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
 		{
 			LLColor4 selected = *mPalette [ index ];
 
-			setCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
+			selectCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
 
 			if (mApplyImmediateCheck->get())
 			{
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index d4d22b643a79d8830160c42e0ae145a627510836..8c16ebdf0343c2843f166ee50524cc33751d003a 100755
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -122,6 +122,9 @@ class LLFloaterColorPicker
 		static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
 			   void onColorSelect( const class LLTextureEntry& te );
 	private:
+		// mutators for color values, can raise event to preview changes at object
+		void selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn );
+		void selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn );
 		// draws color selection palette
 		void drawPalette ();
 
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp
index 36afab86b79b7b12bd18f450949aa57d1f50d60b..600606d83871abb1734777b2c2bf8ebc164e0a5c 100644
--- a/indra/newview/llfloaterflickr.cpp
+++ b/indra/newview/llfloaterflickr.cpp
@@ -51,7 +51,7 @@
 #include "lltabcontainer.h"
 #include "llviewerparcelmgr.h"
 #include "llviewerregion.h"
-
+#include <boost/regex.hpp>
 static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel");
 static LLPanelInjector<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel");
 
@@ -345,7 +345,12 @@ void LLFlickrPhotoPanel::sendPhoto()
 		std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
 		if (!parcel_name.empty())
 		{
-			photo_link_text += " at " + parcel_name;
+			boost::regex pattern = boost::regex("\\S\\.[a-zA-Z]{2,}");
+			boost::match_results<std::string::const_iterator> matches;
+			if(!boost::regex_search(parcel_name, matches, pattern))
+			{
+				photo_link_text += " at " + parcel_name;
+			}
 		}
 		photo_link_text += " in Second Life";
 
diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..8908626de6a737aa7cd46ef32ed00f51b76a42ac
--- /dev/null
+++ b/indra/newview/llfloaterhoverheight.cpp
@@ -0,0 +1,157 @@
+/** 
+* @file llfloaterhoverheight.cpp
+* @brief Controller for self avatar hover height
+* @author vir@lindenlab.com
+*
+* $LicenseInfo:firstyear=2014&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2014, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+* $/LicenseInfo$
+*/
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterhoverheight.h"
+#include "llsliderctrl.h"
+#include "llviewercontrol.h"
+#include "llsdserialize.h"
+#include "llhttpclient.h"
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "llvoavatarself.h"
+
+LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key)
+{
+}
+
+void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data)
+{
+	F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+
+	LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data);
+	LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider");
+	sldrCtrl->setValue(value,FALSE);
+
+	if (isAgentAvatarValid())
+	{
+		LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+		LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
+		gAgentAvatarp->setHoverOffset(offset);
+		//gAgentAvatarp->sendHoverHeight();
+	}
+}
+
+BOOL LLFloaterHoverHeight::postBuild()
+{
+	LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+	sldrCtrl->setMinValue(MIN_HOVER_Z);
+	sldrCtrl->setMaxValue(MAX_HOVER_Z);
+	sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
+	sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
+	childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL);
+
+	// Initialize slider from pref setting.
+	syncFromPreferenceSetting(this);
+	// Update slider on future pref changes.
+	if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
+	{
+		gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this));
+	}
+	else
+	{
+		LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL;
+	}
+
+	updateEditEnabled();
+
+	if (!mRegionChangedSlot.connected())
+	{
+		mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this));
+	}
+	// Set up based on initial region.
+	onRegionChanged();
+
+	return TRUE;
+}
+
+void LLFloaterHoverHeight::onClose(bool app_quitting)
+{
+	if (mRegionChangedSlot.connected())
+	{
+		mRegionChangedSlot.disconnect();
+	}
+}
+
+// static
+void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
+{
+	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
+	F32 value = sldrCtrl->getValueF32();
+	LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+	LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
+	gAgentAvatarp->setHoverOffset(offset, false);
+}
+
+// Do send-to-the-server work when slider drag completes, or new
+// value entered as text.
+void LLFloaterHoverHeight::onFinalCommit()
+{
+	LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+	F32 value = sldrCtrl->getValueF32();
+	gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value);
+
+	LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+	LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
+	gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
+}
+
+void LLFloaterHoverHeight::onRegionChanged()
+{
+	LLViewerRegion *region = gAgent.getRegion();
+	if (region && region->simulatorFeaturesReceived())
+	{
+		updateEditEnabled();
+	}
+	else if (region)
+	{
+		region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLFloaterHoverHeight::onSimulatorFeaturesReceived,this,_1));
+	}
+}
+
+void LLFloaterHoverHeight::onSimulatorFeaturesReceived(const LLUUID &region_id)
+{
+	LLViewerRegion *region = gAgent.getRegion();
+	if (region && (region->getRegionID()==region_id))
+	{
+		updateEditEnabled();
+	}
+}
+
+void LLFloaterHoverHeight::updateEditEnabled()
+{
+	bool enabled = gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled();
+	LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+	sldrCtrl->setEnabled(enabled);
+	if (enabled)
+	{
+		syncFromPreferenceSetting(this);
+	}
+}
+
+
diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h
new file mode 100755
index 0000000000000000000000000000000000000000..ee065bc184a18c7d9749bea8959b0909a07d2e17
--- /dev/null
+++ b/indra/newview/llfloaterhoverheight.h
@@ -0,0 +1,52 @@
+/** 
+* @file   llfloaterhoverheight.h
+* @brief  Controller for self avatar hover height.
+* @author vir@lindenlab.com
+*
+* $LicenseInfo:firstyear=2014&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2014, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+* $/LicenseInfo$
+*/
+#ifndef LL_LLFLOATERHOVERHEIGHT_H
+#define LL_LLFLOATERHOVERHEIGHT_H
+
+#include "llfloater.h"
+
+class LLFloaterHoverHeight: public LLFloater
+{
+public:
+	LLFloaterHoverHeight(const LLSD& key);
+	BOOL postBuild();
+
+	static void onSliderMoved(LLUICtrl* ctrl, void* userData);
+
+	void onFinalCommit();
+
+	static void syncFromPreferenceSetting(void *user_data);
+
+	void onRegionChanged();
+	void onSimulatorFeaturesReceived(const LLUUID &region_id);
+	void updateEditEnabled();
+
+	/*virtual*/ void onClose(bool app_quitting);
+	boost::signals2::connection mRegionChangedSlot;
+};
+
+#endif
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 2864f018b203b594eb95c21bc292a84464bc4a91..357b635594367d21e08bf9f6d14862565e2e5b69 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -118,6 +118,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid
 	else
 	{
 		conv = LLFloaterReg::getTypedInstance<LLFloaterIMSessionTab>("impanel", LLSD(uuid));
+		conv->setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE);
 	}
 
 	return conv;
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 5a1dfc99ab53b95714ac909af9de28c39e555d50..10088d20c2353e12f5c97361fac7f4cab68b032f 100755
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -32,6 +32,7 @@
 #include "llfloatertools.h"
 #include "llavataractions.h"
 #include "llavatarnamecache.h"
+#include "llgroupactions.h"
 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
 #include "llselectmgr.h"
@@ -147,8 +148,17 @@ void LLFloaterInspect::onClickOwnerProfile()
 		LLSelectNode* node = mObjectSelection->getFirstNode(&func);
 		if(node)
 		{
-			const LLUUID& owner_id = node->mPermissions->getOwner();
-			LLAvatarActions::showProfile(owner_id);
+			if(node->mPermissions->isGroupOwned())
+			{
+				const LLUUID& idGroup = node->mPermissions->getGroup();
+				LLGroupActions::show(idGroup);
+			}
+			else
+			{
+				const LLUUID& owner_id = node->mPermissions->getOwner();
+				LLAvatarActions::showProfile(owner_id);
+			}
+
 		}
 	}
 }
@@ -219,21 +229,42 @@ void LLFloaterInspect::refresh()
 		const LLUUID& idCreator = obj->mPermissions->getCreator();
 		LLAvatarName av_name;
 
-		// Only work with the names if we actually get a result
-		// from the name cache. If not, defer setting the
-		// actual name and set a placeholder.
-		if (LLAvatarNameCache::get(idOwner, &av_name))
+		if(obj->mPermissions->isGroupOwned())
 		{
-			owner_name = av_name.getCompleteName();
+			std::string group_name;
+			const LLUUID& idGroup = obj->mPermissions->getGroup();
+			if(gCacheName->getGroupName(idGroup, group_name))
+			{
+				owner_name = "[" + group_name + "] (group)";
+			}
+			else
+			{
+				owner_name = LLTrans::getString("RetrievingData");
+				if (mOwnerNameCacheConnection.connected())
+				{
+					mOwnerNameCacheConnection.disconnect();
+				}
+				mOwnerNameCacheConnection = gCacheName->getGroup(idGroup, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
+			}
 		}
 		else
 		{
-			owner_name = LLTrans::getString("RetrievingData");
-			if (mOwnerNameCacheConnection.connected())
+			// Only work with the names if we actually get a result
+			// from the name cache. If not, defer setting the
+			// actual name and set a placeholder.
+			if (LLAvatarNameCache::get(idOwner, &av_name))
+			{
+				owner_name = av_name.getCompleteName();
+			}
+			else
 			{
-				mOwnerNameCacheConnection.disconnect();
+				owner_name = LLTrans::getString("RetrievingData");
+				if (mOwnerNameCacheConnection.connected())
+				{
+					mOwnerNameCacheConnection.disconnect();
+				}
+				mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
 			}
-			mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
 		}
 
 		if (LLAvatarNameCache::get(idCreator, &av_name))
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4731385d41459d99fcc390d344ed0557793d5020..c1e2d89a84889e596c3c95c1f82ca988c6e5eb08 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2019,6 +2019,7 @@ void LLPanelLandOptions::refresh()
 	else
 	{
 		// something selected, hooray!
+		LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
 
 		// Display options
 		BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
@@ -2034,8 +2035,9 @@ void LLPanelLandOptions::refresh()
 		mCheckGroupObjectEntry	->set( parcel->getAllowGroupObjectEntry() ||  parcel->getAllowAllObjectEntry());
 		mCheckGroupObjectEntry	->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
 		
+		BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE;
 		mCheckSafe			->set( !parcel->getAllowDamage() );
-		mCheckSafe			->setEnabled( can_change_options );
+		mCheckSafe			->setEnabled( can_change_options && region_damage );
 
 		mCheckFly			->set( parcel->getAllowFly() );
 		mCheckFly			->setEnabled( can_change_options );
@@ -2115,7 +2117,6 @@ void LLPanelLandOptions::refresh()
 			
 			// they can see the checkbox, but its disposition depends on the 
 			// state of the region
-			LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
 			if (regionp)
 			{
 				if (regionp->getSimAccess() == SIM_ACCESS_PG)
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0c81ab7e79400a8c7d924454b49037f5111951d2..e0a998c3699034d2b0ceb22108f2bbc3d755cae5 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -738,6 +738,11 @@ void LLFloaterModelPreview::toggleGenarateNormals()
 {
 	bool enabled = childGetValue("gen_normals").asBoolean();
 	childSetEnabled("crease_angle", enabled);
+	if(enabled) {
+		mModelPreview->generateNormals();
+	} else {
+		mModelPreview->restoreNormals();
+	}
 }
 
 //static
@@ -3840,7 +3845,6 @@ void LLModelPreview::generateNormals()
 
 	S32 which_lod = mPreviewLOD;
 
-
 	if (which_lod > 4 || which_lod < 0 ||
 		mModel[which_lod].empty())
 	{
@@ -3855,19 +3859,81 @@ void LLModelPreview::generateNormals()
 
 	if (which_lod == 3 && !mBaseModel.empty())
 	{
-		for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
+		if(mBaseModelFacesCopy.empty())
+		{
+			mBaseModelFacesCopy.reserve(mBaseModel.size());
+			for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
+			{
+				v_LLVolumeFace_t faces;
+				(*it)->copyFacesTo(faces);
+				mBaseModelFacesCopy.push_back(faces);
+			}
+		}
+
+		for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
 		{
-			(*iter)->generateNormals(angle_cutoff);
+			(*it)->generateNormals(angle_cutoff);
 		}
 
 		mVertexBuffer[5].clear();
 	}
 
-	for (LLModelLoader::model_list::iterator iter = mModel[which_lod].begin(); iter != mModel[which_lod].end(); ++iter)
+	bool perform_copy = mModelFacesCopy[which_lod].empty();
+	if(perform_copy) {
+		mModelFacesCopy[which_lod].reserve(mModel[which_lod].size());
+	}
+
+	for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it)
+	{
+		if(perform_copy)
+		{
+			v_LLVolumeFace_t faces;
+			(*it)->copyFacesTo(faces);
+			mModelFacesCopy[which_lod].push_back(faces);
+		}
+
+		(*it)->generateNormals(angle_cutoff);
+	}
+
+	mVertexBuffer[which_lod].clear();
+	refresh();
+	updateStatusMessages();
+}
+
+void LLModelPreview::restoreNormals()
+{
+	S32 which_lod = mPreviewLOD;
+
+	if (which_lod > 4 || which_lod < 0 ||
+		mModel[which_lod].empty())
+	{
+		return;
+	}
+
+	if(!mBaseModelFacesCopy.empty())
 	{
-		(*iter)->generateNormals(angle_cutoff);
+		llassert(mBaseModelFacesCopy.size() == mBaseModel.size());
+
+		vv_LLVolumeFace_t::const_iterator itF = mBaseModelFacesCopy.begin();
+		for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it, ++itF)
+		{
+			(*it)->copyFacesFrom((*itF));
+		}
+
+		mBaseModelFacesCopy.clear();
 	}
+	
+	if(!mModelFacesCopy[which_lod].empty())
+	{
+		vv_LLVolumeFace_t::const_iterator itF = mModelFacesCopy[which_lod].begin();
+		for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it, ++itF)
+		{
+			(*it)->copyFacesFrom((*itF));
+		}
 
+		mModelFacesCopy[which_lod].clear();
+	}
+	
 	mVertexBuffer[which_lod].clear();
 	refresh();
 	updateStatusMessages();
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 6c0c60b87fb648cf6322d4c806444971f0bb1aa1..618748bd4ea417e2d3d6504cdc9057b6f52d0939 100755
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -343,6 +343,7 @@ public:
 	void loadModelCallback(S32 lod);
 	void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
 	void generateNormals();
+	void restoreNormals();
 	U32 calcResourceCost();
 	void rebuildUploadData();
 	void saveUploadData(bool save_skinweights, bool save_joint_poisitions);
@@ -447,6 +448,12 @@ private:
 	LLModelLoader::model_list mModel[LLModel::NUM_LODS];
 	LLModelLoader::model_list mBaseModel;
 
+	typedef std::vector<LLVolumeFace>		v_LLVolumeFace_t;
+	typedef std::vector<v_LLVolumeFace_t>	vv_LLVolumeFace_t;
+	
+	vv_LLVolumeFace_t mModelFacesCopy[LLModel::NUM_LODS];
+	vv_LLVolumeFace_t mBaseModelFacesCopy;
+
 	U32 mGroup;
 	std::map<LLPointer<LLModel>, U32> mObject;
 	U32 mMaxTriangleLimit;
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 0880a5f35af5dc2a3693d13b821092c8f7e3975f..849aa7cd14cd3cc9ef35f2ee1fd8ea4a5eda9dab 100755
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -35,6 +35,8 @@
 #include "llagent.h"
 #include "llviewerregion.h"
 #include "llnotificationsutil.h"
+#include "llsdserialize.h"
+#include "llvoavatar.h"
 
 LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
 : LLFloater(seed)
@@ -171,8 +173,9 @@ public:
 private:
 	static	std::string sPreviousReason;
 
-	void error(U32 status, const std::string& reason)
+	void httpFailure()
 	{
+		const std::string& reason = getReason();
 		// Do not display the same error more than once in a row
 		if (reason != sPreviousReason)
 		{
@@ -182,8 +185,12 @@ private:
 			LLNotificationsUtil::add("DefaultObjectPermissions", args);
 		}
 	}
-	void result(const LLSD& content)
+
+	void httpSuccess()
 	{
+		//const LLSD& content = getContent();
+		//dump_sequential_xml("perms_responder_result.xml", content);
+
 		// Since we have had a successful POST call be sure to display the next error message
 		// even if it is the same as a previous one.
 		sPreviousReason = "";
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 598c7f9febb17f9e0cb382884f084eabd232f8fa..0c669506fa841ee2c29195d8f5e7ac1da91db197 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -37,6 +37,7 @@
 #include "message.h"
 #include "llfloaterautoreplacesettings.h"
 #include "llagent.h"
+#include "llagentcamera.h"
 #include "llcheckboxctrl.h"
 #include "llcolorswatch.h"
 #include "llcombobox.h"
@@ -74,6 +75,7 @@
 #include "llviewermessage.h"
 #include "llviewershadermgr.h"
 #include "llviewerthrottle.h"
+#include "llvoavatarself.h"
 #include "llvotree.h"
 #include "llvosky.h"
 #include "llfloaterpathfindingconsole.h"
@@ -251,6 +253,14 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue)
 	LLVOAvatar::invalidateNameTags();
 }
 
+void handleAppearanceCameraMovementChanged(const LLSD& newvalue)
+{
+	if(!newvalue.asBoolean() && gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
+	{
+		gAgentCamera.changeCameraToDefault();
+		gAgentCamera.resetView();
+	}
+}
 
 /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
 {
@@ -361,6 +371,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
 	gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged,  _2));	
 	gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged,  _2));
 	
+	gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged,  _2));
+
 	LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
 
 	mCommitCallbackRegistrar.add("Pref.ClearLog",				boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance()));
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index a3bf99f054292ce7bb5681638e5e8f31660914cb..6bfc7807224dcda602d4b6ef060c24832964954f 100755
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -36,6 +36,7 @@
 #include "llagent.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
+#include "llcombobox.h"
 #include "llavataractions.h"
 #include "llinventorydefines.h"
 #include "llinventoryobserver.h"
@@ -143,7 +144,7 @@ BOOL LLFloaterProperties::postBuild()
 	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitPermissions, this));
 	// Mark for sale or not, and sale info
 	getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
-	getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
+	getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
 	// "Price" label for edit
 	getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
 	// The UI has been built, now fill in all the values
@@ -188,7 +189,7 @@ void LLFloaterProperties::refresh()
 			"CheckNextOwnerCopy",
 			"CheckNextOwnerTransfer",
 			"CheckPurchase",
-			"RadioSaleType",
+			"ComboBoxSaleType",
 			"Edit Cost"
 		};
 		for(size_t t=0; t<LL_ARRAY_SIZE(enableNames); ++t)
@@ -479,6 +480,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 
 	const LLSaleInfo& sale_info = item->getSaleInfo();
 	BOOL is_for_sale = sale_info.isForSale();
+	LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+	LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
+
 	// Check for ability to change values.
 	if (is_obj_modify && can_agent_sell 
 		&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
@@ -491,9 +495,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 		getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
 		getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
 
-		getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale);
 		getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
-		getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
+		combo_sale_type->setEnabled(is_complete && is_for_sale);
+		edit_cost->setEnabled(is_complete && is_for_sale);
 	}
 	else
 	{
@@ -505,31 +509,28 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 		getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
 		getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
 
-		getChildView("RadioSaleType")->setEnabled(FALSE);
 		getChildView("TextPrice")->setEnabled(FALSE);
-		getChildView("Edit Cost")->setEnabled(FALSE);
+		combo_sale_type->setEnabled(FALSE);
+		edit_cost->setEnabled(FALSE);
 	}
 
 	// Set values.
 	getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
-	getChildView("combobox sale copy")->setEnabled(is_for_sale);
-	getChildView("Edit Cost")->setEnabled(is_for_sale);
 	getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
 	getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
 	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
 
-	LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
 	if (is_for_sale)
 	{
-		radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
 		S32 numerical_price;
 		numerical_price = sale_info.getSalePrice();
-		getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
+		edit_cost->setValue(llformat("%d",numerical_price));
+		combo_sale_type->setValue(sale_info.getSaleType());
 	}
 	else
 	{
-		radioSaleType->setSelectedIndex(-1);
-		getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
+		edit_cost->setValue(llformat("%d",0));
+		combo_sale_type->setValue(LLSaleInfo::FS_COPY);
 	}
 }
 
@@ -757,25 +758,11 @@ void LLFloaterProperties::updateSaleInfo()
 	{
 		// turn on sale info
 		LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
-	
-		LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
-		if(RadioSaleType)
+
+		LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+		if (combo_sale_type)
 		{
-			switch (RadioSaleType->getSelectedIndex())
-			{
-			case 0:
-				sale_type = LLSaleInfo::FS_ORIGINAL;
-				break;
-			case 1:
-				sale_type = LLSaleInfo::FS_COPY;
-				break;
-			case 2:
-				sale_type = LLSaleInfo::FS_CONTENTS;
-				break;
-			default:
-				sale_type = LLSaleInfo::FS_COPY;
-				break;
-			}
+			sale_type = static_cast<LLSaleInfo::EForSale>(combo_sale_type->getValue().asInteger());
 		}
 
 		if (sale_type == LLSaleInfo::FS_COPY 
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 04329ff66ea66f3c5d1547113d2abeb3954be803..1d0ddc2ced3bc2055d16e16e7535a974470b7397 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -367,8 +367,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
 	LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
 
 	floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
-	enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
-	setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
 	floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
 
 	LLPanelSnapshot* active_panel = getActivePanel(floater);
@@ -478,8 +476,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
 	  default:
 		break;
 	}
-    
-    if (previewp)
+	setAspectRatioCheckboxValue(floater, !floater->impl.mAspectRatioCheckOff && gSavedSettings.getBOOL("KeepAspectForSnapshot"));
+
+	if (previewp)
 	{
 		previewp->setSnapshotType(shot_type);
 		previewp->setSnapshotFormat(shot_format);
@@ -554,7 +553,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
 	{
 		view->impl.setStatus(Impl::STATUS_READY);
 		LL_DEBUGS() << "updating snapshot" << LL_ENDL;
-		previewp->updateSnapshot(TRUE);
+		previewp->mForceUpdateSnapshot = TRUE;
 	}
 }
 
@@ -627,6 +626,13 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
 
 	if (view)
 	{
+		LLPanelSnapshot* active_panel = getActivePanel(view);
+		if (checked && active_panel)
+		{
+			LLComboBox* combo = view->getChild<LLComboBox>(active_panel->getImageSizeComboName());
+			combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
+		}
+
 		LLSnapshotLivePreview* previewp = getPreviewView(view) ;
 		if(previewp)
 		{
@@ -691,7 +697,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
 	}
 
 	view->impl.mAspectRatioCheckOff = !enable_cb;
-	enableAspectRatioCheckbox(view, enable_cb);
+
 	if (previewp)
 	{
 		previewp->mKeepAspectRatio = keep_aspect;
@@ -1193,6 +1199,22 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
 void LLFloaterSnapshot::onClose(bool app_quitting)
 {
 	getParent()->setMouseOpaque(FALSE);
+
+	//unfreeze everything, hide fullscreen preview
+	LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView(this);
+	if (previewp)
+	{
+		previewp->setVisible(FALSE);
+		previewp->setEnabled(FALSE);
+	}
+
+	gSavedSettings.setBOOL("FreezeTime", FALSE);
+	impl.mAvatarPauseHandles.clear();
+
+	if (impl.mLastToolset)
+	{
+		LLToolMgr::getInstance()->setCurrentToolset(impl.mLastToolset);
+	}
 }
 
 // virtual
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index ff66bdedb051b2c014f2a13b21645e4053ed3034..6837f6159f45c0db33583638f715f728382b0661 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -63,6 +63,7 @@
 #include "llviewerregion.h"
 #include "llviewerstats.h"
 #include "llviewertexture.h"
+#include "llviewerwindow.h"
 #include "llworldmap.h"
 #include "llworldmapmessage.h"
 #include "llworldmapview.h"
@@ -890,7 +891,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
 	end = collector.mMappable.end();
 	for( ; it != end; ++it)
 	{
-		list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
+		list->addSimpleElement((*it).second, ADD_BOTTOM, (*it).first);
 	}
 	
 	list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
@@ -1634,3 +1635,10 @@ void LLFloaterWorldMap::onChangeMaturity()
 		gSavedSettings.setBOOL("ShowAdultEvents", FALSE);
 	}
 }
+
+void LLFloaterWorldMap::onFocusLost()
+{
+	gViewerWindow->showCursor();
+	LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
+	map_panel->mPanning = FALSE;
+}
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 84ca5a7a71e2d1a36b41679ad9cd10e3eb5e6a54..7ce8dae9a9a8304162dc0419a180e5b96995e646 100755
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -68,6 +68,8 @@ public:
 	/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
 	/*virtual*/ void draw();
 
+	/*virtual*/ void onFocusLost();
+
 	// methods for dealing with inventory. The observe() method is
 	// called during program startup. inventoryUpdated() will be
 	// called by a helper object when an interesting change has
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 8d8239611c85a332810f51396dcd264f22f640ce..5d3a11e2451b9fd9dea52550fe9b052cbe2d78df 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3061,6 +3061,24 @@ void LLIMMgr::inviteToSession(
 		{
 			if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall)
 			{
+				if (!hasSession(session_id) && (type == IM_SESSION_P2P_INVITE))
+				{
+					std::string fixed_session_name = caller_name;
+					if(!session_name.empty() && session_name.size()>1)
+					{
+						fixed_session_name = session_name;
+					}
+					else
+					{
+						LLAvatarName av_name;
+						if (LLAvatarNameCache::get(caller_id, &av_name))
+						{
+							fixed_session_name = av_name.getDisplayName();
+						}
+					}
+					LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, false, false);
+				}
+
 				LLSD args;
 				addSystemMessage(session_id, "you_auto_rejected_call", args);
 				send_do_not_disturb_message(gMessageSystem, caller_id, session_id);
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index a7b93b80306d98b93632f5bc6352eb301ed0c936..46019557f85f91be6784dd5a4a169eaa15d3264f 100755
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data)
 		LLViewerMediaFocus::getInstance()->clearFocus();
 		
 		LLSelectMgr::instance().deselectAll();
-		mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj);
+		mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
 
 		// Mark this as a transient selection
 		struct SetTransient : public LLSelectedNodeFunctor
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index 0bc7bd188d486461a3e30c8ece018b95222c835d..d04378daafde5eaaf85299f2355bb979c178ef02 100755
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -89,6 +89,11 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
 	mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1));
 
 	LLPanel * panel = toast->getPanel();
+	if (panel == NULL)
+	{
+		LL_WARNS() << "Could not get toast's panel." << LL_ENDL;
+		return;
+	}
 	panel->setVisible(TRUE);
 	panel->setMouseOpaque(FALSE);
 	if(mPanel != NULL && mPanel->getParent() == this)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 19106560663892e50ad9b4b1ee16176f8803cda6..1dc555855509fdef2678e49d6e4e03df41143c84 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4462,11 +4462,11 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
 {
 	if ("save_as" == action)
 	{
-		LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
-		LLPreviewTexture* preview_texture = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
+		LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
 		if (preview_texture)
 		{
 			preview_texture->openToSave();
+			preview_texture->saveAs();
 		}
 	}
 	else LLItemBridge::performAction(model, action);
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index d38f90015e80f082a9614e20064447a5484c40b9..59e14e6cc01c902d2e256f0e324bd6d96afedd7a 100755
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -424,6 +424,7 @@ void LLJoystickCameraRotate::updateSlop()
 
 BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
 {
+	gAgent.setMovementLocked(TRUE);
 	updateSlop();
 
 	// Set initial offset based on initial click location
@@ -465,6 +466,11 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
 	return LLJoystick::handleMouseDown(x, y, mask);
 }
 
+BOOL LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask)
+{
+	gAgent.setMovementLocked(FALSE);
+	return LLJoystick::handleMouseUp(x, y, mask);
+}
 
 void LLJoystickCameraRotate::onHeldDown()
 {
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 8d76aa9531cf9704c44af08a62d22099f0113c0c..4e6c774cadfa3c062709a7b318041ea4e6658961 100755
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -146,6 +146,7 @@ public:
 	virtual void	setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom );
 
 	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
+	virtual BOOL	handleMouseUp(S32 x, S32 y, MASK mask);
 	virtual void	onHeldDown();
 	virtual void	draw();
 
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 897ee8429a75eb1c9205d3bcdfd3d5da349de966..619140e922a389103d01e92b6c826d61ffd72c0e 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -64,6 +64,8 @@
 #include "llimagedimensionsinfo.h"
 #include "llviewercontrol.h"
 #include "lltrans.h"
+#include "llviewerdisplay.h"
+
 /*=======================================*/
 /*  Formal declarations, constants, etc. */
 /*=======================================*/ 
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 407cbfc47b78a917405a88593891c9b06b0fa005..451f41cd3bfe6dfa756ac9ea2f95ad97ffacacf9 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -197,9 +197,6 @@ void LLPanelContents::onClickNewScript(void *userdata)
 		// *TODO: The script creation should round-trip back to the
 		// viewer so the viewer can auto-open the script and start
 		// editing ASAP.
-#if 0
-		LLFloaterReg::showInstance("preview_scriptedit", LLSD(inv_item->getUUID()), TAKE_FOCUS_YES);
-#endif
 	}
 }
 
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 02e05d3d9a8978b8aeaed28d9f11c793d79257df..717aece8ddd48cdef445e4f9b1da1883e2dcb3b3 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -242,6 +242,8 @@ BOOL	LLPanelFace::postBuild()
 	if(mShinyColorSwatch)
 	{
 		mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2));
+		mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2));
+		mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
 		mShinyColorSwatch->setFollowsTop();
 		mShinyColorSwatch->setFollowsLeft();
 		mShinyColorSwatch->setCanApplyImmediately(TRUE);
@@ -900,52 +902,22 @@ void LLPanelFace::updateUI()
 					getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
 				}
 			}
-            
-         if (shinytexture_ctrl)
-         {
-				if (identical_spec && (shiny == SHINY_TEXTURE))
-				{
-					shinytexture_ctrl->setTentative( FALSE );
-					shinytexture_ctrl->setEnabled( editable );
-					shinytexture_ctrl->setImageAssetID( specmap_id );
-					}
-            else if (specmap_id.isNull())
-				{
-               shinytexture_ctrl->setTentative( FALSE );
-               shinytexture_ctrl->setEnabled( editable );
-					shinytexture_ctrl->setImageAssetID( LLUUID::null );
-				}
-            else
-            {
-					shinytexture_ctrl->setTentative( TRUE );
-					shinytexture_ctrl->setEnabled( editable );
-					shinytexture_ctrl->setImageAssetID( specmap_id );
+
+			if (shinytexture_ctrl)
+			{
+				shinytexture_ctrl->setTentative( !identical_spec );
+				shinytexture_ctrl->setEnabled( editable );
+				shinytexture_ctrl->setImageAssetID( specmap_id );
 			}
-		}
 
-         if (bumpytexture_ctrl)
-         {
-				if (identical_norm && (bumpy == BUMPY_TEXTURE))
-				{
-					bumpytexture_ctrl->setTentative( FALSE );
-					bumpytexture_ctrl->setEnabled( editable );
-					bumpytexture_ctrl->setImageAssetID( normmap_id );
-				}
-				else if (normmap_id.isNull())
-				{
-					bumpytexture_ctrl->setTentative( FALSE );
-					bumpytexture_ctrl->setEnabled( editable );
-					bumpytexture_ctrl->setImageAssetID( LLUUID::null );
-				}
-            else
-            {
-					bumpytexture_ctrl->setTentative( TRUE );
-					bumpytexture_ctrl->setEnabled( editable );
-					bumpytexture_ctrl->setImageAssetID( normmap_id );
-				}
+			if (bumpytexture_ctrl)
+			{
+				bumpytexture_ctrl->setTentative( !identical_norm );
+				bumpytexture_ctrl->setEnabled( editable );
+				bumpytexture_ctrl->setImageAssetID( normmap_id );
 			}
 		}
-		
+
 		// planar align
 		bool align_planar = false;
 		bool identical_planar_aligned = false;
@@ -1463,12 +1435,23 @@ void LLPanelFace::onCancelColor(const LLSD& data)
 	LLSelectMgr::getInstance()->selectionRevertColors();
 }
 
+void LLPanelFace::onCancelShinyColor(const LLSD& data)
+{
+	LLSelectMgr::getInstance()->selectionRevertShinyColors();
+}
+
 void LLPanelFace::onSelectColor(const LLSD& data)
 {
 	LLSelectMgr::getInstance()->saveSelectedObjectColors();
 	sendColor();
 }
 
+void LLPanelFace::onSelectShinyColor(const LLSD& data)
+{
+	LLSelectedTEMaterial::setSpecularLightColor(this, getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+	LLSelectMgr::getInstance()->saveSelectedShinyColors();
+}
+
 // static
 void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
 {
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index e32f039921ef2efad490c5e515d075707b89d1b7..9823e84cd9e2bdf514eac5959c2de4a52e92e555 100755
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -143,7 +143,9 @@ protected:
 	void 	onCommitShinyColor(const LLSD& data);
 	void 	onCommitAlpha(const LLSD& data);
 	void 	onCancelColor(const LLSD& data);
+	void 	onCancelShinyColor(const LLSD& data);
 	void 	onSelectColor(const LLSD& data);
+	void 	onSelectShinyColor(const LLSD& data);
 
 	void 	onCloseTexturePicker(const LLSD& data);
 
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 75a3584a1e215144ae1fb4541d01e943efdacaf6..1d73d4bd6ed219a6223bd1fccdc858aa8ed69b0d 100755
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -1173,7 +1173,8 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
 
 	if ("copy" == command_name)
 	{
-		return root_folder->canCopy();
+		// we shouldn't be able to copy folders from My Inventory Panel
+		return can_be_modified && root_folder->canCopy();
 	}
 	else if ("collapse" == command_name)
 	{
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 6354b5a02b2c62e445f4907d58a007afa038146f..bf15f56b44043021cf6163ac9d19201546608273 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -654,7 +654,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		return;
 	}
 
-	if(gAgent.allowOperation(PERM_OWNER, item->getPermissions(),
+	if(!gAgent.allowOperation(PERM_OWNER, item->getPermissions(),
 							 GP_OBJECT_MANIPULATE)
 	   && item->getSaleInfo().isForSale())
 	{
@@ -689,10 +689,6 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	else if (canOpenItem())
 	{
 		items.push_back(std::string("Task Open"));
-		if (!isItemCopyable())
-		{
-			disabled_items.push_back(std::string("Task Open"));
-		}
 	}
 	items.push_back(std::string("Task Properties"));
 	if(isItemRenameable())
@@ -909,6 +905,7 @@ void LLTaskTextureBridge::openItem()
 	LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
 	if(preview)
 	{
+		preview->setAuxItem(findItem());
 		preview->setObjectID(mPanel->getTaskUUID());
 	}
 }
@@ -1107,7 +1104,10 @@ void LLTaskLSLBridge::openItem()
 	}
 	if (object->permModify() || gAgent.isGodlike())
 	{
-		LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES);
+		LLSD floater_key;
+		floater_key["taskid"] = mPanel->getTaskUUID();
+		floater_key["itemid"] = mUUID;
+		LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
 		if (preview)
 		{
 			preview->setObjectID(mPanel->getTaskUUID());
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 58055d98c665d3a62c76297f57e3d9bf77928df8..ce9231d6f2c35936fe5741fb3b3e8b8cf800859c 100755
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -851,6 +851,14 @@ void LLPanelPermissions::refresh()
 			combo_click_action->setValue(LLSD(combo_value));
 		}
 	}
+
+	if(LLSelectMgr::getInstance()->getSelection()->isAttachment())
+	{
+		getChildView("checkbox for sale")->setEnabled(FALSE);
+		getChildView("Edit Cost")->setEnabled(FALSE);
+		getChild<LLComboBox>("sale type")->setEnabled(FALSE);
+	}
+
 	getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced  && all_volume);
 	getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
 }
diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp
index 649bb2fb2c1ba5af7b81e0dfb38c4611d0325282..5987044bffe2191a7ebc72d3a53daf14c890cda4 100755
--- a/indra/newview/llpostcard.cpp
+++ b/indra/newview/llpostcard.cpp
@@ -95,6 +95,12 @@ public:
 	{
 	}
 
+	/*virtual*/ void httpFailure()
+	{
+		LL_WARNS() << "Sending postcard failed, status: " << getStatus() << LL_ENDL;
+		LLPostCard::reportPostResult(false);
+	}
+
 	/*virtual*/ void uploadComplete(const LLSD& content)
 	{
 		LL_INFOS() << "Postcard sent" << LL_ENDL;
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 398f4e6e4249074c2b674bb2f1c220d0bc4cb579..bf2652cb49c23950efb880e21331d5c8c6ddd5fc 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -39,6 +39,7 @@
 #include "llradiogroup.h"
 #include "llassetstorage.h"
 #include "llviewerassettype.h"
+#include "llviewermessage.h"
 #include "llviewerobject.h"
 #include "llviewerobjectlist.h"
 #include "lldbstrings.h"
@@ -53,7 +54,7 @@
 
 LLPreview::LLPreview(const LLSD& key)
 :	LLFloater(key),
-	mItemUUID(key.asUUID()),
+	mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()),
 	mObjectUUID(),			// set later by setObjectID()
 	mCopyToInvBtn( NULL ),
 	mForceClose(FALSE),
@@ -369,6 +370,20 @@ void LLPreview::onBtnCopyToInv(void* userdata)
 										 self->mNotecardInventoryID,
 										 item);
 		}
+		else if (self->mObjectUUID.notNull())
+		{
+			// item is in in-world inventory
+			LLViewerObject* object = gObjectList.findObject(self->mObjectUUID);
+			LLPermissions perm(item->getPermissions());
+			if(object
+				&&(perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
+				&& perm.allowTransferTo(gAgent.getID())))
+			{
+				// copy to default folder
+				set_dad_inventory_item(item, LLUUID::null);
+				object->moveInventory(LLUUID::null, item->getUUID());
+			}
+		}
 		else
 		{
 			LLPointer<LLInventoryCallback> cb = NULL;
@@ -453,7 +468,6 @@ LLMultiPreview::LLMultiPreview()
 	setTitle(LLTrans::getString("MultiPreviewTitle"));
 	buildTabContainer();
 	setCanResize(TRUE);
-	mAutoResize = FALSE;
 }
 
 void LLMultiPreview::onOpen(const LLSD& key)
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 337a63e627802c7ab80e09ea982838065ee9f6eb..1308d1e9a70e9dcc5aec4f913c2cc33da58fe786 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -215,9 +215,12 @@ void LLPreviewNotecard::loadAsset()
 
 	if(item)
 	{
-		if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),
-									GP_OBJECT_MANIPULATE)
-			|| gAgent.isGodlike())
+		LLPermissions perm(item->getPermissions());
+		BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
+		BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
+		BOOL allow_modify = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
+
+		if (allow_copy || gAgent.isGodlike())
 		{
 			mAssetID = item->getAssetUUID();
 			if(mAssetID.isNull())
@@ -271,12 +274,17 @@ void LLPreviewNotecard::loadAsset()
 			editor->setEnabled(FALSE);
 			mAssetStatus = PREVIEW_ASSET_LOADED;
 		}
-		if(!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(),
-								GP_OBJECT_MANIPULATE))
+
+		if(!allow_modify)
 		{
 			editor->setEnabled(FALSE);
 			getChildView("lock")->setVisible( TRUE);
 		}
+
+		if(allow_modify || is_owner)
+		{
+			getChildView("Delete")->setEnabled(TRUE);
+		}
 	}
 	else
 	{
@@ -492,14 +500,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
 
 void LLPreviewNotecard::deleteNotecard()
 {
-	LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
-	if (item != NULL)
-	{
-		const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
-		gInventory.changeItemParent(item, trash_id, FALSE);
-	}
-
-	closeFloater();
+	LLNotificationsUtil::add("DeleteNotecard", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleConfirmDeleteDialog,this, _1, _2));
 }
 
 // static
@@ -605,4 +606,43 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
 	return false;
 }
 
+bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response)
+{
+	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+	if (option != 0)
+	{
+		// canceled
+		return false;
+	}
+
+	if (mObjectUUID.isNull())
+	{
+		// move item from agent's inventory into trash
+		LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
+		if (item != NULL)
+		{
+			const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+			gInventory.changeItemParent(item, trash_id, FALSE);
+		}
+	}
+	else
+	{
+		// delete item from inventory of in-world object
+		LLViewerObject* object = gObjectList.findObject(mObjectUUID);
+		if(object)
+		{
+			LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID));
+			if (item != NULL)
+			{
+				object->removeInventory(mItemUUID);
+			}
+		}
+	}
+
+	// close floater, ignore unsaved changes
+	mForceClose = TRUE;
+	closeFloater();
+	return false;
+}
+
 // EOF
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index b53c0da6bef0fa25a0e959c4d8c8e851e1eb6bf2..1cf08dedd609d433417238d7d77128ae9be4245b 100755
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -93,6 +93,7 @@ protected:
 							   S32 status, LLExtStat ext_status);
 
 	bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
+	bool handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response);
 
 protected:
 	LLViewerTextEditor* mEditor;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 5c2f13a9034ff2f7eb9a03854882bdc9def7da0c..655828adc7e2b8d1a5c6bfe77352d78ac6a23428 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -2056,7 +2056,8 @@ void LLLiveLSLEditor::loadAsset()
 				{
 					mItem = new LLViewerInventoryItem(item);
 					// request the text from the object
-					LLUUID* user_data = new LLUUID(mItemUUID); //  ^ mObjectUUID
+				LLSD* user_data = new LLSD();
+				user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID);
 					gAssetStorage->getInvItemAsset(object->getRegion()->getHost(),
 						gAgent.getID(),
 						gAgent.getSessionID(),
@@ -2135,9 +2136,9 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
 {
 	LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
 		 << LL_ENDL;
-	LLUUID* xored_id = (LLUUID*)user_data;
+	LLSD* floater_key = (LLSD*)user_data;
 	
-	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *xored_id);
+	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *floater_key);
 	
 	if(instance )
 	{
@@ -2166,7 +2167,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
 		}
 	}
 
-	delete xored_id;
+	delete floater_key;
 }
 
 void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type)
@@ -2527,7 +2528,10 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
 	}
 	else
 	{
-		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); //  ^ data->mSaveObjectID
+		LLSD floater_key;
+		floater_key["taskid"] = data->mSaveObjectID;
+		floater_key["itemid"] = data->mItem->getUUID();
+		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
 		if (self)
 		{
 			self->getWindow()->decBusyCount();
@@ -2552,7 +2556,10 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
 	if(0 ==status)
 	{
 		LL_INFOS() << "LSL Bytecode saved" << LL_ENDL;
-		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); //  ^ data->mSaveObjectID
+		LLSD floater_key;
+		floater_key["taskid"] = data->mSaveObjectID;
+		floater_key["itemid"] = data->mItem->getUUID();
+		LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
 		if (self)
 		{
 			// Tell the user that the compile worked.
@@ -2630,7 +2637,10 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
 	msg->getUUIDFast(_PREHASH_Script, _PREHASH_ObjectID, object_id);
 	msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
 
-	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", item_id); //  ^ object_id
+	LLSD floater_key;
+	floater_key["taskid"] = object_id;
+	floater_key["itemid"] = item_id;
+	LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
 	if(instance)
 	{
 		instance->mHaveRunningInfo = TRUE;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 5c41c5ad9725b6a274ea5f76c60876f591452d6c..f91a18d8d3fa9b5d91aff3f4fffcd04824719a0d 100755
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -65,6 +65,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)
 	  mShowKeepDiscard(FALSE),
 	  mCopyToInv(FALSE),
 	  mIsCopyable(FALSE),
+	  mIsFullPerm(FALSE),
 	  mUpdateDimensions(TRUE),
 	  mLastHeight(0),
 	  mLastWidth(0),
@@ -182,12 +183,6 @@ void LLPreviewTexture::draw()
 
 		if ( mImage.notNull() )
 		{
-			// Automatically bring up SaveAs dialog if we opened this to save the texture.
-			if (mPreviewToSave)
-			{
-				mPreviewToSave = FALSE;
-				saveAs();
-			}
 			// Draw the texture
 			gGL.diffuseColor3f( 1.f, 1.f, 1.f );
 			gl_draw_scaled_image(interior.mLeft,
@@ -269,7 +264,7 @@ void LLPreviewTexture::draw()
 // virtual
 BOOL LLPreviewTexture::canSaveAs() const
 {
-	return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
+	return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
 }
 
 
@@ -286,6 +281,12 @@ void LLPreviewTexture::saveAs()
 		// User canceled or we failed to acquire save file.
 		return;
 	}
+	if(mPreviewToSave)
+	{
+		mPreviewToSave = FALSE;
+		LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID());
+	}
+
 	// remember the user-approved/edited file name.
 	mSaveFileName = file_picker.getFirstFile();
 	mLoadingFullImage = TRUE;
@@ -516,6 +517,11 @@ void LLPreviewTexture::loadAsset()
 	mUpdateDimensions = TRUE;
 	updateDimensions();
 	getChildView("save_tex_btn")->setEnabled(canSaveAs());
+	if (mObjectUUID.notNull())
+	{
+		// check that we can copy inworld items into inventory
+		getChildView("Keep")->setEnabled(mIsCopyable);
+	}
 }
 
 LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus()
@@ -580,7 +586,9 @@ void LLPreviewTexture::updateImageID()
 		mShowKeepDiscard = TRUE;
 
 		mCopyToInv = FALSE;
-		mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
+		LLPermissions perm(item->getPermissions());
+		mIsCopyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID());
+		mIsFullPerm = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
 	}
 	else // not an item, assume it's an asset id
 	{
@@ -588,6 +596,7 @@ void LLPreviewTexture::updateImageID()
 		mShowKeepDiscard = FALSE;
 		mCopyToInv = TRUE;
 		mIsCopyable = TRUE;
+		mIsFullPerm = TRUE;
 	}
 
 }
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 97e74706cca5bc490ace1e5a6a09b0d48713b083..b104a91c756de0b2ae2cd07b5bd0fff076070043 100755
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -90,6 +90,7 @@ private:
 	// This is stored off in a member variable, because the save-as
 	// button and drag and drop functionality need to know.
 	BOOL mIsCopyable;
+	BOOL mIsFullPerm;
 	BOOL mUpdateDimensions;
 	S32 mLastHeight;
 	S32 mLastWidth;
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 590a1c2647dfd8df9573b531359a3f5df67acae1..1d021ec28fa4ea400983197376c851794886cb4e 100755
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -378,6 +378,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
 				{
 					// Pass the new_message icon state further.
 					set_new_message = chicletp->getShowNewMessagesIcon();
+					chicletp->hidePopupMenu();
 				}
 			}
 
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index eb3a4c37d99d7f43a4af2fa421f76d19b34a92da..b13c30b6d48794dea299a2e1e6651edc8442f8e7 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -368,7 +368,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
 //-----------------------------------------------------------------------------
 // Select the object, parents and children.
 //-----------------------------------------------------------------------------
-LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end)
+LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned)
 {
 	llassert( obj );
 
@@ -385,7 +385,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
 		return NULL;
 	}
 
-	if (!canSelectObject(obj))
+	if (!canSelectObject(obj,ignore_select_owned))
 	{
 		//make_ui_sound("UISndInvalidOp");
 		return NULL;
@@ -1766,6 +1766,40 @@ void LLSelectMgr::selectionRevertColors()
 	getSelection()->applyToObjects(&sendfunc);
 }
 
+void LLSelectMgr::selectionRevertShinyColors()
+{
+	struct f : public LLSelectedTEFunctor
+	{
+		LLObjectSelectionHandle mSelectedObjects;
+		f(LLObjectSelectionHandle sel) : mSelectedObjects(sel) {}
+		bool apply(LLViewerObject* object, S32 te)
+		{
+			if (object->permModify())
+			{
+				LLSelectNode* nodep = mSelectedObjects->findNode(object);
+				if (nodep && te < (S32)nodep->mSavedShinyColors.size())
+				{
+					LLColor4 color = nodep->mSavedShinyColors[te];
+					// update viewer side color in anticipation of update from simulator
+					LLMaterialPtr old_mat = object->getTE(te)->getMaterialParams();
+					if (!old_mat.isNull())
+					{
+						LLMaterialPtr new_mat = gFloaterTools->getPanelFace()->createDefaultMaterial(old_mat);
+						new_mat->setSpecularLightColor(color);
+						object->getTE(te)->setMaterialParams(new_mat);
+						LLMaterialMgr::getInstance()->put(object->getID(), te, *new_mat);
+					}
+				}
+			}
+			return true;
+		}
+	} setfunc(mSelectedObjects);
+	getSelection()->applyToTEs(&setfunc);
+
+	LLSelectMgrSendFunctor sendfunc;
+	getSelection()->applyToObjects(&sendfunc);
+}
+
 BOOL LLSelectMgr::selectionRevertTextures()
 {
 	struct f : public LLSelectedTEFunctor
@@ -4501,6 +4535,19 @@ void LLSelectMgr::saveSelectedObjectColors()
 	getSelection()->applyToNodes(&func);	
 }
 
+void LLSelectMgr::saveSelectedShinyColors()
+{
+	struct f : public LLSelectedNodeFunctor
+	{
+		virtual bool apply(LLSelectNode* node)
+		{
+			node->saveShinyColors();
+			return true;
+		}
+	} func;
+	getSelection()->applyToNodes(&func);
+}
+
 void LLSelectMgr::saveSelectedObjectTextures()
 {
 	// invalidate current selection so we update saved textures
@@ -4596,11 +4643,18 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
 	BOOL mState;
 	virtual bool apply(LLViewerObject* object)
 	{
-		if ( object->permModify() &&	// preemptive permissions check
-			 object->isRoot()) 		// don't send for child objects
+		if ( object->permModify())
 		{
-			object->setFlags( mFlags, mState);
-		}
+			if (object->isRoot()) 		// don't send for child objects
+			{
+				object->setFlags( mFlags, mState);
+			}
+			else if (FLAGS_WORLD & mFlags && ((LLViewerObject*)object->getRoot())->isSelected())
+			{
+				// FLAGS_WORLD are shared by all items in linkset
+				object->setFlagsWithoutUpdate(FLAGS_WORLD & mFlags, mState);
+			}
+		};
 		return true;
 	}
 };
@@ -5752,6 +5806,7 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow)
 	mCreationDate(0)
 {
 	saveColors();
+	saveShinyColors();
 }
 
 LLSelectNode::LLSelectNode(const LLSelectNode& nodep)
@@ -5797,6 +5852,11 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep)
 	{
 		mSavedColors.push_back(*color_iter);
 	}
+	mSavedShinyColors.clear();
+	for (color_iter = nodep.mSavedShinyColors.begin(); color_iter != nodep.mSavedShinyColors.end(); ++color_iter)
+	{
+		mSavedShinyColors.push_back(*color_iter);
+	}
 	
 	saveTextures(nodep.mSavedTextures);
 }
@@ -5880,6 +5940,26 @@ void LLSelectNode::saveColors()
 	}
 }
 
+void LLSelectNode::saveShinyColors()
+{
+	if (mObject.notNull())
+	{
+		mSavedShinyColors.clear();
+		for (S32 i = 0; i < mObject->getNumTEs(); i++)
+		{
+			const LLMaterialPtr mat = mObject->getTE(i)->getMaterialParams();
+			if (!mat.isNull())
+			{
+				mSavedShinyColors.push_back(mat->getSpecularLightColor());
+			}
+			else
+			{
+				mSavedShinyColors.push_back(LLColor4::white);
+			}
+		}
+	}
+}
+
 void LLSelectNode::saveTextures(const uuid_vec_t& textures)
 {
 	if (mObject.notNull())
@@ -6698,29 +6778,32 @@ void LLSelectMgr::validateSelection()
 	getSelection()->applyToObjects(&func);	
 }
 
-BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
+BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned)
 {
 	// Never select dead objects
 	if (!object || object->isDead())
 	{
 		return FALSE;
 	}
-	
+
 	if (mForceSelection)
 	{
 		return TRUE;
 	}
 
-	if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
-		(gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() ||  object->isPermanentEnforced())))
+	if(!ignore_select_owned)
 	{
-		// only select my own objects
-		return FALSE;
+		if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
+				(gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() ||  object->isPermanentEnforced())))
+		{
+			// only select my own objects
+			return FALSE;
+		}
 	}
 
 	// Can't select orphans
 	if (object->isOrphaned()) return FALSE;
-	
+
 	// Can't select avatars
 	if (object->isAvatar()) return FALSE;
 
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index a68328167a3a2cccd2a2679abe13689ad900da6c..23c41e4cc1e40ee5fd4318f94eb548345fce6b70 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -179,6 +179,7 @@ public:
 	void setObject(LLViewerObject* object);
 	// *NOTE: invalidate stored textures and colors when # faces change
 	void saveColors();
+	void saveShinyColors();
 	void saveTextures(const uuid_vec_t& textures);
 	void saveTextureScaleRatios(LLRender::eTexIndex index_to_query);
 
@@ -215,6 +216,7 @@ public:
 	std::string		mSitName;
 	U64				mCreationDate;
 	std::vector<LLColor4>	mSavedColors;
+	std::vector<LLColor4>	mSavedShinyColors;
 	uuid_vec_t		mSavedTextures;
 	std::vector<LLVector3>  mTextureScaleRatios;
 	std::vector<LLVector3>	mSilhouetteVertices;	// array of vertices to render silhouette of object
@@ -452,7 +454,7 @@ public:
 	//
 	// *NOTE: You must hold on to the object selection handle, otherwise
 	// the objects will be automatically deselected in 1 frame.
-	LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE);
+	LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE);
 
 	// For when you want just a child object.
 	LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES);
@@ -545,6 +547,7 @@ public:
 	////////////////////////////////////////////////////////////////
 	void saveSelectedObjectTransform(EActionType action_type);
 	void saveSelectedObjectColors();
+	void saveSelectedShinyColors();
 	void saveSelectedObjectTextures();
 
 	// Sets which texture channel to query for scale and rot of display
@@ -573,6 +576,7 @@ public:
 	void selectionSetColorOnly(const LLColor4 &color); // Set only the RGB channels
 	void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel
 	void selectionRevertColors();
+	void selectionRevertShinyColors();
 	BOOL selectionRevertTextures();
 	void selectionSetBumpmap( U8 bumpmap );
 	void selectionSetTexGen( U8 texgen );
@@ -605,7 +609,7 @@ public:
 	void validateSelection();
 
 	// returns TRUE if it is possible to select this object
-	BOOL canSelectObject(LLViewerObject* object);
+	BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE);
 
 	// Returns TRUE if the viewer has information on all selected objects
 	BOOL selectGetAllRootsValid();
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index d75d4ae95138792be8907aca18cc840481a82a9b..a7cfc173af998ff209b9eb44f9c44ba890974bbe 100755
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -32,6 +32,7 @@
 #include "llagent.h"
 #include "llavataractions.h"
 #include "llbutton.h"
+#include "llcombobox.h"
 #include "llfloaterreg.h"
 #include "llgroupactions.h"
 #include "llinventorydefines.h"
@@ -176,6 +177,8 @@ BOOL LLSidepanelItemInfo::postBuild()
 	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
 	// Mark for sale or not, and sale info
 	getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
+	// Change sale type, and sale info
+	getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
 	// "Price" label for edit
 	getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
 	refresh();
@@ -447,7 +450,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 		"CheckNextOwnerTransfer",
 		"CheckPurchase",
 		"SaleLabel",
-		"combobox sale copy",
+		"ComboBoxSaleType",
 		"Edit Cost",
 		"TextPrice"
 	};
@@ -629,6 +632,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 
 	const LLSaleInfo& sale_info = item->getSaleInfo();
 	BOOL is_for_sale = sale_info.isForSale();
+	LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+	LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
+
 	// Check for ability to change values.
 	if (is_obj_modify && can_agent_sell 
 		&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
@@ -642,7 +648,8 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 		getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
 
 		getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
-		getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
+		combo_sale_type->setEnabled(is_complete && is_for_sale);
+		edit_cost->setEnabled(is_complete && is_for_sale);
 	}
 	else
 	{
@@ -655,13 +662,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 		getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
 
 		getChildView("TextPrice")->setEnabled(FALSE);
-		getChildView("Edit Cost")->setEnabled(FALSE);
+		combo_sale_type->setEnabled(FALSE);
+		edit_cost->setEnabled(FALSE);
 	}
 
 	// Set values.
 	getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
-	getChildView("combobox sale copy")->setEnabled(is_for_sale);
-	getChildView("Edit Cost")->setEnabled(is_for_sale);
 	getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
 	getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
 	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
@@ -670,11 +676,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 	{
 		S32 numerical_price;
 		numerical_price = sale_info.getSalePrice();
-		getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
+		edit_cost->setValue(llformat("%d",numerical_price));
+		combo_sale_type->setValue(sale_info.getSaleType());
 	}
 	else
 	{
-		getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
+		edit_cost->setValue(llformat("%d",0));
+		combo_sale_type->setValue(LLSaleInfo::FS_COPY);
 	}
 }
 
@@ -953,24 +961,10 @@ void LLSidepanelItemInfo::updateSaleInfo()
 		// turn on sale info
 		LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
 	
-		LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
-		if(RadioSaleType)
+		LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+		if (combo_sale_type)
 		{
-			switch (RadioSaleType->getSelectedIndex())
-			{
-			case 0:
-				sale_type = LLSaleInfo::FS_ORIGINAL;
-				break;
-			case 1:
-				sale_type = LLSaleInfo::FS_COPY;
-				break;
-			case 2:
-				sale_type = LLSaleInfo::FS_CONTENTS;
-				break;
-			default:
-				sale_type = LLSaleInfo::FS_COPY;
-				break;
-			}
+			sale_type = static_cast<LLSaleInfo::EForSale>(combo_sale_type->getValue().asInteger());
 		}
 
 		if (sale_type == LLSaleInfo::FS_COPY 
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 636654ad2369d0b6b63ecc4ba20d1481d9bc5845..17ecfab4fbbfea653b00a57c31cf6d0e8d4c587f 100755
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -499,17 +499,19 @@ void LLSidepanelTaskInfo::refresh()
 	// You own these objects.
 	else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE)))
 	{
+		LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+
 		// If there are multiple items for sale then set text to PRICE PER UNIT.
 		if (num_for_sale > 1)
 		{
-			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Per Unit"));
+			std::string label_text = is_sale_price_mixed? "Cost Mixed" :"Cost Per Unit";
+			edit_price->setLabel(getString(label_text));
 		}
 		else
 		{
-			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
+			edit_price->setLabel(getString("Cost Default"));
 		}
 		
-		LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
 		if (!edit_price->hasFocus())
 		{
 			// If the sale price is mixed then set the cost to MIXED, otherwise
@@ -547,16 +549,15 @@ void LLSidepanelTaskInfo::refresh()
 
 		// If multiple items are for sale, set text to TOTAL PRICE.
 		if (num_for_sale > 1)
-			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Total"));
+			getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Total"));
 		else
-			getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
+			getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default"));
 	}
 	// This is a public object.
 	else
 	{
 		getChildView("Cost")->setEnabled(FALSE);
-		getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
-		
+		getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default"));
 		getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
 		getChildView("Edit Cost")->setEnabled(FALSE);
 	}
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 600ebf591451c507c47e68d7f63192ccd22a6408..050b88413d34e75d41f6a4d8c85916ebad4eadb3 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -116,6 +116,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
 	mThumbnailUpdateLock = FALSE ;
 	mThumbnailUpToDate   = FALSE ;
 	mBigThumbnailUpToDate = FALSE ;
+
+	mForceUpdateSnapshot = FALSE;
 }
 
 LLSnapshotLivePreview::~LLSnapshotLivePreview()
@@ -671,18 +673,19 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
 	// If we're in freeze-frame mode and camera has moved, update snapshot.
 	LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
 	LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
-	if (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
-		(new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))
+	if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
+		(new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)))
 	{
 		previewp->mCameraPos = new_camera_pos;
 		previewp->mCameraRot = new_camera_rot;
 		// request a new snapshot whenever the camera moves, with a time delay
-		BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+		BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot;
 		LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL;
 		previewp->updateSnapshot(
-			autosnap, // whether a new snapshot is needed or merely invalidate the existing one
+			new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one
 			FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
-			autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+			new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+		previewp->mForceUpdateSnapshot = FALSE;
 	}
 
 	// see if it's time yet to snap the shot and bomb out otherwise.
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index e1937187a3d90f004ac1103079048e57e4798b22..fed33bf37c2c0aca127405c1b3bc126d612c96c0 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -182,6 +182,7 @@ private:
 public:
 	static std::set<LLSnapshotLivePreview*> sList;
 	BOOL                        mKeepAspectRatio ;
+	BOOL						mForceUpdateSnapshot;
 };
 
 #endif // LL_LLSNAPSHOTLIVEPREVIEW_H
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index e80756e4dec81aac4e6104d7ec2c4df9f4871b6e..7867e1573ca9c57cf32e96962d7b5d4d4ab6dd30 100755
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -611,11 +611,14 @@ void LLSpeakerMgr::updateSpeakerList()
 	setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
 }
 
-void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp)
+void LLSpeakerMgr::setSpeakerNotInChannel(LLPointer<LLSpeaker> speakerp)
 {
-	speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
-	speakerp->mDotColor = INACTIVE_COLOR;
-	mSpeakerDelayRemover->setActionTimer(speakerp->mID);
+	if  (speakerp.notNull())
+	{
+		speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
+		speakerp->mDotColor = INACTIVE_COLOR;
+		mSpeakerDelayRemover->setActionTimer(speakerp->mID);
+	}
 }
 
 bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
@@ -795,7 +798,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
 
 			if (agent_data.isMap() && agent_data.has("transition"))
 			{
-				if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull())
+				if (agent_data["transition"].asString() == "LEAVE")
 				{
 					setSpeakerNotInChannel(speakerp);
 				}
@@ -806,7 +809,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
 				}
 				else
 				{
-					LL_WARNS() << "bad membership list update " << ll_print_sd(agent_data["transition"]) << LL_ENDL;
+					LL_WARNS() << "bad membership list update from 'agent_updates' for agent " << agent_id << ", transition " << ll_print_sd(agent_data["transition"]) << LL_ENDL;
 				}
 			}
 
@@ -848,7 +851,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
 			LLPointer<LLSpeaker> speakerp = findSpeaker(agent_id);
 
 			std::string agent_transition = update_it->second.asString();
-			if (agent_transition == "LEAVE" && speakerp.notNull())
+			if (agent_transition == "LEAVE")
 			{
 				setSpeakerNotInChannel(speakerp);
 			}
@@ -859,8 +862,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
 			}
 			else
 			{
-				LL_WARNS() << "bad membership list update "
-						<< agent_transition << LL_ENDL;
+				LL_WARNS() << "bad membership list update from 'updates' for agent " << agent_id << ", transition " << agent_transition << LL_ENDL;
 			}
 		}
 	}
@@ -1041,8 +1043,8 @@ void LLLocalSpeakerMgr::updateSpeakerList()
 	for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
 	{
 		LLUUID speaker_id = speaker_it->first;
-		LLSpeaker* speakerp = speaker_it->second;
-		if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
+		LLPointer<LLSpeaker> speakerp = speaker_it->second;
+		if (speakerp.notNull() && speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
 		{
 			LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
 			if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS)
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index e953dd0e1a516c7db03354ba17d12685f639fbf3..0e691841250ff23a78fa225d4d84dcfe7bc0a2fc 100755
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -258,7 +258,7 @@ public:
 
 protected:
 	virtual void updateSpeakerList();
-	void setSpeakerNotInChannel(LLSpeaker* speackerp);
+	void setSpeakerNotInChannel(LLPointer<LLSpeaker> speackerp);
 	bool removeSpeaker(const LLUUID& speaker_id);
 
 	typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6cea5616b67eee9de153154f9d2bdbd82d01fb7b..d7bfd22cc98434908e59dd5c4b65785017d3ca4d 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1357,11 +1357,11 @@ bool idle_startup()
 			{
 				LLStringUtil::format_map_t args;
 				args["[NUMBER]"] = llformat("%d", num_retries + 1);
-				set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD);
+				set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD.c_str());
 			}
 			else
 			{
-				set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD);
+				set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD.c_str());
 			}
 		}
 		display_startup();
@@ -2075,7 +2075,7 @@ bool idle_startup()
 			update_texture_fetch();
 			set_startup_status(0.60f + 0.30f * timeout_frac,
 				LLTrans::getString("LoginPrecaching"),
-					gAgent.mMOTD);
+					gAgent.mMOTD.c_str());
 			display_startup();
 		}
 		
@@ -2215,6 +2215,8 @@ bool idle_startup()
 		llassert(LLPathfindingManager::getInstance() != NULL);
 		LLPathfindingManager::getInstance()->initSystem();
 
+		gAgentAvatarp->sendHoverHeight();
+
 		return TRUE;
 	}
 
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index a426669b5eb9292441625c3c4c90bb6364a81d68..374c18b30d514cf5e64f2bbf1639ee1f3aa31f13 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -586,9 +586,9 @@ void LLFloaterTexturePicker::draw()
 			mTentativeLabel->setVisible( FALSE  );
 		}
 
-		getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID());
-		getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID());
-		getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() );
+		getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID() || mOwner->getTentative());
+		getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID() || mOwner->getTentative());
+		getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && (!mImageAssetID.isNull() || mOwner->getTentative()));
 
 		LLFloater::draw();
 
@@ -1511,8 +1511,8 @@ void LLTextureCtrl::draw()
 		gl_draw_x( interior, LLColor4::black );
 	}
 
-	mTentativeLabel->setVisible( !mTexturep.isNull() && getTentative() );
-	
+	mTentativeLabel->setVisible( getTentative() );
+
 	// Show "Loading..." string on the top left corner while this texture is loading.
 	// Using the discard level, do not show the string if the texture is almost but not 
 	// fully loaded.
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 8561d265de246c3657e91614f84443fdcb8ff109..b077cad9f802d3141aef9b59de3326d49903dc33 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -34,6 +34,7 @@
 #include "llagentcamera.h"
 #include "llagentwearables.h"
 #include "llappearancemgr.h"
+#include "llavatarnamecache.h"
 #include "lldictionary.h"
 #include "llfloaterreg.h"
 #include "llfloatertools.h"
@@ -1705,9 +1706,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
 
 					return true;
 				}
-
+				std::string dest_name = session->mName;
+				LLAvatarName av_name;
+				if(LLAvatarNameCache::get(dest_agent, &av_name))
+				{
+					dest_name = av_name.getCompleteName();
+				}
 				// If an IM session with destination agent is found item offer will be logged in this session.
-				show_object_sharing_confirmation(session->mName, inv_obj, dest, dest_agent, session_id);
+				show_object_sharing_confirmation(dest_name, inv_obj, dest, dest_agent, session_id);
 			}
 		}
 		else
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 58073d11863308e0e2993ee0c8e17c6214ecda4f..c12c106b8b32d299d1d406ab82391422f2f29074 100755
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -136,7 +136,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
 
 	gViewerWindow->hideCursor();
 
-	gViewerWindow->pickAsync(x, y, mask, pickCallback);
+	gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
 
 	return TRUE;
 }
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 981e4c40aa904533c1adf9ecf3215b19836eaa91..ea9463da049437d4e45ed6861f9c5ec1b822b020 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -930,8 +930,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 			if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction)
 			{
 				gGL.setColorMask(false, false);
-				
-				U32 types[] = { 
+
+				static const U32 types[] = { 
 					LLRenderPass::PASS_SIMPLE, 
 					LLRenderPass::PASS_FULLBRIGHT, 
 					LLRenderPass::PASS_SHINY 
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index d38ed718344c3e66acb22b3a14abc947f7f8bca1..1dad9dd506d5a2738d30d16169cb2ade0e2356a6 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -73,6 +73,7 @@
 #include "llfloatergroups.h"
 #include "llfloaterhardwaresettings.h"
 #include "llfloaterhelpbrowser.h"
+#include "llfloaterhoverheight.h"
 #include "llfloaterhud.h"
 #include "llfloaterimagepreview.h"
 #include "llfloaterimsession.h"
@@ -227,7 +228,8 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
 	LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>);
 
-	LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);	
+	LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);
+	LLFloaterReg::add("edit_hover_height", "floater_edit_hover_height.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHoverHeight>);
 	LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
 
 	LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>);
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index a4a05587d304c1ac7dbfc078dd96de64f9013577..9766a2552167dc9ca724c84d56769cbda7da7a99 100755
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -149,6 +149,8 @@ void camera_move_forward( EKeystate s );
 
 void agent_push_forward( EKeystate s )
 {
+	if(gAgent.isMovementLocked()) return;
+
 	//in free camera control mode we need to intercept keyboard events for avatar movements
 	if (LLFloaterCamera::inFreeCameraMode())
 	{
@@ -164,6 +166,8 @@ void camera_move_backward( EKeystate s );
 
 void agent_push_backward( EKeystate s )
 {
+	if(gAgent.isMovementLocked()) return;
+
 	//in free camera control mode we need to intercept keyboard events for avatar movements
 	if (LLFloaterCamera::inFreeCameraMode())
 	{
@@ -199,12 +203,14 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT
 
 void agent_slide_left( EKeystate s )
 {
+	if(gAgent.isMovementLocked()) return;
 	agent_slide_leftright(s, 1, LLAgent::DOUBLETAP_SLIDELEFT);
 }
 
 
 void agent_slide_right( EKeystate s )
 {
+	if(gAgent.isMovementLocked()) return;
 	agent_slide_leftright(s, -1, LLAgent::DOUBLETAP_SLIDERIGHT);
 }
 
@@ -219,6 +225,8 @@ void agent_turn_left( EKeystate s )
 		return;
 	}
 
+	if(gAgent.isMovementLocked()) return;
+
 	if (LLToolCamera::getInstance()->mouseSteerMode())
 	{
 		agent_slide_left(s);
@@ -247,6 +255,8 @@ void agent_turn_right( EKeystate s )
 		return;
 	}
 
+	if(gAgent.isMovementLocked()) return;
+
 	if (LLToolCamera::getInstance()->mouseSteerMode())
 	{
 		agent_slide_right(s);
@@ -320,8 +330,8 @@ void camera_spin_around_cw( EKeystate s )
 
 void camera_spin_around_ccw_sitting( EKeystate s )
 {
-	if( KEYSTATE_UP == s ) return;
-	if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled())
+	if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDERIGHT ) return;
+	if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
 	{
 		//send keystrokes, but do not change camera
 		agent_turn_right(s);
@@ -336,8 +346,8 @@ void camera_spin_around_ccw_sitting( EKeystate s )
 
 void camera_spin_around_cw_sitting( EKeystate s )
 {
-	if( KEYSTATE_UP == s  ) return;
-	if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled())
+	if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDELEFT ) return;
+	if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
 	{
 		//send keystrokes, but do not change camera
 		agent_turn_left(s);
@@ -413,8 +423,8 @@ void camera_move_backward( EKeystate s )
 
 void camera_move_forward_sitting( EKeystate s )
 {
-	if( KEYSTATE_UP == s  ) return;
-	if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled())
+	if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_FORWARD ) return;
+	if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
 	{
 		agent_push_forward(s);
 	}
@@ -427,9 +437,9 @@ void camera_move_forward_sitting( EKeystate s )
 
 void camera_move_backward_sitting( EKeystate s )
 {
-	if( KEYSTATE_UP == s  ) return;
+	if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_BACKWARD ) return;
 
-	if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled())
+	if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
 	{
 		agent_push_backward(s);
 	}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index be9b4439a874ab5c1ca9ca8126eefc5e099be4f1..3b0adcf7f4cdb4af4c8ed31ad5de94d1504e3092 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2580,9 +2580,13 @@ static LLStringExplicit get_default_item_label(const std::string& item_name)
 
 bool enable_object_touch(LLUICtrl* ctrl)
 {
+	bool new_value = false;
 	LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
-
-	bool new_value = obj && obj->flagHandleTouch();
+	if (obj)
+	{
+		LLViewerObject* parent = (LLViewerObject*)obj->getParent();
+		new_value = obj->flagHandleTouch() || (parent && parent->flagHandleTouch());
+	}
 
 	std::string item_name = ctrl->getName();
 	init_default_item_label(item_name);
@@ -2867,6 +2871,11 @@ bool enable_object_select_in_pathfinding_linksets()
 	return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets();
 }
 
+bool visible_object_select_in_pathfinding_linksets()
+{
+	return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion();
+}
+
 bool enable_object_select_in_pathfinding_characters()
 {
 	return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() &&  LLSelectMgr::getInstance()->selectGetViewableCharacters();
@@ -3881,6 +3890,14 @@ class LLEnableEditShape : public view_listener_t
 	}
 };
 
+class LLEnableHoverHeight : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		return gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled();
+	}
+};
+
 class LLEnableEditPhysics : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
@@ -4354,7 +4371,10 @@ static bool get_derezzable_objects(
 			break;
 
 		case DRD_RETURN_TO_OWNER:
-			can_derez_current = TRUE;
+			if(!object->isAttachment())
+			{
+				can_derez_current = TRUE;
+			}
 			break;
 
 		default:
@@ -4762,7 +4782,7 @@ BOOL enable_take()
 			&& object->permModify())
 			|| (node->mPermissions->getOwner() == gAgent.getID())))
 		{
-			return TRUE;
+			return !object->isAttachment();
 		}
 #endif
 	}
@@ -6075,6 +6095,11 @@ void handle_edit_shape()
 	LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape"));
 }
 
+void handle_hover_height()
+{
+	LLFloaterReg::showInstance("edit_hover_height");
+}
+
 void handle_edit_physics()
 {
 	LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics"));
@@ -8281,6 +8306,10 @@ class LLWorldEnableEnvSettings : public view_listener_t
 			{
 				result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midnight");
 			}
+			else if (tod == "region")
+			{
+				return false;
+			}
 			else
 			{
 				LL_WARNS() << "Unknown time-of-day item:  " << tod << LL_ENDL;
@@ -8567,10 +8596,12 @@ void initialize_menus()
 	view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
 	view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
 	view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape");
+	view_listener_t::addMenu(new LLEnableHoverHeight(), "Edit.EnableHoverHeight");
 	view_listener_t::addMenu(new LLEnableEditPhysics(), "Edit.EnableEditPhysics");
 	commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar));
 	commit.add("EditOutfit", boost::bind(&handle_edit_outfit));
 	commit.add("EditShape", boost::bind(&handle_edit_shape));
+	commit.add("HoverHeight", boost::bind(&handle_hover_height));
 	commit.add("EditPhysics", boost::bind(&handle_edit_physics));
 
 	// View menu
@@ -8979,6 +9010,7 @@ void initialize_menus()
 	enable.add("VisibleBuild", boost::bind(&enable_object_build));
 	commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects));
 	enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets));
+	enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets));
 	commit.add("Pathfinding.Characters.Select", boost::bind(&LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects));
 	enable.add("EnableSelectInPathfindingCharacters", boost::bind(&enable_object_select_in_pathfinding_characters));
 
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index b2a37694fe389d8540e0f15a15d2f6a4f320a342..f8e50ba463e616fff5f09006fdd3eade1967affb 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -503,6 +503,7 @@ class LLFileCloseWindow : public view_listener_t
 		{
 			LLFloater::closeFrontmostFloater();
 		}
+		if (gMenuHolder) gMenuHolder->hideMenus();
 		return true;
 	}
 };
@@ -525,6 +526,7 @@ class LLFileCloseAllWindows : public view_listener_t
 		bool app_quitting = false;
 		gFloaterView->closeAllChildren(app_quitting);
 		LLFloaterSnapshot::getInstance()->closeFloater(app_quitting);
+		if (gMenuHolder) gMenuHolder->hideMenus();
 		return true;
 	}
 };
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d99d2b29904d88218018c25e6968a8a986d4428a..862338b9a0302b3566e811cd0b8cbe4042e6c36c 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2691,7 +2691,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 				LLSD args;
 				args["SUBJECT"] = subj;
 				args["MESSAGE"] = mes;
-				LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(LLDate(timestamp)));
+				LLDate notice_date = LLDate(timestamp).notNull() ? LLDate(timestamp) : LLDate::now();
+				LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(notice_date));
 			}
 
 			// Also send down the old path for now.
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 74b8e693c483bb0651060e091d156c8d6edab421..87424cd5840bf500dbadd517d89ba740b7e33888 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3374,8 +3374,17 @@ void LLViewerObject::setLinksetCost(F32 cost)
 {
 	mLinksetCost = cost;
 	mCostStale = false;
-	
-	if (isSelected())
+
+	BOOL needs_refresh = isSelected();
+	child_list_t::iterator iter = mChildList.begin();
+	while(iter != mChildList.end() && !needs_refresh)
+	{
+		LLViewerObject* child = *iter;
+		needs_refresh = child->isSelected();
+		iter++;
+	}
+
+	if (needs_refresh)
 	{
 		gFloaterTools->dirty();
 	}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index b6a4878701f01c45bb1bb6781925de1387703e73..9aede27a3505350393a1e338134c323125f8df4b 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -705,7 +705,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL
 bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const
 {
 	return (region && region->getAllowDamage())
-		|| (parcel && parcel->getAllowDamage());
+		&& (parcel && parcel->getAllowDamage());
 }
 
 BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 50276b77ef8e2a649719e33cfb8443b5545d5584..f2efe60257a1ba66305091fe9f8dec440e844090 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -425,6 +425,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
 	mCacheDirty(FALSE),
 	mReleaseNotesRequested(FALSE),
 	mCapabilitiesReceived(false),
+	mSimulatorFeaturesReceived(false),
 	mBitsReceived(0.f),
 	mPacketsReceived(0.f),
 	mDead(FALSE),
@@ -2039,6 +2040,26 @@ void LLViewerRegion::getInfo(LLSD& info)
 	info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
 }
 
+boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+	return mSimulatorFeaturesReceivedSignal.connect(cb);
+}
+
+void LLViewerRegion::setSimulatorFeaturesReceived(bool received)
+{
+	mSimulatorFeaturesReceived = received;
+	if (received)
+	{
+		mSimulatorFeaturesReceivedSignal(getRegionID());
+		mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
+	}
+}
+
+bool LLViewerRegion::simulatorFeaturesReceived() const
+{
+	return mSimulatorFeaturesReceived;
+}
+
 void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) const
 {
 	sim_features = mSimulatorFeatures;
@@ -2052,6 +2073,9 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
 	LLSDSerialize::toPrettyXML(sim_features, str);
 	LL_INFOS() << str.str() << LL_ENDL;
 	mSimulatorFeatures = sim_features;
+
+	setSimulatorFeaturesReceived(true);
+	
 }
 
 //this is called when the parent is not cacheable.
@@ -3113,6 +3137,12 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
 	return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") &&
 			 mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean());
 }
+
+bool LLViewerRegion::avatarHoverHeightEnabled() const
+{
+	return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
+			 mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
+}
 /* Static Functions */
 
 void log_capabilities(const CapabilityMap &capmap)
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index d01e7469368820cc7a673d7fa2aa196bbc45b82f..c14fa5aee805c62bf9322237b428a49de8711a97 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -309,12 +309,19 @@ public:
 	bool meshRezEnabled() const;
 	bool meshUploadEnabled() const;
 
+	// has region received its simulator features list? Requires an additional query after caps received.
+	void setSimulatorFeaturesReceived(bool);
+	bool simulatorFeaturesReceived() const;
+	boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb);
+	
 	void getSimulatorFeatures(LLSD& info) const;	
 	void setSimulatorFeatures(const LLSD& info);
 
 	
 	bool dynamicPathfindingEnabled() const;
 
+	bool avatarHoverHeightEnabled() const;
+
 	typedef enum
 	{
 		CACHE_MISS_TYPE_FULL = 0,
@@ -512,6 +519,7 @@ private:
 	BOOL                                    mCacheDirty;
 	BOOL	mAlive;					// can become false if circuit disconnects
 	BOOL	mCapabilitiesReceived;
+	BOOL	mSimulatorFeaturesReceived;
 	BOOL    mReleaseNotesRequested;
 	BOOL    mDead;  //if true, this region is in the process of deleting.
 	BOOL    mPaused; //pause processing the objects in the region
@@ -532,11 +540,13 @@ private:
 	CacheMissItem::cache_miss_list_t   mCacheMissList;
 	
 	caps_received_signal_t mCapabilitiesReceivedSignal;		
+	caps_received_signal_t mSimulatorFeaturesReceivedSignal;		
+
 	LLSD mSimulatorFeatures;
 
 	// the materials capability throttle
 	LLFrameTimer mMaterialsCapThrottleTimer;
-LLFrameTimer	mRenderInfoRequestTimer;
+	LLFrameTimer mRenderInfoRequestTimer;
 };
 
 inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4e2eef39d67d8c20a45b3e165826715e0228c083..e684be4361d303648711df9da99379c320837e50 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -655,12 +655,36 @@ S8 LLViewerTexture::getType() const
 
 void LLViewerTexture::cleanup()
 {
+	notifyAboutMissingAsset();
+
 	mFaceList[LLRender::DIFFUSE_MAP].clear();
 	mFaceList[LLRender::NORMAL_MAP].clear();
 	mFaceList[LLRender::SPECULAR_MAP].clear();
 	mVolumeList.clear();
 }
 
+void LLViewerTexture::notifyAboutCreatingTexture()
+{
+	for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+	{
+		for(U32 f = 0; f < mNumFaces[ch]; f++)
+		{
+			mFaceList[ch][f]->notifyAboutCreatingTexture(this);
+		}
+	}
+}
+
+void LLViewerTexture::notifyAboutMissingAsset()
+{
+	for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+	{
+		for(U32 f = 0; f < mNumFaces[ch]; f++)
+		{
+			mFaceList[ch][f]->notifyAboutMissingAsset(this);
+		}
+	}
+}
+
 // virtual
 void LLViewerTexture::dump()
 {
@@ -1281,7 +1305,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
 			llassert(mNumFaces[j] <= mFaceList[j].size());
 
 			for(U32 i = 0; i < mNumFaces[j]; i++)
-		{
+			{
 				mFaceList[j][i]->dirtyTexture();
 			}
 		}
@@ -1431,9 +1455,11 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
 		destroyRawImage();
 		return FALSE;
 	}
-	
-		res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
-	
+
+	res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+
+	notifyAboutCreatingTexture();
+
 	setActive();
 
 	if (!needsToSaveRawImage())
@@ -1441,6 +1467,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
 		mNeedsAux = FALSE;
 		destroyRawImage();
 	}
+
 	return res;
 }
 
@@ -2132,6 +2159,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
 	}
 	if (is_missing)
 	{
+		notifyAboutMissingAsset();
+
 		if (mUrl.empty())
 		{
 			LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 05912404e4382d1871752c7d06e2090a5e7dc527..aed7e94945305c17e151dc71f480c64105862b56 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -169,9 +169,13 @@ public:
 	/*virtual*/ void updateBindStatsForTester() ;
 protected:
 	void cleanup() ;
-	void init(bool firstinit) ;	
+	void init(bool firstinit) ;
 	void reorganizeFaceList() ;
 	void reorganizeVolumeList() ;
+
+	void notifyAboutMissingAsset();
+	void notifyAboutCreatingTexture();
+
 private:
 	friend class LLBumpImageList;
 	friend class LLUIImageList;
@@ -307,10 +311,11 @@ public:
 
 	void addToCreateTexture();
 
+
 	 // ONLY call from LLViewerTextureList
 	BOOL createTexture(S32 usename = 0);
-	void destroyTexture() ;	
-	
+	void destroyTexture() ;
+
 	virtual void processTextureStats() ;
 	F32  calcDecodePriority() ;
 
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b98726900f8cc345bd24731b2cc51028c04cd54f..322a55383a09950caa8257b617a637a0845c167d 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -622,7 +622,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
 	{
 		return;
 	}
-	llassert(new_image);
+	//llassert(new_image);
 	LLUUID image_id = new_image->getID();
 	
 	LLViewerFetchedTexture *image = findImage(image_id);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9dcd0b81e089c838ceafb095ce6ed5f1227171e5..756248a35610e0643a131bcb27c49fdfd70665eb 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3757,7 +3757,12 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe
 	return intersect;
 }
 
-void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent)
+void LLViewerWindow::pickAsync( S32 x,
+								S32 y_from_bot,
+								MASK mask,
+								void (*callback)(const LLPickInfo& info),
+								BOOL pick_transparent,
+								BOOL pick_unselectable)
 {
 	BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
 	if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@@ -3767,7 +3772,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
 		pick_transparent = TRUE;
 	}
 
-	LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, callback);
+	LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback);
 	schedulePick(pick_info);
 }
 
@@ -3835,7 +3840,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot,  BOOL pick_trans
 	
 	// shortcut queueing in mPicks and just update mLastPick in place
 	MASK	key_mask = gKeyboard->currentMask(TRUE);
-	mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, NULL);
+	mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL);
 	mLastPick.fetchResults();
 
 	return mLastPick;
@@ -4084,7 +4089,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con
 
 
 // Returns global position
-BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global)
+BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance)
 {
 	LLVector3		mouse_direction_global = mouseDirectionGlobal(x,y);
 	F32				mouse_dir_scale;
@@ -4093,6 +4098,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
 	F32			land_z;
 	const F32	FIRST_PASS_STEP = 1.0f;		// meters
 	const F32	SECOND_PASS_STEP = 0.1f;	// meters
+	const F32	draw_distance = ignore_distance ? MAX_FAR_CLIP : gAgentCamera.mDrawDistance;
 	LLVector3d	camera_pos_global;
 
 	camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -4100,7 +4106,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
 	LLVector3		probe_point_region;
 
 	// walk forwards to find the point
-	for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgentCamera.mDrawDistance; mouse_dir_scale += FIRST_PASS_STEP)
+	for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < draw_distance; mouse_dir_scale += FIRST_PASS_STEP)
 	{
 		LLVector3d mouse_direction_global_d;
 		mouse_direction_global_d.setVec(mouse_direction_global * mouse_dir_scale);
@@ -5247,6 +5253,7 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
 		       BOOL pick_transparent,
 			   BOOL pick_particle,
 		       BOOL pick_uv_coords,
+			   BOOL pick_unselectable,
 		       void (*pick_callback)(const LLPickInfo& pick_info))
 	: mMousePt(mouse_pos),
 	  mKeyMask(keyboard_mask),
@@ -5262,7 +5269,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
 	  mBinormal(),
 	  mHUDIcon(NULL),
 	  mPickTransparent(pick_transparent),
-	  mPickParticle(pick_particle)
+	  mPickParticle(pick_particle),
+	  mPickUnselectable(pick_unselectable)
 {
 }
 
@@ -5337,7 +5345,7 @@ void LLPickInfo::fetchResults()
 
 			// put global position into land_pos
 			LLVector3d land_pos;
-			if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos))
+			if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos, mPickUnselectable))
 			{
 				// The selected point is beyond the draw distance or is otherwise 
 				// not selectable. Return before calling mPickCallback().
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 5d2df2dfd721994bed248419925552cc0570b8cd..7fde52d4e102cb8b8517603e6efd3b2cf240f68f 100755
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -91,6 +91,7 @@ public:
 		BOOL pick_transparent,
 		BOOL pick_particle,
 		BOOL pick_surface_info,
+		BOOL pick_unselectable,
 		void (*pick_callback)(const LLPickInfo& pick_info));
 
 	void fetchResults();
@@ -123,6 +124,7 @@ public:
 	LLVector3		mBinormal;
 	BOOL			mPickTransparent;
 	BOOL			mPickParticle;
+	BOOL			mPickUnselectable;
 	void		    getSurfaceInfo();
 
 private:
@@ -360,7 +362,12 @@ public:
 	void			performPick();
 	void			returnEmptyPicks();
 
-	void			pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE);
+	void			pickAsync(	S32 x,
+								S32 y_from_bot,
+								MASK mask,
+								void (*callback)(const LLPickInfo& pick_info),
+								BOOL pick_transparent = FALSE,
+								BOOL pick_unselectable = FALSE);
 	LLPickInfo		pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE);
 	LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
 										   LLVector4a* intersection);
@@ -386,7 +393,7 @@ public:
 	//const LLVector3d& lastNonFloraObjectHitOffset();
 
 	// mousePointOnLand() returns true if found point
-	BOOL			mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global);
+	BOOL			mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE);
 	BOOL			mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal);
 	LLVector3d		clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const;
 	BOOL			clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2d62b807b07523c038bdc9e0452465940f5c6419..48083f7a9e17eae4f44965f4577735f616821ef6 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -112,6 +112,9 @@ extern F32 ANIM_SPEED_MAX;
 extern F32 ANIM_SPEED_MIN;
 extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
 
+const F32 MAX_HOVER_Z = 2.0;
+const F32 MIN_HOVER_Z = -2.0;
+
 // #define OUTPUT_BREAST_DATA
 
 using namespace LLAvatarAppearanceDefines;
@@ -253,6 +256,8 @@ struct LLAppearanceMessageContents
 	//U32 appearance_flags = 0;
 	std::vector<F32> mParamWeights;
 	std::vector<LLVisualParam*> mParams;
+	LLVector3 mHoverOffset;
+	bool mHoverOffsetWasSet;
 };
 
 struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint>
@@ -717,10 +722,13 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mIsEditingAppearance(FALSE),
 	mUseLocalAppearance(FALSE),
 	mLastUpdateRequestCOFVersion(-1),
-	mLastUpdateReceivedCOFVersion(-1)
+	mLastUpdateReceivedCOFVersion(-1),
+	mCachedMuteListUpdateTime(0),
+	mCachedInMuteList(false)
 {
 	//VTResume();  // VTune
-	
+	setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+
 	// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
 	const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
 	mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
@@ -773,6 +781,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mRuthTimer.reset();
 	mRuthDebugTimer.reset();
 	mDebugExistenceTimer.reset();
+	mLastAppearanceMessageTimer.reset();
 
     if(LLSceneMonitor::getInstance()->isEnabled())
 	{
@@ -1956,6 +1965,11 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
 	// Do base class updates...
 	U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
 
+	//LLTEContents tec;
+	//S32 te_retval = parseTEMessage(mesgsys, _PREHASH_ObjectData, block_num, tec);
+
+	LL_DEBUGS("Avatar") << avString() << update_type << LL_ENDL; 
+
 	// Print out arrival information once we have name of avatar.
 		if (has_name && getNVPair("FirstName"))
 		{
@@ -3122,10 +3136,9 @@ bool LLVOAvatar::isVisuallyMuted()
 
 					U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
 
-					muted = LLMuteList::getInstance()->isMuted(getID()) ||
-						(mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
-						(mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
-						(mVisualComplexity > max_cost && max_render_cost > 0);
+					muted = (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
+							(mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
+							(mVisualComplexity > max_cost && max_render_cost > 0);
 
 					// Could be part of the grand || collection above, but yanked out to make the logic visible
 					if (!muted)
@@ -3157,7 +3170,7 @@ bool LLVOAvatar::isVisuallyMuted()
 		}
 	}
 
-	return muted;
+	return muted || isInMuteList();
 }
 
 void	LLVOAvatar::forceUpdateVisualMuteSettings()
@@ -3166,13 +3179,27 @@ void	LLVOAvatar::forceUpdateVisualMuteSettings()
 	mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() - 1.0;
 }
 
+bool LLVOAvatar::isInMuteList()
+{
+	bool muted = false;
+	F64 now = LLFrameTimer::getTotalSeconds();
+	if (now < mCachedMuteListUpdateTime)
+	{
+		muted = mCachedInMuteList;
+	}
+	else
+	{
+		muted = LLMuteList::getInstance()->isMuted(getID());
+
+		const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
+		mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
+		mCachedInMuteList = muted;
+	}
+	return muted;
+}
 
-//------------------------------------------------------------------------
-// updateCharacter()
-// called on both your avatar and other avatars
-//------------------------------------------------------------------------
-BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
-{	
+void LLVOAvatar::updateDebugText()
+{
 	// clear debug text
 	mDebugText.clear();
 
@@ -3209,6 +3236,22 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 			debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
 		}
 		debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]);
+		bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled();
+		debug_line += hover_enabled ? " H" : " h";
+		const LLVector3& hover_offset = getHoverOffset();
+		if (hover_offset[2] != 0.0)
+		{
+			debug_line += llformat(" hov_z: %f", hover_offset[2]);
+			debug_line += llformat(" %s", (mIsSitting ? "S" : "T"));
+			debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
+		}
+		F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32();
+		static const char *elapsed_chars = "Xx*...";
+		U32 bucket = U32(elapsed*2);
+		if (bucket < strlen(elapsed_chars))
+		{
+			debug_line += llformat(" %c", elapsed_chars[bucket]);
+		}
 		addDebugText(debug_line);
 	}
 	if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@@ -3216,7 +3259,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 		if (!mBakedTextureDebugText.empty())
 			addDebugText(mBakedTextureDebugText);
 	}
-				 
+
 	if (LLVOAvatar::sShowAnimationDebug)
 	{
 		for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
@@ -3245,6 +3288,27 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 		}
 	}
 
+	if (!mDebugText.size() && mText.notNull())
+	{
+		mText->markDead();
+		mText = NULL;
+	}
+	else if (mDebugText.size())
+	{
+		setDebugText(mDebugText);
+	}
+	mDebugText.clear();
+
+}
+
+//------------------------------------------------------------------------
+// updateCharacter()
+// called on both your avatar and other avatars
+//------------------------------------------------------------------------
+BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
+{	
+	updateDebugText();
+	
 	if (!mIsBuilt)
 	{
 		return FALSE;
@@ -3353,9 +3417,15 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 	LLVector3 xyVel = getVelocity();
 	xyVel.mV[VZ] = 0.0f;
 	speed = xyVel.length();
-
+	// remembering the value here prevents a display glitch if the
+	// animation gets toggled during this update.
+	bool was_sit_ground_constrained = isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED);
+	
 	if (!(mIsSitting && getParent()))
 	{
+		// This case includes all configurations except sitting on an
+		// object, so does include ground sit.
+
 		//--------------------------------------------------------------------
 		// get timing info
 		// handle initial condition case
@@ -3409,9 +3479,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 		// correct for the fact that the pelvis is not necessarily the center 
 		// of the agent's physical representation
 		root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
+		if (!mIsSitting && !was_sit_ground_constrained)
+		{
+			root_pos += LLVector3d(getHoverOffset());
+		}
 		
 		LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
 
+
 		if (newPosition != mRoot->getXform()->getWorldPosition())
 		{		
 			mRoot->touch();
@@ -3576,7 +3651,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 	}
 	else if (mDrawable.notNull())
 	{
-		mRoot->setPosition(mDrawable->getPosition());
+		LLVector3 pos = mDrawable->getPosition();
+		pos += getHoverOffset() * mDrawable->getRotation();
+		mRoot->setPosition(pos);
 		mRoot->setRotation(mDrawable->getRotation());
 	}
 	
@@ -3595,7 +3672,21 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 	{
 		updateMotions(LLCharacter::NORMAL_UPDATE);
 	}
-	
+
+	// Special handling for sitting on ground.
+	if (!getParent() && (mIsSitting || was_sit_ground_constrained))
+	{
+		
+		F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ];
+		if (off_z != 0.0)
+		{
+			LLVector3 pos = mRoot->getWorldPosition();
+			pos.mV[VZ] += off_z;
+			mRoot->touch();
+			mRoot->setWorldPosition(pos);
+		}
+	}
+
 	// update head position
 	updateHeadOffset();
 
@@ -3679,17 +3770,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 
 	mRoot->updateWorldMatrixChildren();
 
-	if (!mDebugText.size() && mText.notNull())
-	{
-		mText->markDead();
-		mText = NULL;
-	}
-	else if (mDebugText.size())
-	{
-		setDebugText(mDebugText);
-	}
-	mDebugText.clear();
-
 	//mesh vertices need to be reskinned
 	mNeedsSkin = TRUE;
 	return TRUE;
@@ -7127,6 +7207,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
 		// For future use:
 		//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
 	}
+
+	// Parse the AppearanceData field, if any.
+	contents.mHoverOffsetWasSet = false;
+	if (mesgsys->has(_PREHASH_AppearanceHover))
+	{
+		LLVector3 hover;
+		mesgsys->getVector3Fast(_PREHASH_AppearanceHover, _PREHASH_HoverHeight, hover);
+		LL_DEBUGS("Avatar") << avString() << " hover received " << hover.mV[ VX ] << "," << hover.mV[ VY ] << "," << hover.mV[ VZ ] << LL_ENDL;
+		contents.mHoverOffset = hover;
+		contents.mHoverOffsetWasSet = true;
+	}
 	
 	// Parse visual params, if any.
 	S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
@@ -7244,6 +7335,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
 		return;
 	}
 
+	mLastAppearanceMessageTimer.reset();
+
 	ESex old_sex = getSex();
 
 	LLAppearanceMessageContents contents;
@@ -7428,6 +7521,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
 		}
 	}
 
+	if (contents.mHoverOffsetWasSet && !isSelf())
+	{
+		// Got an update for some other avatar
+		// Ignore updates for self, because we have a more authoritative value in the preferences.
+		setHoverOffset(contents.mHoverOffset);
+		LL_INFOS("Avatar") << avString() << "setting hover from message" << contents.mHoverOffset[2] << LL_ENDL;
+	}
+
+	if (!contents.mHoverOffsetWasSet && !isSelf())
+	{
+		// If we don't get a value at all, we are presumably in a
+		// region that does not support hover height.
+		LL_WARNS() << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL;
+		setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+	}
+
 	setCompositeUpdatesEnabled( TRUE );
 
 	// If all of the avatars are completely baked, release the global image caches to conserve memory.
@@ -8050,7 +8159,7 @@ void LLVOAvatar::updateImpostors()
 
 BOOL LLVOAvatar::isImpostor()
 {
-	return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+	return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
 }
 
 
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2223acc893de6300f33b0246e5f8b84dd4a77b94..1c3f4f2aa71272bc32c7d796d692e02aff1d0c04 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -214,7 +214,6 @@ public:
 	/*virtual*/ LLVector3		getPosAgentFromGlobal(const LLVector3d &position);
 	virtual void				updateVisualParams();
 
-
 /**                    Inherited
  **                                                                            **
  *******************************************************************************/
@@ -234,6 +233,7 @@ private: //aligned members
 	// Updates
 	//--------------------------------------------------------------------
 public:
+	void			updateDebugText();
 	virtual BOOL 	updateCharacter(LLAgent &agent);
 	void 			idleUpdateVoiceVisualizer(bool voice_enabled);
 	void 			idleUpdateMisc(bool detailed_update);
@@ -383,6 +383,7 @@ public:
 public:
 	U32 		renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
 	bool		isVisuallyMuted();
+	bool 		isInMuteList();
 	void		setCachedVisualMute(bool muted)						{ mCachedVisualMute = muted;	};
 	void		forceUpdateVisualMuteSettings();
 
@@ -422,6 +423,9 @@ private:
 	bool		mCachedVisualMute;				// cached return value for isVisuallyMuted()
 	F64			mCachedVisualMuteUpdateTime;	// Time to update mCachedVisualMute
 
+	bool		mCachedInMuteList;
+	F64			mCachedMuteListUpdateTime;
+
 	VisualMuteSettings		mVisuallyMuteSetting;			// Always or never visually mute this AV
 
 	//--------------------------------------------------------------------
@@ -988,6 +992,7 @@ public:
 protected:
 	LLFrameTimer	mRuthDebugTimer; // For tracking how long it takes for av to rez
 	LLFrameTimer	mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
+	LLFrameTimer	mLastAppearanceMessageTimer; // Time since last appearance message received.
 
 	//--------------------------------------------------------------------
 	// COF monitoring
@@ -1020,6 +1025,9 @@ protected: // Shared with LLVOAvatarSelf
 extern const F32 SELF_ADDITIONAL_PRI;
 extern const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL;
 
+extern const F32 MAX_HOVER_Z;
+extern const F32 MIN_HOVER_Z;
+
 std::string get_sequential_numbered_file_name(const std::string& prefix,
 											  const std::string& suffix);
 void dump_sequential_xml(const std::string outprefix, const LLSD& content);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 3f3cd25f956695f7f8ded1d97c5b8b1fd38369a0..ae7a233876beaed665db35f33d16f8cea60277c3 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -127,6 +127,25 @@ struct LocalTextureData
 	LLTextureEntry *mTexEntry;
 };
 
+// TODO - this class doesn't really do anything, could just use a base
+// class responder if nothing else gets added.
+class LLHoverHeightResponder: public LLHTTPClient::Responder
+{
+public:
+	LLHoverHeightResponder(): LLHTTPClient::Responder() {}
+
+private:
+	void httpFailure()
+	{
+		LL_WARNS() << dumpResponse() << LL_ENDL;
+	}
+
+	void httpSuccess()
+	{
+		LL_INFOS() << dumpResponse() << LL_ENDL;
+	}
+};
+
 //-----------------------------------------------------------------------------
 // Callback data
 //-----------------------------------------------------------------------------
@@ -159,7 +178,10 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
 	mScreenp(NULL),
 	mLastRegionHandle(0),
 	mRegionCrossingCount(0),
-	mInitialBakesLoaded(false)
+	mInitialBakesLoaded(false),
+	// Value outside legal range, so will always be a mismatch the
+	// first time through.
+	mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f))
 {
 	mMotionController.mIsSelf = TRUE;
 
@@ -220,11 +242,40 @@ void LLVOAvatarSelf::initInstance()
 		return;
 	}
 
+	setHoverIfRegionEnabled();
+
 	//doPeriodically(output_self_av_texture_diagnostics, 30.0);
 	doPeriodically(update_avatar_rez_metrics, 5.0);
 	doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0);
 }
 
+void LLVOAvatarSelf::setHoverIfRegionEnabled()
+{
+	if (getRegion() && getRegion()->simulatorFeaturesReceived())
+	{
+		if (getRegion()->avatarHoverHeightEnabled())
+		{
+			F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+			setHoverOffset(LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)));
+			LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << hover_z << LL_ENDL;
+		}
+		else 
+		{
+			setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+			LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL;
+		}
+	}
+	else
+	{
+		LL_INFOS("Avatar") << avString() << " region or simulator features not known, no change on hover" << LL_ENDL;
+		if (getRegion())
+		{
+			getRegion()->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+		}
+
+	}
+}
+
 bool LLVOAvatarSelf::checkStuckAppearance()
 {
 	const F32 CONDITIONAL_UNSTICK_INTERVAL = 300.0;
@@ -835,6 +886,12 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
 	}
 }
 
+void LLVOAvatarSelf::onSimulatorFeaturesReceived(const LLUUID& region_id)
+{
+	LL_INFOS("Avatar") << "simulator features received, setting hover based on region props" << LL_ENDL;
+	setHoverIfRegionEnabled();
+}
+
 //virtual
 void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
 {
@@ -853,6 +910,17 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
 		//LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region
 		//	<< " while pos_from_new_region is " << pos_from_new_region
 		//	<< LL_ENDL;
+
+		// Update hover height, or schedule callback, based on whether
+		// it's supported in this region.
+		if (regionp->simulatorFeaturesReceived())
+		{
+			setHoverIfRegionEnabled();
+		}
+		else
+		{
+			regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+		}
 	}
 
 	if (!regionp || (regionp->getHandle() != mLastRegionHandle))
@@ -2709,6 +2777,39 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
 	return success;
 }
 
+//------------------------------------------------------------------------
+// sendHoverHeight()
+//------------------------------------------------------------------------
+void LLVOAvatarSelf::sendHoverHeight() const
+{
+	std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
+
+	if (!url.empty())
+	{
+		LLSD update = LLSD::emptyMap();
+		const LLVector3& hover_offset = getHoverOffset();
+		update["hover_height"] = hover_offset[2];
+
+		LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
+		LLHTTPClient::post(url, update, new LLHoverHeightResponder);
+
+		mLastHoverOffsetSent = hover_offset;
+	}
+}
+
+void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_update)
+{
+	if (getHoverOffset() != hover_offset)
+	{
+		LL_INFOS("Avatar") << avString() << " setting hover due to change " << hover_offset[2] << LL_ENDL;
+		LLVOAvatar::setHoverOffset(hover_offset, send_update);
+	}
+	if (send_update && (hover_offset != mLastHoverOffsetSent))
+	{
+		LL_INFOS("Avatar") << avString() << " sending hover due to change " << hover_offset[2] << LL_ENDL;
+		sendHoverHeight();
+	}
+}
 
 //------------------------------------------------------------------------
 // needsRenderBeam()
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 5f36872575cf63fe1d5e2ea90561b0d1f9142ab3..b8e9bbb77a42dd4dacd9bc674ee89fab9d1f26d9 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -75,6 +75,9 @@ protected:
 	// LLViewerObject interface and related
 	//--------------------------------------------------------------------
 public:
+	boost::signals2::connection                   mRegionChangedSlot;
+
+	void					onSimulatorFeaturesReceived(const LLUUID& region_id);
 	/*virtual*/ void 		updateRegion(LLViewerRegion *regionp);
 	/*virtual*/ void   	 	idleUpdate(LLAgent &agent, const F64 &time);
 
@@ -328,6 +331,14 @@ public:
 public:
 	bool			sendAppearanceMessage(LLMessageSystem *mesgsys) const;
 
+	// -- care and feeding of hover height.
+	void 			setHoverIfRegionEnabled();
+	void			sendHoverHeight() const;
+	/*virtual*/ void setHoverOffset(const LLVector3& hover_offset, bool send_update=true);
+
+private:
+	mutable LLVector3 mLastHoverOffsetSent;
+
 /**                    Appearance
  **                                                                            **
  *******************************************************************************/
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 66ee386874c2606b0ea89d13da6bb9a767272c5f..47d4e5565bfbf8f28402373586c9f970cd5515fe 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1742,6 +1742,8 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
 				}
 			}
 		}
+
+		genBBoxes(FALSE);
 	}
 	// it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local
 	else
@@ -2038,21 +2040,235 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
 	return res;
 }
 
-S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
-{
-	S32 res = 0;
-	
-	if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) 
+bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{ //Ok, here we have confirmation about texture creation, check our wait-list
+  //and make changes, or return false
+
+	std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+
+	typedef std::map<U8, LLMaterialPtr> map_te_material;
+	map_te_material new_material;
+
+	for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
+	{
+		LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+
+		//here we just interesting in DIFFUSE_MAP only!
+		if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat())
+		{ //ok let's check the diffuse mode
+			switch(cur_material->getDiffuseAlphaMode())
+			{
+			case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+			case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+			case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+				{ //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+
+					LLMaterialPtr mat = NULL;
+					map_te_material::iterator it = new_material.find(range_it->second.te);
+					if(new_material.end() == it) {
+						mat = new LLMaterial(cur_material->asLLSD());
+						new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+					} else {
+						mat = it->second;
+					}
+
+					mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+
+				} break;
+			} //switch
+		} //if
+	} //for
+
+	//setup new materials
+	for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
 	{
-		LLViewerObject::setTEMaterialID(te, LLMaterialID::null);
-		res = LLViewerObject::setTEMaterialParams(te, NULL);
+		LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
+		LLViewerObject::setTEMaterialParams(it->first, it->second);
 	}
-	else 
+
+	//clear wait-list
+	mWaitingTextureInfo.erase(range.first, range.second);
+
+	return 0 != new_material.size();
+}
+
+bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
+{ //Ok, here if we wait information about texture and it's missing
+  //then depending from the texture map (diffuse, normal, or specular)
+  //make changes in material and confirm it. If not return false.
+	std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+	if(range.first == range.second) return false;
+
+	typedef std::map<U8, LLMaterialPtr> map_te_material;
+	map_te_material new_material;
+	
+	for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
 	{
-		res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+		LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+
+		switch(range_it->second.map)
+		{
+		case LLRender::DIFFUSE_MAP:
+			{
+				if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode())
+				{ //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+					LLMaterialPtr mat = NULL;
+					map_te_material::iterator it = new_material.find(range_it->second.te);
+					if(new_material.end() == it) {
+						mat = new LLMaterial(cur_material->asLLSD());
+						new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+					} else {
+						mat = it->second;
+					}
+
+					mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+				}
+			} break;
+		case LLRender::NORMAL_MAP:
+			{ //missing texture => reset material texture id
+				LLMaterialPtr mat = NULL;
+				map_te_material::iterator it = new_material.find(range_it->second.te);
+				if(new_material.end() == it) {
+					mat = new LLMaterial(cur_material->asLLSD());
+					new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+				} else {
+					mat = it->second;
+				}
+
+				mat->setNormalID(LLUUID::null);
+			} break;
+		case LLRender::SPECULAR_MAP:
+			{ //missing texture => reset material texture id
+				LLMaterialPtr mat = NULL;
+				map_te_material::iterator it = new_material.find(range_it->second.te);
+				if(new_material.end() == it) {
+					mat = new LLMaterial(cur_material->asLLSD());
+					new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+				} else {
+					mat = it->second;
+				}
+
+				mat->setSpecularID(LLUUID::null);
+			} break;
+		case LLRender::NUM_TEXTURE_CHANNELS:
+				//nothing to do, make compiler happy
+			break;
+		} //switch
+	} //for
+
+	//setup new materials
+	for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
+	{
+		LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
+		LLViewerObject::setTEMaterialParams(it->first, it->second);
+	}
+
+	//clear wait-list
+	mWaitingTextureInfo.erase(range.first, range.second);
+
+	return 0 != new_material.size();
+}
+
+S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
+{
+	LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams);
+
+	if(pMaterialParams)
+	{ //check all of them according to material settings
+
+		LLViewerTexture *img_diffuse = getTEImage(te);
+		LLViewerTexture *img_normal = getTENormalMap(te);
+		LLViewerTexture *img_specular = getTESpecularMap(te);
+
+		llassert(NULL != img_diffuse);
+
+		LLMaterialPtr new_material = NULL;
+
+		//diffuse
+		if(NULL != img_diffuse)
+		{ //guard
+			if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
+			{ //ok here we don't have information about texture, let's belief and leave material settings
+			  //but we remember this case
+				mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
+			}
+			else
+			{
+				bool bSetDiffuseNone = false;
+				if(img_diffuse->isMissingAsset())
+				{
+					bSetDiffuseNone = true;
+				}
+				else
+				{
+					switch(pMaterialParams->getDiffuseAlphaMode())
+					{
+					case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+					case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+					case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+						{ //all of them modes available only for 32 bit textures
+							if(GL_RGBA != img_diffuse->getPrimaryFormat())
+							{
+								bSetDiffuseNone = true;
+							}
+						} break;
+					}
+				} //else
+
+
+				if(bSetDiffuseNone)
+				{ //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+					new_material = new LLMaterial(pMaterialParams->asLLSD());
+					new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+				}
+			}
+		}
+
+		//normal
+		if(LLUUID::null != pMaterialParams->getNormalID())
+		{
+			if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID())
+			{
+				if(!new_material) {
+					new_material = new LLMaterial(pMaterialParams->asLLSD());
+				}
+				new_material->setNormalID(LLUUID::null);
+			}
+			else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat())
+			{ //ok here we don't have information about texture, let's belief and leave material settings
+				//but we remember this case
+				mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te)));
+			}
+
+		}
+
+
+		//specular
+		if(LLUUID::null != pMaterialParams->getSpecularID())
+		{
+			if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID())
+			{
+				if(!new_material) {
+					new_material = new LLMaterial(pMaterialParams->asLLSD());
+				}
+				new_material->setSpecularID(LLUUID::null);
+			}
+			else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat())
+			{ //ok here we don't have information about texture, let's belief and leave material settings
+				//but we remember this case
+				mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te)));
+			}
+		}
+
+		if(new_material) {
+			pMaterial = new_material;
+			LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial);
+		}
 	}
 
-	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res
+	S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial);
+
+	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res
 							 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
 							 << LL_ENDL;
 	setChanged(ALL_CHANGED);
@@ -4960,7 +5176,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 					facep->clearVertexBuffer();
 				}		
 			}
-
+			
 			if (is_rigged)
 			{
 				if (!drawablep->isState(LLDrawable::RIGGED))
@@ -4976,7 +5192,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 			{
 				drawablep->clearState(LLDrawable::RIGGED);
 			}
-			
 		}
 	}
 
@@ -5451,8 +5666,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
 
 					flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
 				}
-				}
 			}
+		}
 
 
 		if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB)
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 7503f8c5aa8548a434c4ac32c25b1fa5c6fc90c6..bbaca316b0a87957d761d74442d4754c0b31cc51 100755
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -372,17 +372,37 @@ private:
 
 	// statics
 public:
-	static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop 
+	static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
 	static F32 sLODFactor;				// LOD scale factor
 	static F32 sDistanceFactor;			// LOD distance factor
-		
+
 	static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
 	static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient;
 
 protected:
 	static S32 sNumLODChanges;
-	
+
 	friend class LLVolumeImplFlexible;
+
+public:
+	bool notifyAboutCreatingTexture(LLViewerTexture *texture);
+	bool notifyAboutMissingAsset(LLViewerTexture *texture);
+
+private:
+	struct material_info 
+	{
+		LLRender::eTexIndex map;
+		U8 te;
+
+		material_info(LLRender::eTexIndex map_, U8 te_)
+			: map(map_)
+			, te(te_)
+		{}
+	};
+
+	typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t;
+	mmap_UUID_MAP_t	mWaitingTextureInfo;
+
 };
 
 #endif // LL_LLVOVOLUME_H
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index b4e8114a5f5385a508dfd9a9ec77909305ce0410..315af3f9421d20246ddc5e1d1edb8ebd1154ae5e 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -796,9 +796,12 @@ void LLWorld::updateNetStats()
 	add(LLStatViewer::PACKETS_IN, packets_in);
 	add(LLStatViewer::PACKETS_OUT, packets_out);
 	add(LLStatViewer::PACKETS_LOST, packets_lost);
-	if (packets_in)
+
+	F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
+	if (total_packets_in > 0)
 	{
-		sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in));
+		F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
+		sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in));
 	}
 
 	mLastPacketsIn = gMessageSystem->mPacketsIn;
diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml
index f2ed7c2e64cf19dac5530625dece1f272c4b2c6f..aa6bc5367275ac1ea7ee5b1bd4e2aff7a8d1dab3 100755
--- a/indra/newview/skins/default/xui/da/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/da/menu_viewer.xml
@@ -128,6 +128,7 @@
 		<menu_item_check label="Aktiver tips" name="Enable Hints"/>
 		<menu_item_call label="Rapporter misbrug" name="Report Abuse"/>
 		<menu_item_call label="Rapportér fejl" name="Report Bug"/>
+		<menu_item_call label="Stød, skub &amp; slag" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="Om [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Avanceret" name="Advanced">
@@ -261,8 +262,7 @@
 		<menu label="Netværk" name="Network">
 			<menu_item_check label="Pause avatar" name="AgentPause"/>
 			<menu_item_call label="Mist en netværkspakke" name="Drop a Packet"/>
-		</menu>
-		<menu_item_call label="Stød, skub &amp; slag" name="Bumps, Pushes &amp;amp; Hits"/>
+		</menu>		
 		<menu label="Verden" name="DevelopWorld">
 			<menu_item_check label="Vælg anden sol end region" name="Sim Sun Override"/>
 			<menu_item_check label="Fast vejr" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index ecd0fe786c233004b9b2a9268ca416c3a58cb5cd..a328ca39f8e6c0a0726c2c4228fc38966faf6dc7 100755
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -177,6 +177,7 @@
 		<menu_item_call label="[SECOND_LIFE]-Blogs" name="Second Life Blogs"/>
 		<menu_item_call label="Missbrauch melden" name="Report Abuse"/>
 		<menu_item_call label="Fehler melden" name="Report Bug"/>
+		<menu_item_call label="Rempler, Stöße &amp; Schläge" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="INFO ÃœBER [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Erweitert" name="Advanced">
@@ -353,8 +354,7 @@
 			<menu_item_check label="Positionen der interpolierten Objekte anfragen" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="Ein Paket fallenlassen" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/>
-		<menu_item_call label="Rempler, Stöße &amp; Schläge" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/>		
 		<menu label="Rekorder" name="Recorder">
 			<menu_item_call label="Wiedergabe starten" name="Start Playback"/>
 			<menu_item_call label="Wiedergabe stoppen" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
new file mode 100755
index 0000000000000000000000000000000000000000..8ec6735a015ee246b15a8ddda1fecec14f7bcc32
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ positioning="cascading"
+ ignore_ui_scale="false"
+ legacy_header_height="225"
+ can_minimize="true"
+ can_close="true"
+ can_resize="true"
+ min_height="65"
+ min_width="515"
+ height="65"
+ layout="topleft"
+ name="HoverHeight"
+ single_instance="true"
+ help_topic="hover_height"
+ save_rect="true"
+ save_visibility="true"
+ title="SET HOVER HEIGHT"
+ width="515">
+      <slider
+     enabled="false"
+     control_name="HoverHeightSlider"
+     decimal_digits="3"
+     follows="top|left"
+     height="15"
+     increment="0.001"
+     initial_value="0.0"
+     label="Height"
+     label_width="60"
+     left="10"
+     width="501"
+     layout="topleft"
+     name="HoverHeightSlider"
+     top="35"
+     can_edit_text="true"
+     >
+    </slider>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index adef066aef4350679bb58bdfea25067af897c774..6667238232e511d180e3200daf2a16482f496f66 100755
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -304,16 +304,20 @@
      left_pad="5"
      layout="topleft"
      follows="left|top"
-     name="combobox sale copy"
+     name="ComboBoxSaleType"
      width="110">
-        <combo_box.item
-         label="Copy"
+       <combo_box.item
          name="Copy"
-         value="Copy" />
-        <combo_box.item
-         label="Original"
+         label="Copy"
+         value="2" />
+       <combo_box.item
+         name="Contents"
+         label="Contents"
+         value="3" />
+       <combo_box.item
          name="Original"
-         value="Original" />
+         label="Original"
+         value="1" />
     </combo_box>
     <spinner
         follows="left|top"
@@ -427,34 +431,6 @@
         Mark Item:
     </text-->
 
-
-    <!--radio_group
-     draw_border="false"
-     follows="left|top|right"
-     height="16"
-     layout="topleft"
-     left_delta="78"
-     name="RadioSaleType"
-     top_delta="0"
-     width="252">
-        <radio_item
-         height="16"
-         label="Original"
-         layout="topleft"
-         left="0"
-         name="radio"
-         top="0"
-         width="70" />
-        <radio_item
-         height="16"
-         label="Copy"
-         layout="topleft"
-         left_delta="60"
-         name="radio2"
-         top_delta="0"
-         width="70" />
-    </radio_group-->
-
     <!--text
      type="string"
      length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 8baa0a56f75042342bcd167179ce960da924458e..c4ac93633493b53bb9d1d8677ef6bf8bec0c994d 100755
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -2,10 +2,12 @@
 <floater
  legacy_header_height="18"
  height="460"
+ min_height="460"
  layout="topleft"
  name="gesture_preview"
  help_topic="gesture_preview"
- width="280">
+ width="280"
+ min_width="280">
     <floater.string
      name="step_anim">
         Animation to play:
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 2aa582beea93f5e8dac21b2d06a6c492c18449f2..90f9591f292f917192967b92f669830ea98f7aa1 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -41,6 +41,7 @@
                   show_bar="true"/>
         <stat_bar name="packet_loss"
                   label="Packet Loss"
+                  decimal_digits="1"
                   stat="packetslostpercentstat"/>
         <stat_bar name="ping"
                   label="Ping Sim"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index bcbc8d5b86c7df1ba7d93c0e69ee85e92b55769e..c6ae844d676dc6385f8181134975fd69f924cce0 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -91,6 +91,14 @@ name="Edit Outfit">
     <menu_item_call.on_enable
      function="Edit.EnableEditShape" />
   </menu_item_call>
+  <menu_item_call label="Hover Height"
+     layout="topleft"
+     name="Hover Height">
+     <menu_item_call.on_click
+      function="HoverHeight" />
+     <menu_item_call.on_enable
+      function="Edit.EnableHoverHeight" />
+  </menu_item_call>
   <menu_item_call
     label="My Friends"
     layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 8bd013f14b2d132da86ee484f76dc502ea94b129..cfbbe41f95473e7d709c5dad7f57e0c869d1ef2e 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -96,14 +96,11 @@
            function="Tools.LookAtSelection"
            parameter="zoom" />
     </menu_item_call>
-   <menu_item_call
-     enabled="false"
+   <menu_item_call    
      label="Pay"
      name="Pay...">
         <menu_item_call.on_click
-         function="PayObject" />
-        <menu_item_call.on_enable
-         function="EnablePayAvatar" />
+         function="PayObject" />       
     </menu_item_call>
 
    <menu_item_separator />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index ca0c9bd5e4947d8235235fc6b7c65364df09edae..d3b0b07f700f461fc7c55619de2443b61a9bcfb9 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -229,6 +229,14 @@
        <menu_item_call.on_enable
         function="Edit.EnableEditShape" />
    </menu_item_call>
+   <menu_item_call label="Hover Height"
+     layout="topleft"
+     name="Hover Height">
+     <menu_item_call.on_click
+      function="HoverHeight" />
+     <menu_item_call.on_enable
+      function="Edit.EnableHoverHeight" />
+   </menu_item_call>
    <menu_item_call
      label="My Friends"
      layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 5c98a98d3d425b613623dc33bc7364a6ae88790c..dc9622a27db73378b00e26e7c27adc72230b9648 100755
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -78,7 +78,7 @@
     <menu_item_call.on_enable
         function="EnableSelectInPathfindingLinksets"/>
     <menu_item_call.on_visible
-        function="EnableSelectInPathfindingLinksets"/>
+        function="VisibleSelectInPathfindingLinksets"/>
   </menu_item_call>
   <menu_item_call
       label="Show in characters"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 3238671eb5c720d77510c61c600a7b7af1e33593..9771789efdcfce8bf2e1ccdb30803fe5b30a58b9 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1424,7 +1424,14 @@
             </menu_item_call>
 
         <menu_item_separator/>
-
+		<menu_item_call
+             label="Bumps, Pushes &amp; Hits"
+             name="Bumps, Pushes &amp;amp; Hits">
+                <menu_item_call.on_click
+                 function="Floater.Show"
+                 parameter="bumps" />
+        </menu_item_call>
+        <menu_item_separator/>    
         <menu_item_call
          label="About [APP_NAME]"
          name="About Second Life">
@@ -3038,15 +3045,7 @@
          name="Dump Scripted Camera">
             <menu_item_call.on_click
              function="Advanced.DumpScriptedCamera" />
-        </menu_item_call>
-        <menu_item_call
-             label="Bumps, Pushes &amp; Hits"
-             name="Bumps, Pushes &amp;amp; Hits">
-                <menu_item_call.on_click
-                 function="Floater.Show"
-                 parameter="bumps" />
-            </menu_item_call>
-
+        </menu_item_call>      
         <menu
          create_jump_keys="true"
          label="Recorder"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cd10765b2f34978897e2cc85fae9f3b9673f4d50..8a65d074bce19602331781a78773677173e955aa 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1195,6 +1195,18 @@ Save Changes?
      yestext="Save"/>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="DeleteNotecard"
+   type="alertmodal">
+Delete Notecard?
+    <tag>confirm</tag>
+    <usetemplate
+     name="okcancelbuttons"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="GestureSaveFailedTooManySteps"
diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml
index 84753c55a338c8d1db0022260a4bed81cc13d248..d1416ece82aa385ff03ae029e9101148d7cf8b38 100644
--- a/indra/newview/skins/default/xui/en/panel_login_first.xml
+++ b/indra/newview/skins/default/xui/en/panel_login_first.xml
@@ -102,7 +102,7 @@
             allow_text_entry="true"
             follows="left|bottom"
             height="32"
-            left="0"
+            left="2"
             label="Username"
             combo_editor.font="SansSerifLarge"
             max_chars="128"
@@ -163,7 +163,7 @@
             text_color="EmphasisColor"
             height="16"
             name="forgot_password_text"
-            left="216"
+            left="219"
             top="34"
             width="200">
             Forgotten password
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
index 26cac06648f4f9f3fa92bfc3176dc23999dea665..5c728718ef19d5ce75be85d89bb45290565b37d4 100755
--- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
@@ -60,7 +60,7 @@
      text_color="White"
      top="4"
      value="..."
-     width="45" />
+     width="49" />
     <button
      follows="right"
      height="20"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index fc3fdbcfa54b3ab4304afe733d4967ddaf3f9f22..fd14b13ed6fe6dea56649d5e9fd2321b3d4fe352 100755
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -424,16 +424,20 @@
         left_pad="0"
         layout="topleft"
         follows="left|top"
-        name="combobox sale copy"
+        name="ComboBoxSaleType"
         width="170">
         <combo_box.item
-          label="Copy"
-          name="Copy"
-          value="Copy" />
+             name="Copy"
+             label="Copy"
+             value="2" />
+        <combo_box.item
+             name="Contents"
+             label="Contents"
+             value="3" />
         <combo_box.item
-          label="Original"
-          name="Original"
-          value="Original" />
+             name="Original"
+             label="Original"
+             value="1" />
       </combo_box>
       <spinner
         follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index 6ee8fc3a4c57ddd69de2c3c8ee49922ea890cb2f..b84dce222f4e22fbb12caec4beda99b34d07b0fa 100755
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -48,7 +48,7 @@
             </panel.string>
             <panel.string
              name="Cost Total">
-                Total Price: L$
+                Sum Price: L$
             </panel.string>
             <panel.string
              name="Cost Per Unit">
@@ -444,7 +444,7 @@
         control_name="Edit Cost"
         name="Edit Cost"
         label="Price: L$"
-        label_width="65"
+        label_width="73"				
         width="150"
         min_val="1"
         height="20"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index adaf87dab60a85cd5bf688ea268f17d784cb0843..ca38a9bc3fd6b5b9baf472bfce2470069af5457c 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2512,6 +2512,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
 	<string name="CompileSuccessful">Compile successful!</string>
 	<string name="CompileSuccessfulSaving">Compile successful, saving...</string>
 	<string name="SaveComplete">Save complete.</string>
+	<string name="UploadFailed">File upload failed: </string>
 	<string name="ObjectOutOfRange">Script (object out of range)</string>
 
 	<!-- god tools -->
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index 9b255f5c0dc1fafe847ed85406c7b4d027cc8e29..797cf303879d53285e00a38c48cbc9478c1e92b7 100755
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -176,6 +176,7 @@
 		<menu_item_call label="Blogs de [SECOND_LIFE]" name="Second Life Blogs"/>
 		<menu_item_call label="Denunciar una infracción" name="Report Abuse"/>
 		<menu_item_call label="Informar de un fallo" name="Report Bug"/>
+		<menu_item_call label="Bumps, Pushes &amp; Hits" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Avanzado" name="Advanced">
@@ -323,8 +324,7 @@
 		<menu label="Red" name="Network">
 			<menu_item_check label="Pause Avatar" name="AgentPause"/>
 			<menu_item_call label="Drop a Packet" name="Drop a Packet"/>
-		</menu>
-		<menu_item_call label="Bumps, Pushes &amp; Hits" name="Bumps, Pushes &amp;amp; Hits"/>
+		</menu>		
 		<menu label="Mundo virtual" name="DevelopWorld">
 			<menu_item_check label="Anular el sol del Sim" name="Sim Sun Override"/>
 			<menu_item_check label="Meteorología fija" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/es/panel_region_debug.xml b/indra/newview/skins/default/xui/es/panel_region_debug.xml
index f6676967f56abac817dbec699712f2be4d5fb131..2a98fb808dc0f1eb3a8b043d1e2c872874887304 100755
--- a/indra/newview/skins/default/xui/es/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="En el terreno de otros" name="return_other_land" tool_tip="Devolver sólo los objetos que están en terreno de otro"/>
 	<check_box label="En cada región de este estado" name="return_estate_wide" tool_tip="Devolver los objetos de todas las regiones que forman este estado"/>
 	<button label="Devolver" name="return_btn"/>
-	<button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="280"/>
-	<button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/>
-	<button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="280"/>
-	<button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región"/>
-	<button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región"/>
+	<button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="240"/>
+	<button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región" left_pad="90" width="160"/>
+	<button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="240"/>
+	<button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región" left_pad="90" width="160"/>
+	<button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región" width="240"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index a2b9bab7e9cda7e09e0a7cf15f4dad87eac76e92..9a4d721bc37add783c837d6b27c855d6216e2f8b 100755
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -177,6 +177,7 @@
 		<menu_item_call label="Blogs [SECOND_LIFE]" name="Second Life Blogs"/>
 		<menu_item_call label="Signaler une infraction" name="Report Abuse"/>
 		<menu_item_call label="Signaler un bug" name="Report Bug"/>
+		<menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Avancé" name="Advanced">
@@ -353,8 +354,7 @@
 			<menu_item_check label="Interpolation ping des positions des objets" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="Abandonner un paquet" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/>
-		<menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/>		
 		<menu label="Enregistreur" name="Recorder">
 			<menu_item_call label="Commencer la lecture" name="Start Playback"/>
 			<menu_item_call label="Arrêter la lecture" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
index d21695e9aad2e22ffefdd2074cc18455fd859413..461ada3108b64a0da0ed4a2aa40b49f6246c97f2 100755
--- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="Sur le terrain d&apos;un autre résident" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu&apos;un d&apos;autre"/>
 	<check_box label="Dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/>
 	<button label="Renvoyer" name="return_btn"/>
-	<button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
-	<button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/>
-	<button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="320"/>
-	<button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." width="160"/>
-	<button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région"/>
+	<button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="240"/>
+	<button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" left_pad="90" width="160"/>
+	<button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="240"/>
+	<button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." left_pad="90" width="160"/>
+	<button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région" width="240"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml
index 427d039c7c09ccc14c0211e0088c3e2310984bfb..275315b455c40bbdadc57efcfbfe58f7b464dcb6 100755
--- a/indra/newview/skins/default/xui/it/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/it/menu_viewer.xml
@@ -177,6 +177,7 @@
 		<menu_item_call label="[SECOND_LIFE] Blog" name="Second Life Blogs"/>
 		<menu_item_call label="Segnala abuso" name="Report Abuse"/>
 		<menu_item_call label="Segnala bug" name="Report Bug"/>
+		<menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Avanzate" name="Advanced">
@@ -324,8 +325,7 @@
 		<menu label="Rete" name="Network">
 			<menu_item_check label="Metti in pausa" name="AgentPause"/>
 			<menu_item_call label="Lascia un pacchetto" name="Drop a Packet"/>
-		</menu>
-		<menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp;amp; Hits"/>
+		</menu>		
 		<menu label="Mondo" name="DevelopWorld">
 			<menu_item_check label="Esclusione al sole della simulazione" name="Sim Sun Override"/>
 			<menu_item_check label="Clima fisso" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/it/panel_region_debug.xml b/indra/newview/skins/default/xui/it/panel_region_debug.xml
index 88c056bf5e8539544541c4c5ff7b91cdf69640d3..ca39cf6d055071fd4ab1d200e084a293fa482248 100755
--- a/indra/newview/skins/default/xui/it/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/it/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="Sul terreno di un altro residente" name="return_other_land" tool_tip="Restituisci solo gli oggetti che sono in terreni appartenenti a qualcun altro"/>
 	<check_box label="In tutte le regioni di questa proprietà" name="return_estate_wide" tool_tip="Restituisci tutti gli oggetti nelle varie regioni che costituiscono l&apos;insieme dei possedimenti terrieri"/>
 	<button label="Restituisci" name="return_btn"/>
-	<button label="Visualizza l&apos;elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="280"/>
-	<button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione"/>
-	<button label="Visualizza l&apos;elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="280"/>
-	<button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione"/>
-	<button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione"/>
+	<button label="Visualizza l&apos;elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="270"/>
+	<button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione" left_pad="90" width="140"/>
+	<button label="Visualizza l&apos;elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="270"/>
+	<button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione" left_pad="90" width="140"/>
+	<button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione" width="270"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml
index ddab8752622700081f1a35ebc195415358280061..40002b4f3346f16ebb92ee75312044545f2d90d2 100755
--- a/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -177,6 +177,7 @@
 		<menu_item_call label="[SECOND_LIFE] ブログ" name="Second Life Blogs"/>
 		<menu_item_call label="嫌がらせを報告する" name="Report Abuse"/>
 		<menu_item_call label="バグを報告する" name="Report Bug"/>
+		<menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="[APP_NAME] について" name="About Second Life"/>
 	</menu>
 	<menu label="アドバンス" name="Advanced">
@@ -353,8 +354,7 @@
 			<menu_item_check label="挿入されたオブジェクトの位置の Ping" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="パケットドロップ" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/>
-		<menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/>		
 		<menu label="レコーダー" name="Recorder">
 			<menu_item_call label="再生開始" name="Start Playback"/>
 			<menu_item_call label="再生停止" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml
index e1725fc30865db1f805db6ed7906fd707891c37a..a354cca9ad9128e4063de5e9d93c53ec10ac65ae 100755
--- a/indra/newview/skins/default/xui/pl/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml
@@ -126,6 +126,7 @@
 		<menu_item_check label="WÅ‚Ä…cz podpowiedzi" name="Enable Hints"/>
 		<menu_item_call label="Złóż Raport o Nadużyciu" name="Report Abuse"/>
 		<menu_item_call label="Zgłoś błędy klienta" name="Report Bug"/>
+		<menu_item_call label="Zderzenia, popchnięcia &amp;  uderzenia" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="O [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Zaawansowane" name="Advanced">
@@ -252,8 +253,7 @@
 		<menu label="Sieć" name="Network">
 			<menu_item_check label="Zatrzymaj awatara" name="AgentPause"/>
 			<menu_item_call label="Upuść pakiet pamięci" name="Drop a Packet"/>
-		</menu>
-		<menu_item_call label="Zderzenia, popchnięcia &amp;  uderzenia" name="Bumps, Pushes &amp;amp; Hits"/>
+		</menu>		
 		<menu label="Åšwiat" name="DevelopWorld">
 			<menu_item_check label="Domyślne ustawienia środowiska Regionu" name="Sim Sun Override"/>
 			<menu_item_check label="Ustalona pogoda" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml
index db906b1385f1e755c1eb5e00369b023e126c04cd..b5af342754fe4560164bf4f95f187a934908e25d 100755
--- a/indra/newview/skins/default/xui/pt/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml
@@ -177,6 +177,7 @@
 		<menu_item_call label="Blogs do [SECOND_LIFE]" name="Second Life Blogs"/>
 		<menu_item_call label="Denunciar abuso" name="Report Abuse"/>
 		<menu_item_call label="Relatar bug" name="Report Bug"/>
+		<menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Avançado" name="Advanced">
@@ -324,8 +325,7 @@
 		<menu label="Rede" name="Network">
 			<menu_item_check label="Pausar avatar" name="AgentPause"/>
 			<menu_item_call label="Drop a Packet" name="Drop a Packet"/>
-		</menu>
-		<menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp;amp; Hits"/>
+		</menu>		
 		<menu label="Mundo" name="DevelopWorld">
 			<menu_item_check label="Impor sobre sol de simulação" name="Sim Sun Override"/>
 			<menu_item_check label="Clima fixo" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
index 9070563fd0562402e85858b62ed16a664f9c14e3..2647c7a1e2998e7bddaefe898034b0ffe755f0d2 100755
--- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Devolver apenas objetos que estejam em terrenos de outra pessoa"/>
 	<check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Devolver objetos em todas as regiões que constituem esta propriedade"/>
 	<button label="Devolver" name="return_btn"/>
-	<button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="280"/>
-	<button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região"/>
-	<button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="280"/>
-	<button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região"/>
-	<button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região"/>
+	<button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="240"/>
+	<button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região" left_pad="90" width="160"/>
+	<button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="240"/>
+	<button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região" left_pad="90" width="160"/>
+	<button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região" width="240"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml
index 8a8c722ac4a980edeb3808d053b2d8fb41e32c68..69bb4c4af9e1146a16bb75978ccdf041713c1d96 100755
--- a/indra/newview/skins/default/xui/ru/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml
@@ -174,6 +174,7 @@
 		<menu_item_call label="Блоги [SECOND_LIFE]" name="Second Life Blogs"/>
 		<menu_item_call label="Жалоба" name="Report Abuse"/>
 		<menu_item_call label="Сообщить об ошибке" name="Report Bug"/>
+		<menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="О [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="Дополнительно" name="Advanced">
@@ -350,8 +351,7 @@
 			<menu_item_check label="Прикрепить объекты для интерполяции" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="Опустить пакет" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/>
-		<menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/>		
 		<menu label="Диктофон" name="Recorder">
 			<menu_item_call label="Начать воспроизведение" name="Start Playback"/>
 			<menu_item_call label="Остановить воспроизведение" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/ru/panel_region_debug.xml b/indra/newview/skins/default/xui/ru/panel_region_debug.xml
index d294a9e22ef79853e22010488df8d8d42ce36927..3eaa0b19e09f4446cc6b9f9ca2f4e15f7e8af78e 100755
--- a/indra/newview/skins/default/xui/ru/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/ru/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="На чужой земле" name="return_other_land" tool_tip="Возвращаются только объекты, расположенные на чужой земле"/>
 	<check_box label="С каждого региона этого землевладения" name="return_estate_wide" tool_tip="Возвращаются объекты со всех регионов, образующих это землевладение"/>
 	<button label="Возврат" name="return_btn"/>
-	<button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны"/>
-	<button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион"/>
-	<button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего"/>
-	<button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона"/>
-	<button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона"/>
+	<button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны" width="255"/>
+	<button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион" left_pad="85"/>
+	<button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего" width="255"/>
+	<button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона" left_pad="85"/>
+	<button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона" width="255"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml
index 9797ccc0b07e549429e883cfc5011a9d99d5879f..25414b35fbc6e05d2ee363ca22050198de139630 100755
--- a/indra/newview/skins/default/xui/tr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml
@@ -175,6 +175,7 @@
 		<menu_item_call label="[SECOND_LIFE] Blogları" name="Second Life Blogs"/>
 		<menu_item_call label="Kötüye Kullanımı Bildir" name="Report Abuse"/>
 		<menu_item_call label="Hata Bildir" name="Report Bug"/>
+		<menu_item_call label="Toslamalar, Ä°tmeler ve Vurmalar" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="[APP_NAME] Hakkında" name="About Second Life"/>
 	</menu>
 	<menu label="GeliÅŸmiÅŸ" name="Advanced">
@@ -351,8 +352,7 @@
 			<menu_item_check label="Nesne Konumlarını Ping İle İnterpole Edin" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="Paket Bırakın" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/>
-		<menu_item_call label="Toslamalar, Ä°tmeler ve Vurmalar" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/>		
 		<menu label="Kaydedici" name="Recorder">
 			<menu_item_call label="Oynatmayı Başlat" name="Start Playback"/>
 			<menu_item_call label="Oynatmayı Durdur" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/tr/panel_region_debug.xml b/indra/newview/skins/default/xui/tr/panel_region_debug.xml
index 74a0a1569ef2aeb98ff2c4601257eba9ada1230b..ec654aae82340b313d48fe98e418d15bff63ac15 100755
--- a/indra/newview/skins/default/xui/tr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/tr/panel_region_debug.xml
@@ -27,9 +27,9 @@
 	<check_box label="Başkasına ait arazi üzerinde" name="return_other_land" tool_tip="Sadece başkasına ait arazi üzerinde olan nesneler iade edilsin"/>
 	<check_box label="Bu gayrimenkulu oluşturan bölgelerin tümünde" name="return_estate_wide" tool_tip="Bu gayrimenkulu oluşturan bölgelerin tümündeki nesneler iade edilsin"/>
 	<button label="Ä°ade Et" name="return_btn"/>
-	<button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi"/>
-	<button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat"/>
-	<button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/>
-	<button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et"/>
-	<button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu"/>
+	<button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi" width="180"/>
+	<button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat" width="160"/>
+	<button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi" width="180"/>
+	<button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et" width="160"/>
+	<button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu" width="180"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml
index 79b149a716a3299800cf2cceb0b5f2c6d27a4d2c..45d3feec26f3c2bfa5c81adbfc9dc2977491d0c7 100755
--- a/indra/newview/skins/default/xui/zh/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml
@@ -175,6 +175,7 @@
 		<menu_item_call label="[SECOND_LIFE] 部落格" name="Second Life Blogs"/>
 		<menu_item_call label="違規舉報" name="Report Abuse"/>
 		<menu_item_call label="回報臭蟲" name="Report Bug"/>
+		<menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp;amp; Hits"/>
 		<menu_item_call label="關於 [APP_NAME]" name="About Second Life"/>
 	</menu>
 	<menu label="進階" name="Advanced">
@@ -351,8 +352,7 @@
 			<menu_item_check label="探詢內插物件位置" name="Ping Interpolate Object Positions"/>
 			<menu_item_call label="丟出一個封包" name="Drop a Packet"/>
 		</menu>
-		<menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/>
-		<menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp;amp; Hits"/>
+		<menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/>		
 		<menu label="錄製器" name="Recorder">
 			<menu_item_call label="開始播放" name="Start Playback"/>
 			<menu_item_call label="停止播放" name="Stop Playback"/>
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index bba95f8e67f9a576d044de045db7a0fc008c51c8..fbbc385e5baf99f3769466e3d3b225866d46b990 100755
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -3594,6 +3594,10 @@ version 2.0
 		{	CofVersion			S32	}
 		{	Flags				U32	}
 	}
+	{
+		AppearanceHover		Variable
+		{	HoverHeight	LLVector3	}
+	}
 }
 
 // AvatarSitResponse - response to a request to sit on an object
diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1
index 7c62b4ffcda8d44c3cbdbc8c91ec2aae28a46316..2c6489906c6db692017be9c5aa9bcde99ad9770c 100755
--- a/scripts/messages/message_template.msg.sha1
+++ b/scripts/messages/message_template.msg.sha1
@@ -1 +1 @@
-675eb496386ba25cb6433a846e6478546ea9302f
\ No newline at end of file
+845459c1bb7fe8174fb493528fe2a214015f996d
\ No newline at end of file