diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index f951a982e5b5c5ec190e3f0651eb4ab74eb37249..a3a86168642666fbe973e8d6fb4e0c83fc9ce132 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -1123,7 +1123,10 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
 	// *TODO: Is this correct?
 	//gPipeline.disableLights();
 	stop_glerror();
-	glDisable(GL_LIGHTING);
+	if (!LLGLSLShader::sNoFixedFunction)
+	{
+		glDisable(GL_LIGHTING);
+	}
 	stop_glerror();
 
 	bool use_shaders = LLGLSLShader::sNoFixedFunction;
diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 8276ec836a77399ed164ff02d4ec65a3286aafb5..f9624852843c6a41cd6b35ede7cd4d03a69ff88b 100755
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -506,6 +506,8 @@ namespace
 
 		LLSD::array_iterator beginArray() { return mData.begin(); }
 		LLSD::array_iterator endArray() { return mData.end(); }
+		LLSD::reverse_array_iterator rbeginArray() { return mData.rbegin(); }
+		LLSD::reverse_array_iterator rendArray() { return mData.rend(); }
 		virtual LLSD::array_const_iterator beginArray() const { return mData.begin(); }
 		virtual LLSD::array_const_iterator endArray() const { return mData.end(); }
 
@@ -947,6 +949,9 @@ LLSD::array_iterator		LLSD::endArray()		{ return makeArray(impl).endArray(); }
 LLSD::array_const_iterator	LLSD::beginArray() const{ return safe(impl).beginArray(); }
 LLSD::array_const_iterator	LLSD::endArray() const	{ return safe(impl).endArray(); }
 
+LLSD::reverse_array_iterator	LLSD::rbeginArray()		{ return makeArray(impl).rbeginArray(); }
+LLSD::reverse_array_iterator	LLSD::rendArray()		{ return makeArray(impl).rendArray(); }
+
 namespace llsd
 {
 
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 5eb69059ac6e5f41e4f76504f6d081419652766f..a3792c1f9da3aaaa48b1023688cceca34af17f72 100755
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -320,11 +320,15 @@ class LL_COMMON_API LLSD
 		
 		typedef std::vector<LLSD>::iterator			array_iterator;
 		typedef std::vector<LLSD>::const_iterator	array_const_iterator;
-		
+		typedef std::vector<LLSD>::reverse_iterator reverse_array_iterator;
+
 		array_iterator			beginArray();
 		array_iterator			endArray();
 		array_const_iterator	beginArray() const;
 		array_const_iterator	endArray() const;
+
+		reverse_array_iterator	rbeginArray();
+		reverse_array_iterator	rendArray();
 	//@}
 	
 	/** @name Type Testing */
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 0730b2ed8b8cb30d26f7a3eb857eee6e932f3df2..bb17725c9cb9ced6a6dd1d95ee96b437b0541a63 100755
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -114,6 +114,9 @@ static const F32 MEM_INFO_THROTTLE = 20;
 static const F32 MEM_INFO_WINDOW = 10*60;
 
 #if LL_WINDOWS
+// We cannot trust GetVersionEx function on Win8.1 , we should check this value when creating OS string
+static const U32 WINNT_WINBLUE = 0x0603;
+
 #ifndef DLLVERSIONINFO
 typedef struct _DllVersionInfo
 {
@@ -214,6 +217,26 @@ static bool regex_search_no_exc(const S& string, M& match, const R& regex)
     }
 }
 
+#if LL_WINDOWS
+// GetVersionEx should not works correct with Windows 8.1 and the later version. We need to check this case 
+static bool	check_for_version(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
+{
+    OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
+    DWORDLONG        const dwlConditionMask = VerSetConditionMask(
+        VerSetConditionMask(
+        VerSetConditionMask(
+            0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+               VER_MINORVERSION, VER_GREATER_EQUAL),
+               VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
+
+    osvi.dwMajorVersion = wMajorVersion;
+    osvi.dwMinorVersion = wMinorVersion;
+    osvi.wServicePackMajor = wServicePackMajor;
+
+    return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
+}
+#endif
+
 
 LLOSInfo::LLOSInfo() :
 	mMajorVer(0), mMinorVer(0), mBuild(0), mOSVersionString("")	 
@@ -222,6 +245,7 @@ LLOSInfo::LLOSInfo() :
 #if LL_WINDOWS
 	OSVERSIONINFOEX osvi;
 	BOOL bOsVersionInfoEx;
+	BOOL bShouldUseShellVersion = false;
 
 	// Try calling GetVersionEx using the OSVERSIONINFOEX structure.
 	ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
@@ -284,10 +308,18 @@ LLOSInfo::LLOSInfo() :
 				}
 				else if(osvi.dwMinorVersion == 2)
 				{
-					if(osvi.wProductType == VER_NT_WORKSTATION)
-						mOSStringSimple = "Microsoft Windows 8 ";
+					if (check_for_version(HIBYTE(WINNT_WINBLUE), LOBYTE(WINNT_WINBLUE), 0))
+					{
+						mOSStringSimple = "Microsoft Windows 8.1 ";
+						bShouldUseShellVersion = true; // GetVersionEx failed, going to use shell version
+					}
 					else
-						mOSStringSimple = "Windows Server 2012 ";
+					{
+						if(osvi.wProductType == VER_NT_WORKSTATION)
+							mOSStringSimple = "Microsoft Windows 8 ";
+						else
+							mOSStringSimple = "Windows Server 2012 ";
+					}
 				}
 
 				///get native system info if available..
@@ -354,9 +386,8 @@ LLOSInfo::LLOSInfo() :
 			}
 			else
 			{
-				tmpstr = llformat("%s (Build %d)",
-								  csdversion.c_str(),
-								  (osvi.dwBuildNumber & 0xffff));
+				tmpstr = !bShouldUseShellVersion ?  llformat("%s (Build %d)", csdversion.c_str(), (osvi.dwBuildNumber & 0xffff)):
+					llformat("%s (Build %d)", csdversion.c_str(), shell32_build);
 			}
 
 			mOSString = mOSStringSimple + tmpstr;
@@ -392,7 +423,7 @@ LLOSInfo::LLOSInfo() :
 	std::string compatibility_mode;
 	if(got_shell32_version)
 	{
-		if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor)
+		if((osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor) && !bShouldUseShellVersion)
 		{
 			compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)", 
 											shell32_major,
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 37c603348e3342a1ed9191e72cffcf47d125cc04..5eb5fb442d0f958860de8691e7e54541c46c66bd 100755
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -414,117 +414,6 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
 }
 
 
-bool LLParcel::isAgentBlockedFromParcel(LLParcel* parcelp,
-                                        const LLUUID& agent_id,
-                                        const uuid_vec_t& group_ids,
-                                        const BOOL is_agent_identified,
-                                        const BOOL is_agent_transacted,
-                                        const BOOL is_agent_ageverified)
-{
-    S32 current_group_access = parcelp->blockAccess(agent_id, LLUUID::null, is_agent_identified, is_agent_transacted, is_agent_ageverified);
-    S32 count;
-    bool is_allowed = (current_group_access == BA_ALLOWED) ? true: false;
-    LLUUID group_id;
-    
-    count = group_ids.size();
-    for (int i = 0; i < count && !is_allowed; i++)
-    {
-        group_id = group_ids[i];
-        current_group_access = parcelp->blockAccess(agent_id, group_id, is_agent_identified, is_agent_transacted, is_agent_ageverified);
-        
-        if (current_group_access == BA_ALLOWED) is_allowed = true;
-    }
-    
-    return !is_allowed;
-}
-
-BOOL LLParcel::isAgentBanned(const LLUUID& agent_id) const
-{
-	// Test ban list
-	if (mBanList.find(agent_id) != mBanList.end())
-	{
-		return TRUE;
-	}
-    
-    return FALSE;
-}
-
-S32 LLParcel::blockAccess(const LLUUID& agent_id, const LLUUID& group_id,
-                          const BOOL is_agent_identified,
-                          const BOOL is_agent_transacted,
-                          const BOOL is_agent_ageverified) const
-{
-    // Test ban list
-    if (isAgentBanned(agent_id))
-    {
-        return BA_BANNED;
-    }
-    
-    // Always allow owner on (unless he banned himself, useful for
-    // testing). We will also allow estate owners/managers in if they 
-    // are not explicitly banned.
-    if (agent_id == mOwnerID)
-    {
-        return BA_ALLOWED;
-    }
-    
-    // Special case when using pass list where group access is being restricted but not 
-    // using access list.	 In this case group members are allowed only if they buy a pass.
-    // We return BA_NOT_IN_LIST if not in list
-    BOOL passWithGroup = getParcelFlag(PF_USE_PASS_LIST) && !getParcelFlag(PF_USE_ACCESS_LIST) 
-    && getParcelFlag(PF_USE_ACCESS_GROUP) && !mGroupID.isNull() && group_id == mGroupID;
-    
-    
-    // Test group list
-    if (getParcelFlag(PF_USE_ACCESS_GROUP)
-        && !mGroupID.isNull()
-        && group_id == mGroupID
-        && !passWithGroup)
-    {
-        return BA_ALLOWED;
-    }
-    
-    // Test access list
-    if (getParcelFlag(PF_USE_ACCESS_LIST) || passWithGroup )
-    {
-        if (mAccessList.find(agent_id) != mAccessList.end())
-        {
-            return BA_ALLOWED;
-        }
-        
-        return BA_NOT_ON_LIST; 
-    }
-    
-    // If we're not doing any other limitations, all users
-    // can enter, unless
-    if (		 !getParcelFlag(PF_USE_ACCESS_GROUP)
-                 && !getParcelFlag(PF_USE_ACCESS_LIST))
-    { 
-        //If the land is group owned, and you are in the group, bypass these checks
-        if(getIsGroupOwned() && group_id == mGroupID)
-        {
-            return BA_ALLOWED;
-        }
-        
-        // Test for "payment" access levels
-        // Anonymous - No Payment Info on File
-        if(getParcelFlag(PF_DENY_ANONYMOUS) && !is_agent_identified && !is_agent_transacted)
-        {
-            return BA_NO_ACCESS_LEVEL;
-        }
-        // AgeUnverified - Not Age Verified
-        if(getParcelFlag(PF_DENY_AGEUNVERIFIED) && !is_agent_ageverified)
-        {
-			return BA_NOT_AGE_VERIFIED;
-        }
-    
-        return BA_ALLOWED;
-    }
-    
-    return BA_NOT_IN_GROUP;
-    
-}
-
 
 void LLParcel::setArea(S32 area, S32 sim_object_limit)
 {
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 0279e8bef970371595250a794c2bfc79bee03ded..c4363a48df5151bc3b73e9b9bfdec97a9f9b25c1 100755
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -527,23 +527,6 @@ class LLParcel
 	// Can this agent change the shape of the land?
 	BOOL	allowTerraformBy(const LLUUID &agent_id) const;
 
-	// Returns 0 if access is OK, otherwise a BA_ return code above.
-	S32	 blockAccess(const LLUUID& agent_id, 
-			const LLUUID& group_id, 
-			const BOOL is_agent_identified, 
-			const BOOL is_agent_transacted,
-			const BOOL is_agent_ageverified) const;
-
-	// Only checks if the agent is explicitly banned from this parcel
-	BOOL isAgentBanned(const LLUUID& agent_id) const;
-
-	static bool isAgentBlockedFromParcel(LLParcel* parcelp, 
-									const LLUUID& agent_id,
-									const uuid_vec_t& group_ids,
-									const BOOL is_agent_identified,
-									const BOOL is_agent_transacted,
-									const BOOL is_agent_ageverified);
-
 	bool	operator==(const LLParcel &rhs) const;
 
 	// Calculate rent - area * rent * discount rate
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 2b865b4a8eff6a77c77edee8384c7229810c570d..f74c934b21fdaf0a0dd03d816fb6e0d0301eb03f 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -166,7 +166,8 @@ void calc_tangent_from_triangle(
 
 	F32 rd = s1*t2-s2*t1;
 
-	float r = ((rd*rd) > FLT_EPSILON) ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero
+	float r = ((rd*rd) > FLT_EPSILON) ? (1.0f / rd)
+											    : ((rd > 0.0f) ? 1024.f : -1024.f); //some made up large ratio for division by zero
 
 	llassert(llfinite(r));
 	llassert(!llisnan(r));
@@ -6789,7 +6790,8 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
         
 		F32 rd = s1*t2-s2*t1;
 
-		float r = ((rd*rd) > FLT_EPSILON) ? 1.0F / rd : 1024.f; //some made up large ratio for division by zero
+		float r = ((rd*rd) > FLT_EPSILON) ? (1.0f / rd)
+													 : ((rd > 0.0f) ? 1024.f : -1024.f); //some made up large ratio for division by zero
 
 		llassert(llfinite(r));
 		llassert(!llisnan(r));
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index 362452d837fac8e6815c14fe4e93752ca8f9e62d..45a3b18179a8aff6b2646aaf02e5aea96bf05add 100755
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -81,7 +81,7 @@ void LLCubeMap::initGL()
 		{
 			U32 texname = 0;
 			
-			LLImageGL::generateTextures(LLTexUnit::TT_CUBE_MAP, GL_RGB8, 1, &texname);
+			LLImageGL::generateTextures(1, &texname);
 
 			for (int i = 0; i < 6; i++)
 			{
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 6a37d314158d0385607c265d1b9fa8999d8ed64b..ab875141c57dc2469744344242ab797daecc2405 100755
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -54,8 +54,6 @@ S32 LLImageGL::sGlobalTextureMemoryInBytes		= 0;
 S32 LLImageGL::sBoundTextureMemoryInBytes		= 0;
 S32 LLImageGL::sCurBoundTextureMemory	= 0;
 S32 LLImageGL::sCount					= 0;
-LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE];
-U32 LLImageGL::sCurTexName = 1;
 
 BOOL LLImageGL::sGlobalUseAnisotropic	= FALSE;
 F32 LLImageGL::sLastFrameTime			= 0.f;
@@ -716,7 +714,12 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
 					mMipLevels = wpo2(llmax(w, h));
 
 					//use legacy mipmap generation mode (note: making this condional can cause rendering issues)
-					glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE);
+					// -- but making it not conditional triggers deprecation warnings when core profile is enabled
+					//		(some rendering issues while core profile is enabled are acceptable at this point in time)
+					if (!LLRender::sGLCoreProfile)
+					{
+						glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE);
+					}
 
 					LLImageGL::setManualImage(mTarget, 0, mFormatInternal,
 								 w, h, 
@@ -1084,95 +1087,19 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_
 
 // static
 static LLFastTimer::DeclareTimer FTM_GENERATE_TEXTURES("generate textures");
-void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures)
+void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
 {
 	LLFastTimer t(FTM_GENERATE_TEXTURES);
-	bool empty = true;
-
-	if (LLRender::sGLCoreProfile)
-	{
-		switch (format)
-		{
-			case GL_LUMINANCE8: format = GL_RGB8; break;
-			case GL_LUMINANCE8_ALPHA8:
-			case GL_ALPHA8: format = GL_RGBA8; break;
-		}
-	}
-
-	dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format);
-	
-	if (iter != sDeadTextureList[type].end())
-	{
-		empty = iter->second.empty();
-	}
-	
-	for (S32 i = 0; i < numTextures; ++i)
-	{
-		if (!empty)
-		{
-			textures[i] = iter->second.front();
-			iter->second.pop_front();
-			empty = iter->second.empty();
-		}
-		else
-		{
-			textures[i] = sCurTexName++;
-		}
-	}
+	glGenTextures(numTextures, textures);
 }
 
 // static
-void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate)
+void LLImageGL::deleteTextures(S32 numTextures, U32 *textures)
 {
 	if (gGLManager.mInited)
 	{
-		switch (format)
-		{
-			case 0:
-
-			// We get ARB errors in debug when attempting to use glTexImage2D with these deprecated pix formats
-			//
-			case GL_LUMINANCE8:
-			case GL_INTENSITY8:
-			case GL_ALPHA8:
-				glDeleteTextures(numTextures, textures);
-			break;
-
-			default:
-			{
-				if (type == LLTexUnit::TT_CUBE_MAP || mip_levels == -1)
-		{ //unknown internal format or unknown number of mip levels, not safe to reuse
-			glDeleteTextures(numTextures, textures);
-		}
-		else
-		{
-			for (S32 i = 0; i < numTextures; ++i)
-			{ //remove texture from VRAM by setting its size to zero
-
-				for (S32 j = 0; j <= mip_levels; j++)
-				{
-					gGL.getTexUnit(0)->bindManual(type, textures[i]);
-							U32 internal_type = LLTexUnit::getInternalType(type);
-							glTexImage2D(internal_type, j, format, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-							stop_glerror();
-				}
-
-				llassert(std::find(sDeadTextureList[type][format].begin(),
-								   sDeadTextureList[type][format].end(), textures[i]) == 
-								   sDeadTextureList[type][format].end());
-
-				sDeadTextureList[type][format].push_back(textures[i]);
-			}	
-		}
+		glDeleteTextures(numTextures, textures);
 	}
-			break;
-		}
-	}
-	
-	/*if (immediate)
-	{
-		LLImageGL::deleteDeadTextures();
-	}*/
 }
 
 // static
@@ -1300,11 +1227,11 @@ BOOL LLImageGL::createGLTexture()
 
 	if(mTexName)
 	{
-		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, (reinterpret_cast<GLuint*>(&mTexName))) ;
+		LLImageGL::deleteTextures(1, (reinterpret_cast<GLuint*>(&mTexName))) ;
 	}
 	
 
-	LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName);
+	LLImageGL::generateTextures(1, &mTexName);
 	stop_glerror();
 	if (!mTexName)
 	{
@@ -1419,7 +1346,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
 	}
 	else
 	{
-		LLImageGL::generateTextures(mBindTarget, mFormatInternal, 1, &mTexName);
+		LLImageGL::generateTextures(1, &mTexName);
 		stop_glerror();
 		{
 			llverify(gGL.getTexUnit(0)->bind(this));
@@ -1464,7 +1391,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
 	{
 		sGlobalTextureMemoryInBytes -= mTextureMemory;
 
-		LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, &old_name);
+		LLImageGL::deleteTextures(1, &old_name);
 
 		stop_glerror();
 	}
@@ -1593,30 +1520,6 @@ void LLImageGL::deleteDeadTextures()
 {
 	bool reset = false;
 
-	/*while (!sDeadTextureList.empty())
-	{
-		GLuint tex = sDeadTextureList.front();
-		sDeadTextureList.pop_front();
-		for (int i = 0; i < gGLManager.mNumTextureImageUnits; i++)
-		{
-			LLTexUnit* tex_unit = gGL.getTexUnit(i);
-
-			if (tex_unit && tex_unit->getCurrTexture() == tex)
-			{
-				tex_unit->unbind(tex_unit->getCurrType());
-				stop_glerror();
-
-				if (i > 0)
-				{
-					reset = true;
-				}
-			}
-		}
-		
-		glDeleteTextures(1, &tex);
-		stop_glerror();
-	}*/
-
 	if (reset)
 	{
 		gGL.getTexUnit(0)->activate();
@@ -1633,7 +1536,7 @@ void LLImageGL::destroyGLTexture()
 			mTextureMemory = 0;
 		}
 		
-		LLImageGL::deleteTextures(mBindTarget,  mFormatInternal, mMipLevels, 1, &mTexName);			
+		LLImageGL::deleteTextures(1, &mTexName);			
 		mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.
 		mTexName = 0;		
 		mGLTextureCreated = FALSE ;
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 57a052b25888ae370519dd4cf638cb8e6697f273..0c62dd0d3326f677a91343fda0f5d187ca6a9081 100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -45,16 +45,9 @@ class LLImageGL : public LLRefCount
 {
 	friend class LLTexUnit;
 public:
-	static U32 sCurTexName;
-
-	//previously used but now available texture names
-	// sDeadTextureList[<usage>][<internal format>]
-	typedef std::map<U32, std::list<U32> > dead_texturelist_t;
-	static dead_texturelist_t sDeadTextureList[LLTexUnit::TT_NONE];
-
 	// These 2 functions replace glGenTextures() and glDeleteTextures()
-	static void generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures);
-	static void deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip_levels, S32 numTextures, U32 *textures, bool immediate = false);
+	static void generateTextures(S32 numTextures, U32 *textures);
+	static void deleteTextures(S32 numTextures, U32 *textures);
 	static void deleteDeadTextures();
 
 	// Size calculation
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 353e61105a5d05dc6993ac2f58f22591e4711f68..b82b370d6ee431d27216ba224bd1c0a25f64ab05 100755
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -194,7 +194,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
 	}
 
 	U32 tex;
-	LLImageGL::generateTextures(mUsage, color_fmt, 1, &tex);
+	LLImageGL::generateTextures(1, &tex);
 	gGL.getTexUnit(0)->bindManual(mUsage, tex);
 
 	stop_glerror();
@@ -280,7 +280,7 @@ bool LLRenderTarget::allocateDepth()
 	}
 	else
 	{
-		LLImageGL::generateTextures(mUsage, GL_DEPTH_COMPONENT24, 1, &mDepth);
+		LLImageGL::generateTextures(1, &mDepth);
 		gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
 		
 		U32 internal_type = LLTexUnit::getInternalType(mUsage);
@@ -357,7 +357,7 @@ void LLRenderTarget::release()
 		}
 		else
 		{
-			LLImageGL::deleteTextures(mUsage, 0, 0, 1, &mDepth, true);
+			LLImageGL::deleteTextures(1, &mDepth);
 			stop_glerror();
 		}
 		mDepth = 0;
@@ -389,7 +389,7 @@ void LLRenderTarget::release()
 	if (mTex.size() > 0)
 	{
 		sBytesAllocated -= mResX*mResY*4*mTex.size();
-		LLImageGL::deleteTextures(mUsage, mInternalFormat[0], 0, mTex.size(), &mTex[0], true);
+		LLImageGL::deleteTextures(mTex.size(), &mTex[0]);
 		mTex.clear();
 		mInternalFormat.clear();
 	}
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index f168b3af141ad15fdde920132628d626e33a7cbb..e6f20cd40ea18892247b816ee53107502dcc098f 100755
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -91,7 +91,6 @@ LLVBOPool LLVertexBuffer::sDynamicIBOPool(GL_DYNAMIC_DRAW_ARB, GL_ELEMENT_ARRAY_
 
 U32 LLVBOPool::sBytesPooled = 0;
 U32 LLVBOPool::sIndexBytesPooled = 0;
-U32 LLVBOPool::sCurGLName = 1;
 
 std::list<U32> LLVertexBuffer::sAvailableVAOName;
 U32 LLVertexBuffer::sCurVAOName = 1;
@@ -125,16 +124,8 @@ U32 LLVBOPool::genBuffer()
 {
 	U32 ret = 0;
 
-	if (mGLNamePool.empty())
-	{
-		ret = sCurGLName++;
-	}
-	else
-	{
-		ret = mGLNamePool.front();
-		mGLNamePool.pop_front();
-	}
-
+	glGenBuffersARB(1, &ret);
+	
 	return ret;
 }
 
@@ -146,12 +137,9 @@ void LLVBOPool::deleteBuffer(U32 name)
 
 		glBindBufferARB(mType, name);
 		glBufferDataARB(mType, 0, NULL, mUsage);
-
-		llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end());
-
-		mGLNamePool.push_back(name);
-
 		glBindBufferARB(mType, 0);
+
+		glDeleteBuffersARB(1, &name);
 	}
 }
 
@@ -1333,7 +1321,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
 		//actually allocate space for the vertex buffer if using VBO mapping
 		flush();
 
-		if (gGLManager.mHasVertexArrayObject && useVBOs() && (LLRender::sGLCoreProfile || sUseVAO))
+		if (gGLManager.mHasVertexArrayObject && useVBOs() && sUseVAO)
 		{
 #if GL_ARB_vertex_array_object
 			mGLArray = getVAOName();
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index de58207c23e38206a060f6e9517a030e5233b326..619a0cec467bd9e766be579c48ff776effdf0c7b 100755
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -57,8 +57,6 @@ class LLVBOPool
 	static U32 sBytesPooled;
 	static U32 sIndexBytesPooled;
 	
-	static U32 sCurGLName;
-
 	LLVBOPool(U32 vboUsage, U32 vboType);
 		
 	const U32 mUsage;
@@ -86,8 +84,6 @@ class LLVBOPool
 		volatile U8* mClientData;
 	};
 
-	std::list<U32> mGLNamePool;
-
 	typedef std::list<Record> record_list_t;
 	std::vector<record_list_t> mFreeList;
 	std::vector<U32> mMissCount;
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index d4e14d94190bcaa4d5d8c4867b8f8737d94cfc8c..56be52f69abf317403f28d8bd3277000b1a59313 100755
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -534,6 +534,13 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
 	}
 }
 
+void LLComboBox::setLeftTextPadding(S32 pad)
+{
+	S32 left_pad, right_pad;
+	mTextEntry->getTextPadding(&left_pad, &right_pad);
+	mTextEntry->setTextPadding(pad, right_pad);
+}
+
 void* LLComboBox::getCurrentUserdata()
 {
 	LLScrollListItem* item = mList->getFirstSelected();
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 64dbaea30634d1d6cb95f88a397de45b907b3187..1e04fb08669aece9890daa89ff1c696f8f14a585 100755
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -190,6 +190,8 @@ class LLComboBox
 	virtual BOOL	operateOnAll(EOperation op);
 
 	//========================================================================
+
+	void			setLeftTextPadding(S32 pad);
 	
 	void*			getCurrentUserdata();
 
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 625fb8e87024c7cfc5f2a8d646737dabe181be76..49cfb2255e73318a4c7df2447235f3e1d894918f 100755
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -50,6 +50,8 @@ const LLCommandId LLCommandId::null = LLCommandId("null command");
 LLCommand::Params::Params()
 	: available_in_toybox("available_in_toybox", false)
 	, icon("icon")
+	, hover_icon_unselected("hover_icon_unselected")
+	, hover_icon_selected("hover_icon_selected")
 	, label_ref("label_ref")
 	, name("name")
 	, tooltip_ref("tooltip_ref")
@@ -71,6 +73,8 @@ LLCommand::LLCommand(const LLCommand::Params& p)
 	: mIdentifier(p.name)
 	, mAvailableInToybox(p.available_in_toybox)
 	, mIcon(p.icon)
+	, mHoverIconUnselected(p.hover_icon_unselected)
+	, mHoverIconSelected(p.hover_icon_selected)
 	, mLabelRef(p.label_ref)
 	, mName(p.name)
 	, mTooltipRef(p.tooltip_ref)
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
index ff5a8a325738b1c9a511cbd3df93b96683c357ca..9f276f712df4649a02d674063ccf854052c786dd 100755
--- a/indra/llui/llcommandmanager.h
+++ b/indra/llui/llcommandmanager.h
@@ -96,6 +96,9 @@ class LLCommand
 		Mandatory<std::string>	name;
 		Mandatory<std::string>	tooltip_ref;
 
+		Optional<std::string>   hover_icon_selected;
+		Optional<std::string>   hover_icon_unselected;
+
 		Mandatory<std::string>	execute_function;
 		Optional<LLSD>			execute_parameters;
 
@@ -124,6 +127,8 @@ class LLCommand
 	const std::string& labelRef() const { return mLabelRef; }
 	const std::string& name() const { return mName; }
 	const std::string& tooltipRef() const { return mTooltipRef; }
+	const std::string& hoverIconUnselected() const {return mHoverIconUnselected; }
+	const std::string& hoverIconSelected() const {return mHoverIconSelected; }
 
 	const std::string& executeFunctionName() const { return mExecuteFunction; }
 	const LLSD& executeParameters() const { return mExecuteParameters; }
@@ -150,6 +155,8 @@ class LLCommand
 	std::string mLabelRef;
 	std::string mName;
 	std::string mTooltipRef;
+	std::string mHoverIconUnselected;
+	std::string mHoverIconSelected;
 
 	std::string mExecuteFunction;
 	LLSD        mExecuteParameters;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 273ceb40386117dcdf505bdc9161f4961d712b1c..03ad6649282df2c8863949d8636b1a8990ea3a26 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1802,7 +1802,7 @@ void LLFloater::onClickClose( LLFloater* self )
 	self->onClickCloseBtn();
 }
 
-void	LLFloater::onClickCloseBtn()
+void LLFloater::onClickCloseBtn(bool app_quitting)
 {
 	closeFloater(false);
 }
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 59448530d9b518ad1af758ccc9d6086ba8964cb5..1693af318df265f7fc0254e347f6d28ddf39428a 100755
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -389,7 +389,7 @@ class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
 
 	void			destroy(); // Don't call this directly.  You probably want to call closeFloater()
 
-	virtual	void	onClickCloseBtn();
+	virtual	void	onClickCloseBtn(bool app_quitting = false);
 
 	virtual void	updateTitleButtons();
 
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 6c147ccc12eee6e15469be6b6b0816b377f9a07b..1750ca0ed4c7d64a282f45c6ea26bf0e530b4688 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -521,7 +521,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
 
 BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
 {
-	static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::sSettingGroups["config"],"DragAndDropDistanceThreshold");
+	static LLCachedControl<S32> drag_and_drop_threshold(*LLUI::sSettingGroups["config"],"DragAndDropDistanceThreshold", 3);
 
 	mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight));
 
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 8c2be449045f563a837530eba4d6abb30d366eb7..ff85b0ad090fc6f636dc85904b7b4f3cd0ab0479 100755
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -34,7 +34,7 @@
 #include "llui.h"
 #include "llwindow.h"
 #include "llkeyboard.h"
-
+#include "llmenugl.h"
 // static
 std::list<LLModalDialog*> LLModalDialog::sModalStack;
 
@@ -161,6 +161,18 @@ void LLModalDialog::setVisible( BOOL visible )
 
 BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
 {
+	LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
+	if (popup_menu != NULL)
+	{
+		S32 mx, my;
+		LLUI::getMousePositionScreen(&mx, &my);
+		LLRect menu_screen_rc = popup_menu->calcScreenRect();
+		if(!menu_screen_rc.pointInRect(mx, my))
+		{
+			LLMenuGL::sMenuContainer->hideMenus();
+		}
+	}
+
 	if (mModal)
 	{
 		if (!LLFloater::handleMouseDown(x, y, mask))
@@ -173,16 +185,34 @@ BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
 	{
 		LLFloater::handleMouseDown(x, y, mask);
 	}
+
+
 	return TRUE;
 }
 
 BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)		
-{ 
+{
 	if( childrenHandleHover(x, y, mask) == NULL )
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-		lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;		
+		lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl;
 	}
+
+	LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
+	if (popup_menu != NULL)
+	{
+		S32 mx, my;
+		LLUI::getMousePositionScreen(&mx, &my);
+		LLRect menu_screen_rc = popup_menu->calcScreenRect();
+		if(menu_screen_rc.pointInRect(mx, my))
+		{
+			S32 local_x = mx - popup_menu->getRect().mLeft;
+			S32 local_y = my - popup_menu->getRect().mBottom;
+			popup_menu->handleHover(local_x, local_y, mask);
+			gFocusMgr.setMouseCapture(NULL);
+		}
+	}
+
 	return TRUE;
 }
 
@@ -210,6 +240,7 @@ BOOL LLModalDialog::handleDoubleClick(S32 x, S32 y, MASK mask)
 
 BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
+	LLMenuGL::sMenuContainer->hideMenus();
 	childrenHandleRightMouseDown(x, y, mask);
 	return TRUE;
 }
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index cbcce0ece545fa7e7617fa5ad6f3f4a1127da877..238eae21c25f6366e63dc24f0e8a1c39015f670d 100755
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -519,7 +519,7 @@ bool LLScrollContainer::addChild(LLView* view, S32 tab_group)
 
 void LLScrollContainer::updateScroll()
 {
-	if (!mScrolledView)
+	if (!getVisible() || !mScrolledView)
 	{
 		return;
 	}
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index fd981557047697b291af17e4791b04de1d723234..9b08d8a9f503b91b596971bca0f06f95cdd12500 100755
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -193,12 +193,15 @@ LLTabContainer::TabParams::TabParams()
 :	tab_top_image_unselected("tab_top_image_unselected"),
 	tab_top_image_selected("tab_top_image_selected"),
 	tab_top_image_flash("tab_top_image_flash"),
+	tab_top_image_hovered("tab_top_image_hovered"),
 	tab_bottom_image_unselected("tab_bottom_image_unselected"),
 	tab_bottom_image_selected("tab_bottom_image_selected"),
 	tab_bottom_image_flash("tab_bottom_image_flash"),
+	tab_bottom_image_hovered("tab_bottom_image_hovered"),
 	tab_left_image_unselected("tab_left_image_unselected"),
 	tab_left_image_selected("tab_left_image_selected"),
-	tab_left_image_flash("tab_left_image_flash")
+	tab_left_image_flash("tab_left_image_flash"),
+	tab_left_image_hovered("tab_left_image_hovered")
 {}
 
 LLTabContainer::Params::Params()
@@ -218,7 +221,8 @@ LLTabContainer::Params::Params()
 	open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false),
 	tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
 	use_ellipses("use_ellipses"),
-	font_halign("halign")
+	font_halign("halign"),
+	use_highlighting_on_hover("use_highlighting_on_hover",false)
 {}
 
 LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
@@ -254,7 +258,8 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
 	mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
 	mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop),
 	mTabIconCtrlPad(p.tab_icon_ctrl_pad),
-	mUseTabEllipses(p.use_ellipses)
+	mUseTabEllipses(p.use_ellipses),
+	mUseHighlightingOnHover(p.use_highlighting_on_hover)
 {
 	static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
 
@@ -891,18 +896,30 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash));
+			if(mUseHighlightingOnHover)
+			{
+				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_top_image_hovered));
+			}
 		}
 		else if (pos == LLTabContainer::BOTTOM)
 		{
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash));
+			if(mUseHighlightingOnHover)
+			{
+				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_hovered));
+			}
 		}
 		else if (pos == LLTabContainer::LEFT)
 		{
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash));
+			if(mUseHighlightingOnHover)
+			{
+				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_left_image_hovered));
+			}
 		}
 	}
 }
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 57862fc626c0374c49a863a238836b0d4963553e..7e7d4ac6e6d22b942c7645eb8a10e69a933cea3a 100755
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -62,12 +62,15 @@ class LLTabContainer : public LLPanel
 		Optional<LLUIImage*>				tab_top_image_unselected,
 											tab_top_image_selected,
 											tab_top_image_flash,
+											tab_top_image_hovered,
 											tab_bottom_image_unselected,
 											tab_bottom_image_selected,
 											tab_bottom_image_flash,
+											tab_bottom_image_hovered,
 											tab_left_image_unselected,
 											tab_left_image_selected,
-											tab_left_image_flash;		
+											tab_left_image_flash,
+											tab_left_image_hovered;
 		TabParams();
 	};
 
@@ -114,6 +117,11 @@ class LLTabContainer : public LLPanel
 		 */
 		Optional<S32>						tab_icon_ctrl_pad;
 
+		/**
+		 *  This variable is used to found out should we highlight tab button on hover
+		*/
+		Optional<bool>						use_highlighting_on_hover;
+
 		Params();
 	};
 
@@ -307,6 +315,7 @@ class LLTabContainer : public LLPanel
 	bool							mOpenTabsOnDragAndDrop;
 	S32								mTabIconCtrlPad;
 	bool							mUseTabEllipses;
+	bool                            mUseHighlightingOnHover;
 };
 
 #endif  // LL_TABCONTAINER_H
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cc171661ce0bb0bcd32b35f4034b1009a270716d..5ec4cf4fe5dd57af6b51e9d1e93365dd4d6b0083 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1029,7 +1029,7 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask)
 BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask)
 {
 	LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y);
-	if (cur_segment && cur_segment->handleMouseUp(x, y, mask))
+	if (hasMouseCapture() && cur_segment && cur_segment->handleMouseUp(x, y, mask))
 	{
 		// Did we just click on a link?
 		if (mURLClickSignal
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 11cfa1d2632cf5223f2308d02050b3211b62a16f..d175204e6d598673f46ec0a35bc8a94ae42487e2 100755
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -59,11 +59,14 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
 	}
 
 	if (!handled && mClickedCallback)
+	{
+		handled = TRUE;
+	}
+
+	if (handled)
 	{
 		// Route future Mouse messages here preemptively.  (Release on mouse up.)
 		gFocusMgr.setMouseCapture( this );
-
-		handled = TRUE;
 	}
 
 	return handled;
@@ -71,7 +74,7 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask)
 
 BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
 {
-	BOOL	handled = FALSE;
+	BOOL	handled = LLTextBase::handleMouseUp(x, y, mask);
 
 	if (getSoundFlags() & MOUSE_UP)
 	{
@@ -93,10 +96,6 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask)
 			handled = TRUE;
 		}
 	}
-	else
-	{
-		handled = LLTextBase::handleMouseUp(x, y, mask);
-	}
 
 	return handled;
 }
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 0c16e06109fbd51b21eea8484785201adcc9d978..62140dd9d67909de341221f61efaa6f092dad743 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -666,6 +666,14 @@ void LLTextEditor::selectAll()
 	updatePrimary();
 }
 
+void LLTextEditor::selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos)
+{
+	setCursorPos(prev_cursor_pos);
+	startSelection();
+	setCursorPos(next_cursor_pos);
+	endSelection();
+}
+
 BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
 {
 	BOOL	handled = FALSE;
@@ -713,7 +721,6 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
 				setCursorAtLocalPos( x, y, true );
 				startSelection();
 			}
-			gFocusMgr.setMouseCapture( this );
 		}
 
 		handled = TRUE;
@@ -722,6 +729,10 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
 	// Delay cursor flashing
 	resetCursorBlink();
 
+	if (handled && !gFocusMgr.getMouseCapture())
+	{
+		gFocusMgr.setMouseCapture( this );
+	}
 	return handled;
 }
 
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 32b543ec0e3439380847c001ee18f4cefb3dece0..d3b7bc0eb7681ef04c31155ee3561496a9896b48 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -144,6 +144,8 @@ class LLTextEditor :
 	virtual void	selectAll();
 	virtual BOOL	canSelectAll()	const;
 
+	void 			selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos);
+
 	virtual bool	canLoadOrSaveToFile();
 
 	void			selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 928e82cb8c21c798e2cdb1744270ababa2b7012c..6bfe113933d322c46b8dea9d2d6cddc9985302f5 100755
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -928,6 +928,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
 	button_p.label = LLTrans::getString(commandp->labelRef());
 	button_p.tool_tip = LLTrans::getString(commandp->tooltipRef());
 	button_p.image_overlay = LLUI::getUIImage(commandp->icon());
+	button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIconUnselected());
+	button_p.image_hover_selected = LLUI::getUIImage(commandp->hoverIconSelected());
 	button_p.button_flash_enable = commandp->isFlashingAllowed();
 	button_p.overwriteFrom(mButtonParams[mButtonType]);
 	LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 0a0e0e164ec830191b912707ee8d37e169ec7827..0bc4424a8cab7b39a58a7fce63b8558fab524ca6 100755
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -405,11 +405,6 @@ class LLUICachedControl : public LLCachedControl<T>
 					  const std::string& comment = "Declared In Code")
 	:	LLCachedControl<T>(LLUI::getControlControlGroup(name), name, default_value, comment)
 	{}
-
-	// This constructor will signal an error if the control doesn't exist in the control group
-	LLUICachedControl(const std::string& name)
-	:	LLCachedControl<T>(LLUI::getControlControlGroup(name), name)
-	{}
 };
 
 namespace LLInitParam
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index e1f9be80ddad26d909449b0a6300f4d50c08b553..f46d21408bfe2bcd0538679056ef1caab59342b3 100755
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -408,16 +408,6 @@ class LLCachedControl
 		}
 	}
 
-	LLCachedControl(LLControlGroup& group,
-					const std::string& name)
-	{
-		mCachedControlPtr = LLControlCache<T>::getInstance(name);
-		if (mCachedControlPtr.isNull())
-		{
-			mCachedControlPtr = new LLControlCache<T>(group, name);
-		}
-	}
-
 	operator const T&() const { return mCachedControlPtr->getValue(); }
 	operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); }
 	const T& operator()() { return mCachedControlPtr->getValue(); }
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 4659673333b945cd68e064b9b63c5de1d8b3a419..376e1a70af3fc0c307a0b841c4c8814df2208904 100755
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -3,6 +3,8 @@
   <command name="aboutland"
            available_in_toybox="true"
            icon="Command_AboutLand_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_AboutLand_Label"
            tooltip_ref="Command_AboutLand_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -13,6 +15,8 @@
   <command name="appearance"  
            available_in_toybox="true"
            icon="Command_Appearance_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Appearance_Label"
            tooltip_ref="Command_Appearance_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -23,6 +27,8 @@
   <command name="avatar"
            available_in_toybox="true"
            icon="Command_Avatar_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Avatar_Label"
            tooltip_ref="Command_Avatar_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -33,6 +39,8 @@
   <command name="build"
            available_in_toybox="true"
            icon="Command_Build_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Build_Label"
            tooltip_ref="Command_Build_Tooltip"
            execute_function="Build.Toggle"
@@ -46,6 +54,8 @@
            available_in_toybox="true"
 		   is_flashing_allowed="true"
            icon="Command_Chat_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Chat_Label"
            tooltip_ref="Command_Conversations_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -56,6 +66,8 @@
   <command name="compass"
            available_in_toybox="false"
            icon="Command_Compass_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Compass_Label"
            tooltip_ref="Command_Compass_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -66,6 +78,8 @@
   <command name="destinations"
            available_in_toybox="true"
            icon="Command_Destinations_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Destinations_Label"
            tooltip_ref="Command_Destinations_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -76,6 +90,8 @@
   <command name="gestures"
            available_in_toybox="true"
            icon="Command_Gestures_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Gestures_Label"
            tooltip_ref="Command_Gestures_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -86,6 +102,8 @@
   <command name="howto"
            available_in_toybox="true"
            icon="Command_HowTo_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_HowTo_Label"
            tooltip_ref="Command_HowTo_Tooltip"
            execute_function="Help.ToggleHowTo"
@@ -94,6 +112,8 @@
   <command name="inventory"
            available_in_toybox="true"
            icon="Command_Inventory_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Inventory_Label"
            tooltip_ref="Command_Inventory_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -104,6 +124,8 @@
   <command name="map"
            available_in_toybox="true"
            icon="Command_Map_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Map_Label"
            tooltip_ref="Command_Map_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -114,6 +136,8 @@
   <command name="marketplace"
            available_in_toybox="false"
            icon="Command_Marketplace_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Marketplace_Label"
            tooltip_ref="Command_Marketplace_Tooltip"
            execute_function="Avatar.OpenMarketplace"
@@ -121,6 +145,8 @@
   <command name="minimap"
            available_in_toybox="true"
            icon="Command_MiniMap_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_MiniMap_Label"
            tooltip_ref="Command_MiniMap_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -131,6 +157,8 @@
   <command name="move"
            available_in_toybox="true"
            icon="Command_Move_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Move_Label"
            tooltip_ref="Command_Move_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -141,6 +169,8 @@
   <command name="outbox"
            available_in_toybox="false"
            icon="Command_Outbox_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Outbox_Label"
            tooltip_ref="Command_Outbox_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -151,6 +181,8 @@
   <command name="people"
            available_in_toybox="true"
            icon="Command_People_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_People_Label"
            tooltip_ref="Command_People_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -161,6 +193,8 @@
   <command name="picks"
            available_in_toybox="true"
            icon="Command_Picks_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Picks_Label"
            tooltip_ref="Command_Picks_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -171,6 +205,8 @@
   <command name="places"
            available_in_toybox="true"
            icon="Command_Places_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Places_Label"
            tooltip_ref="Command_Places_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -181,6 +217,8 @@
   <command name="preferences"
            available_in_toybox="true"
            icon="Command_Preferences_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Preferences_Label"
            tooltip_ref="Command_Preferences_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -191,6 +229,8 @@
   <command name="profile"
            available_in_toybox="true"
            icon="Command_Profile_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Profile_Label"
            tooltip_ref="Command_Profile_Tooltip"
            execute_function="Avatar.ToggleMyProfile"
@@ -199,6 +239,8 @@
   <command name="search"
            available_in_toybox="true"
            icon="Command_Search_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Search_Label"
            tooltip_ref="Command_Search_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -209,6 +251,8 @@
   <command name="snapshot"
            available_in_toybox="true"
            icon="Command_Snapshot_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Snapshot_Label"
            tooltip_ref="Command_Snapshot_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -219,6 +263,8 @@
   <command name="speak"
            available_in_toybox="true"
            icon="Command_Speak_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Speak_Label"
            tooltip_ref="Command_Speak_Tooltip"
            execute_function="Agent.PressMicrophone"
@@ -233,6 +279,8 @@
   <command name="view"
            available_in_toybox="true"
            icon="Command_View_Icon"
+           hover_icon_unselected="Command_Highlighting_Icon"
+           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_View_Label"
            tooltip_ref="Command_View_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6c9470b1186bd22d654de6484a68893618b0ecf4..aa5dba712b61f5e6bf41af05fdba7358dec09aa4 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5943,6 +5943,17 @@
       <key>Value</key>
       <real>1.6</real>
     </map>
+    <key>MaxPersistentNotifications</key>
+    <map>
+      <key>Comment</key>
+      <string>Maximum amount of persistent notifications</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <real>250</real>
+    </map>
     <key>MaxSelectDistance</key>
     <map>
       <key>Comment</key>
@@ -13313,7 +13324,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>-1</string>
+      <string>0</string>
     </map>
     <key>VivoxDebugSIPURIHostName</key>
     <map>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 636caf5ef321cd69a50cb381609e6745ab26889f..500151c935277b05d2d5d04ddf64f93bf9273945 100755
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -77,6 +77,17 @@
         <key>Value</key>
             <integer>412</integer>
     </map>
+    <key>ConversationsParticipantListCollapsed</key>
+    <map>
+        <key>Comment</key>
+            <string>Stores the expanded/collapsed state of Nearby chat participant list</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>Boolean</string>
+        <key>Value</key>
+            <integer>true</integer>
+    </map>   
     <key>InstantMessageLogPath</key>
         <map>
         <key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index bc63d07d726ccda9dee47a148166cd0592cea4be..3df4d333ce0d334e9edac7848a661dda13025a99 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -31,10 +31,12 @@ uniform vec4 matrixPalette[45];
 mat4 getSkinnedTransform()
 {
 	mat4 ret;
-	int i = int(floor(weight.x));
+	
 	float x = fract(weight.x);
-		
-	ret[0] = mix(matrixPalette[i+0], matrixPalette[i+1], x);
+	int i = int(floor(weight.x));
+		i = min(i, 15);
+		i = max(i, 0);
+	ret[0] = mix(matrixPalette[i+0], matrixPalette[i+1],  x);
 	ret[1] = mix(matrixPalette[i+15],matrixPalette[i+16], x);
 	ret[2] = mix(matrixPalette[i+30],matrixPalette[i+31], x);
 	ret[3] = vec4(0,0,0,1);
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index efd0d03965725dcdd8b3fcb42efc68c0c9718690..12996cf0d60b848d3e2f1892f673ad913aae1979 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -34,14 +34,17 @@ mat4 getObjectSkinnedTransform()
 	
 	vec4 w = fract(weight4);
 	vec4 index = floor(weight4);
-	
+
+		 index = min(index, vec4(31.0));
+		 index = max(index, vec4( 0.0));
+
 	float scale = 1.0/(w.x+w.y+w.z+w.w);
 	w *= scale;
-	
-	mat4 mat = matrixPalette[int(index.x)]*w.x;
-	mat += matrixPalette[int(index.y)]*w.y;
-	mat += matrixPalette[int(index.z)]*w.z;
-	mat += matrixPalette[int(index.w)]*w.w;
+
+	mat4 mat  = matrixPalette[int(index.x)]*w.x;
+		 mat += matrixPalette[int(index.y)]*w.y;
+		 mat += matrixPalette[int(index.z)]*w.z;
+		 mat += matrixPalette[int(index.w)]*w.w;
 		
 	return mat;
 }
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 49f77e6c347ac70e0ead94e10fc27481ed225cd0..325707bbf1f5bbe8a91075631101154d4f4d00ec 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1092,11 +1092,19 @@ const LLVector3d &LLAgent::getPositionGlobal() const
 //-----------------------------------------------------------------------------
 const LLVector3 &LLAgent::getPositionAgent()
 {
-	if (isAgentAvatarValid() && !gAgentAvatarp->mDrawable.isNull())
+	if (isAgentAvatarValid())
 	{
-		mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition());	
+		if(gAgentAvatarp->mDrawable.isNull())
+		{
+			mFrameAgent.setOrigin(gAgentAvatarp->getPositionAgent());
+		}
+		else
+		{
+			mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition());
+		}
 	}
 
+
 	return mFrameAgent.getOrigin();
 }
 
diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp
index 1d72397cbc1d4d22c215b29c57bee20348876659..dd9354fe3a8b7d8f31a62ef83024a2fab509fafd 100755
--- a/indra/newview/llautoreplace.cpp
+++ b/indra/newview/llautoreplace.cpp
@@ -39,7 +39,7 @@ void LLAutoReplace::autoreplaceCallback(S32& replacement_start, S32& replacement
 	replacement_length = 0;
 	replacement_string.clear();
 
-	static LLCachedControl<bool> perform_autoreplace(gSavedSettings, "AutoReplace");
+	static LLCachedControl<bool> perform_autoreplace(gSavedSettings, "AutoReplace", 0);
 	if (perform_autoreplace)
 	{
 		S32 word_end = cursor_pos - 1;
@@ -679,7 +679,7 @@ bool LLAutoReplaceSettings::decreaseListPriority(std::string listName)
 std::string LLAutoReplaceSettings::replaceWord(const std::string currentWord)
 {
 	std::string returnedWord = currentWord; // in case no replacement is found
-	static LLCachedControl<bool> autoreplace_enabled(gSavedSettings, "AutoReplace");
+	static LLCachedControl<bool> autoreplace_enabled(gSavedSettings, "AutoReplace", false);
 	if ( autoreplace_enabled )
 	{
 		LL_DEBUGS("AutoReplace")<<"checking '"<<currentWord<<"'"<< LL_ENDL;
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 9e3225a2649dfbe2dea1af3c73f4930833368386..77d734cbfe3ee73f2ef099881b26abf69a8ace8b 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -336,7 +336,7 @@ void LLAvatarRenderInfoAccountant::idle()
 		sRenderInfoReportTimer.resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
 	}
 
-	static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions");
+	static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions", 0);
 	static U32 prev_render_auto_mute_functions = (U32) -1;
 	if (prev_render_auto_mute_functions != render_auto_mute_functions)
 	{
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 066cb71677a810488557f1594ff32806256c66cd..ac41b26a3472dcc9f75aed0a3476a34fd3672412 100755
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -41,10 +41,14 @@ static const LLBlockListNameTypeComparator	NAME_TYPE_COMPARATOR;
 LLBlockList::LLBlockList(const Params& p)
 :	LLFlatListViewEx(p),
  	mSelectedItem(NULL),
- 	mDirty(true)
+ 	mDirty(true),
+	mShouldAddAll(true),
+	mActionType(NONE),
+	mMuteListSize(0)
 {
 
 	LLMuteList::getInstance()->addObserver(this);
+	mMuteListSize = LLMuteList::getInstance()->getMutes().size();
 
 	// Set up context menu.
 	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@@ -73,6 +77,41 @@ LLBlockList::~LLBlockList()
 	LLMuteList::getInstance()->removeObserver(this);
 }
 
+void LLBlockList::createList()
+{
+	std::vector<LLMute> mutes = LLMuteList::instance().getMutes();
+	std::vector<LLMute>::const_iterator mute_it = mutes.begin();
+
+	for (; mute_it != mutes.end(); ++mute_it)
+	{
+		addNewItem(&*mute_it);
+	}
+}
+
+BlockListActionType LLBlockList::getCurrentMuteListActionType()
+{
+	BlockListActionType type = NONE;
+	U32 curSize = LLMuteList::getInstance()->getMutes().size();
+	if( curSize > mMuteListSize)
+		type = ADD;
+	else if(curSize < mMuteListSize)
+		type = REMOVE;
+
+	return type;
+}
+
+void LLBlockList::onChangeDetailed(const LLMute &mute)
+{
+	mActionType = getCurrentMuteListActionType();
+
+	mCurItemId = mute.mID;
+	mCurItemName = mute.mName;
+	mCurItemType = mute.mType;
+	mCurItemFlags = mute.mFlags;
+
+	refresh();
+}
+
 BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
 	BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
@@ -88,6 +127,16 @@ BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
 	return handled;
 }
 
+void LLBlockList::removeListItem(const LLMute* mute)
+{
+	removeItemByUUID(mute->mID);
+}
+
+void LLBlockList::hideListItem(LLBlockedListItem* item, bool show)
+{
+	item->setVisible(show);
+}
+
 void LLBlockList::setNameFilter(const std::string& filter)
 {
 	std::string filter_upper = filter;
@@ -136,28 +185,56 @@ void LLBlockList::refresh()
 	bool have_filter = !mNameFilter.empty();
 
 	// save selection to restore it after list rebuilt
-	LLUUID selected = getSelectedUUID();
+	LLUUID selected = getSelectedUUID(), next_selected;
 
-	// calling refresh may be initiated by removing currently selected item
-	// so select next item and save the selection to restore it after list rebuilt
-	if (!selectNextItemPair(false, true))
+	if(mShouldAddAll)	// creating list of blockers
 	{
-		selectNextItemPair(true, true);
+		clear();
+		createList();
+		mShouldAddAll = false;
+	}
+	else
+	{
+		// handle remove/add functionality
+		LLMute mute(mCurItemId, mCurItemName, mCurItemType, mCurItemFlags);
+		if(mActionType == ADD)
+		{
+			addNewItem(&mute);
+		}
+		else if(mActionType == REMOVE)
+		{
+			if(selected == mute.mID)
+			{
+				// we are going to remove currently selected item, so select next item and save the selection to restore it
+				if (!selectNextItemPair(false, true))
+				{
+					selectNextItemPair(true, true);
+				}
+				next_selected = getSelectedUUID();
+			}
+			removeListItem(&mute);
+		}
+		mActionType = NONE;
 	}
-	LLUUID next_selected = getSelectedUUID();
-
-	clear();
-
-	std::vector<LLMute> mutes = LLMuteList::instance().getMutes();
-	std::vector<LLMute>::const_iterator mute_it = mutes.begin();
 
-	for (; mute_it != mutes.end(); ++mute_it)
+	// handle filter functionality
+	if(have_filter || (!have_filter && !mPrevNameFilter.empty()))
 	{
-		if (have_filter && !findInsensitive(mute_it->mName, mNameFilter))
-			continue;
+		// we should update visibility of our items if previous filter was not empty
+		std::vector < LLPanel* > allItems;
+		getItems(allItems);
+		std::vector < LLPanel* >::iterator it = allItems.begin();
 
-		addNewItem(&*mute_it);
+		for(; it != allItems.end() ; ++it)
+		{
+			LLBlockedListItem * curItem = dynamic_cast<LLBlockedListItem *> (*it);
+			if(curItem)
+			{
+				hideListItem(curItem, findInsensitive(curItem->getName(), mNameFilter));
+			}
+		}
 	}
+	mPrevNameFilter = mNameFilter;
 
 	if (getItemPair(selected))
 	{
@@ -169,6 +246,7 @@ void LLBlockList::refresh()
 		// previously selected item was removed, so select next item
 		selectItemPair(getItemPair(next_selected), true);
 	}
+	mMuteListSize = LLMuteList::getInstance()->getMutes().size();
 
 	// Sort the list.
 	sort();
diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h
index 1a215710f463ade3bf5d1f6edee32e808e4761dd..b1ea7e98e56804101b7f7f688104401e8dafed44 100755
--- a/indra/newview/llblocklist.h
+++ b/indra/newview/llblocklist.h
@@ -34,6 +34,8 @@
 class LLBlockedListItem;
 class LLMute;
 
+enum BlockListActionType {NONE, ADD, REMOVE};
+
 /**
  * List of blocked avatars and objects.
  * This list represents contents of the LLMuteList.
@@ -56,7 +58,8 @@ class LLBlockList: public LLFlatListViewEx, public LLMuteListObserver
 	LLToggleableMenu*	getContextMenu() const { return mContextMenu.get(); }
 	LLBlockedListItem*	getBlockedItem() const;
 
-	virtual void onChange() { refresh(); }
+	virtual void onChange() { }
+	virtual void onChangeDetailed(const LLMute& );
 	virtual void draw();
 
 	void setNameFilter(const std::string& filter);
@@ -67,18 +70,32 @@ class LLBlockList: public LLFlatListViewEx, public LLMuteListObserver
 private:
 
 	void addNewItem(const LLMute* mute);
+	void removeListItem(const LLMute* mute);
+	void hideListItem(LLBlockedListItem* item, bool show);
 	void setDirty(bool dirty = true) { mDirty = dirty; }
 	bool findInsensitive(std::string haystack, const std::string& needle_upper);
 
 	bool isActionEnabled(const LLSD& userdata);
 	void onCustomAction (const LLSD& userdata);
+	void createList();
 
-
+	BlockListActionType getCurrentMuteListActionType();
+	
 	LLHandle<LLToggleableMenu>	mContextMenu;
 
 	LLBlockedListItem*			mSelectedItem;
 	std::string 				mNameFilter;
 	bool 						mDirty;
+	bool						mShouldAddAll;
+	BlockListActionType			mActionType;
+	U32							mMuteListSize;
+
+	// This data is used to save information about item that currently changed(added or removed) 
+	LLUUID						mCurItemId;
+	std::string					mCurItemName;
+	LLMute::EType 				mCurItemType;
+	U32							mCurItemFlags;
+	std::string					mPrevNameFilter;
 
 };
 
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 43a733f918725afe2d2f9634f43d517adbc40ed3..ae0ac57e761f536107031cf005a8c9930dc9339b 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -60,6 +60,8 @@
 #include "llstring.h"
 #include "llurlaction.h"
 #include "llviewercontrol.h"
+#include "llviewerobjectlist.h"
+#include "llmutelist.h"
 
 static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
 
@@ -181,6 +183,18 @@ class LLChatHistoryHeader: public LLPanel
 		{
 			LLAvatarActions::startIM(getAvatarId());
 		}
+		else if (level == "teleport")
+		{
+			LLAvatarActions::offerTeleport(getAvatarId());
+		}
+		else if (level == "voice_call")
+		{
+			LLAvatarActions::startCall(getAvatarId());
+		}
+		else if (level == "chat_history")
+		{
+			LLAvatarActions::viewChatHistory(getAvatarId());
+		}
 		else if (level == "add")
 		{
 			LLAvatarActions::requestFriendshipDialog(getAvatarId(), mFrom);
@@ -189,13 +203,75 @@ class LLChatHistoryHeader: public LLPanel
 		{
 			LLAvatarActions::removeFriendDialog(getAvatarId());
 		}
+		else if (level == "invite_to_group")
+		{
+			LLAvatarActions::inviteToGroup(getAvatarId());
+		}
+		else if (level == "zoom_in")
+		{
+			handle_zoom_to_object(getAvatarId());
+		}
+		else if (level == "map")
+		{
+			LLAvatarActions::showOnMap(getAvatarId());
+		}
+		else if (level == "share")
+		{
+			LLAvatarActions::share(getAvatarId());
+		}
+		else if (level == "pay")
+		{
+			LLAvatarActions::pay(getAvatarId());
+		}
+		else if(level == "block_unblock")
+		{
+			mute(getAvatarId(), LLMute::flagVoiceChat);
+		}
+		else if(level == "mute_unmute")
+		{
+			mute(getAvatarId(), LLMute::flagTextChat);
+		}
+	}
+
+	bool onAvatarIconContextMenuItemChecked(const LLSD& userdata)
+	{
+		std::string level = userdata.asString();
+
+		if (level == "is_blocked")
+		{
+			return LLMuteList::getInstance()->isMuted(getAvatarId(), LLMute::flagVoiceChat);
+		}
+		if (level == "is_muted")
+		{
+			return LLMuteList::getInstance()->isMuted(getAvatarId(), LLMute::flagTextChat);
+		}
+		return false;
+	}
+
+	void mute(const LLUUID& participant_id, U32 flags)
+	{
+		BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
+		std::string name;
+		gCacheName->getFullName(participant_id, name);
+		LLMute mute(participant_id, name, LLMute::AGENT);
+
+		if (!is_muted)
+		{
+			LLMuteList::getInstance()->add(mute, flags);
+		}
+		else
+		{
+			LLMuteList::getInstance()->remove(mute, flags);
+		}
 	}
 
 	BOOL postBuild()
 	{
 		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar registrar_enable;
 
 		registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
+		registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
 		registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
 
 		LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
@@ -460,7 +536,7 @@ class LLChatHistoryHeader: public LLPanel
 
 		if(menu)
 		{
-			bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
+			bool is_friend = LLAvatarActions::isFriend(mAvatarID);
 			
 			menu->setItemEnabled("Add Friend", !is_friend);
 			menu->setItemEnabled("Remove Friend", is_friend);
@@ -470,13 +546,34 @@ class LLChatHistoryHeader: public LLPanel
 				menu->setItemEnabled("Add Friend", false);
 				menu->setItemEnabled("Send IM", false);
 				menu->setItemEnabled("Remove Friend", false);
+				menu->setItemEnabled("Offer Teleport",false);
+				menu->setItemEnabled("Voice Call", false);
+				menu->setItemEnabled("Invite Group", false);
+				menu->setItemEnabled("Zoom In", false);
+				menu->setItemEnabled("Share", false);
+				menu->setItemEnabled("Pay", false);
+				menu->setItemEnabled("Block Unblock", false);
+				menu->setItemEnabled("Mute Text", false);
 			}
-
-			if (mSessionID == LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, mAvatarID))
+			else
 			{
-				menu->setItemVisible("Send IM", false);
+				LLUUID currentSessionID = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, mAvatarID);
+				if (mSessionID == currentSessionID)
+				{
+					menu->setItemVisible("Send IM", false);
+				}
+				menu->setItemEnabled("Offer Teleport", LLAvatarActions::canOfferTeleport(mAvatarID));
+				menu->setItemEnabled("Voice Call", LLAvatarActions::canCall());
+
+				// We should only show 'Zoom in' item in a nearby chat
+				bool should_show_zoom = !LLIMModel::getInstance()->findIMSession(currentSessionID);
+				menu->setItemVisible("Zoom In", should_show_zoom && gObjectList.findObject(mAvatarID));	
+				menu->setItemEnabled("Block Unblock", LLAvatarActions::canBlock(mAvatarID));
+				menu->setItemEnabled("Mute Text", LLAvatarActions::canBlock(mAvatarID));
 			}
 
+			menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID));
+			menu->setItemEnabled("Map", (LLAvatarTracker::instance().isBuddyOnline(mAvatarID) && is_agent_mappable(mAvatarID)) || gAgent.isGodlike() );
 			menu->buildDrawLabels();
 			menu->updateParent(LLMenuGL::sMenuContainer);
 			LLMenuGL::showPopup(this, menu, x, y);
@@ -968,25 +1065,42 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 	// notify processing
 	if (chat.mNotifId.notNull())
 	{
-		LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId);
-		if (notification != NULL)
+		bool create_toast = true;
+		for (LLToastNotifyPanel::instance_iter ti(LLToastNotifyPanel::beginInstances())
+			, tend(LLToastNotifyPanel::endInstances()); ti != tend; ++ti)
 		{
-			LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel(
+			LLToastNotifyPanel& panel = *ti;
+			LLIMToastNotifyPanel * imtoastp = dynamic_cast<LLIMToastNotifyPanel *>(&panel);
+			const std::string& notification_name = panel.getNotificationName();
+			if (notification_name == "OfferFriendship" && panel.isControlPanelEnabled() && imtoastp)
+			{
+				create_toast = false;
+				break;
+			}
+		}
+
+		if (create_toast)
+		{
+			LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId);
+			if (notification != NULL)
+			{
+				LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel(
 					notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history, mEditor);
 
-			//Prepare the rect for the view
-			LLRect target_rect = mEditor->getDocumentView()->getRect();
-			// squeeze down the widget by subtracting padding off left and right
-			target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad();
-			target_rect.mRight -= mRightWidgetPad;
-			notify_box->reshape(target_rect.getWidth(),	notify_box->getRect().getHeight());
-			notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom);
-
-			LLInlineViewSegment::Params params;
-			params.view = notify_box;
-			params.left_pad = mLeftWidgetPad;
-			params.right_pad = mRightWidgetPad;
-			mEditor->appendWidget(params, "\n", false);
+				//Prepare the rect for the view
+				LLRect target_rect = mEditor->getDocumentView()->getRect();
+				// squeeze down the widget by subtracting padding off left and right
+				target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad();
+				target_rect.mRight -= mRightWidgetPad;
+				notify_box->reshape(target_rect.getWidth(),	notify_box->getRect().getHeight());
+				notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom);
+
+				LLInlineViewSegment::Params params;
+				params.view = notify_box;
+				params.left_pad = mLeftWidgetPad;
+				params.right_pad = mRightWidgetPad;
+				mEditor->appendWidget(params, "\n", false);
+			}
 		}
 	}
 
@@ -1016,7 +1130,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 		if (square_brackets)
 		{
 			message += "]";
-	}
+		}
 
 		mEditor->appendText(message, prependNewLineState, body_message_params);
 		prependNewLineState = false;
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 9faa12b2eeade59bba5d8d7797d4c19b318804bb..4f875cca20592113a0c3dc2cf9d3afe1fd6507fb 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -316,9 +316,16 @@ void LLConversationViewSession::selectConversationItem()
 		LLUUID session_id = item? item->getUUID() : LLUUID();
 
 		LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+		if (im_container->isConversationsPaneCollapsed() && im_container->getSelectedSession() == session_id)
+		{
+			im_container->collapseMessagesPane(!im_container->isMessagesPaneCollapsed());
+		}
+		else
+		{
+			im_container->collapseMessagesPane(false);
+		}
 		im_container->flashConversationItemWidget(session_id,false);
 		im_container->selectConversationPair(session_id, false);
-		im_container->collapseMessagesPane(false);
 	}
 }
 
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index ba8c449c3d99935a620f1c95184140af4439f994..f622d5a63ac820ba26c91027815b308f2e65768e 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -697,7 +697,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
 	specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
 	normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
 	sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
-	gPipeline.bindDeferredShader(*sVertexProgram);
+	sVertexProgram->bind();
 	sVertexProgram->setMinimumAlpha(0.01f);
 }
 
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 369273bca6f20d345371412602f1ee267f9f8cdb..ae62be0ad010d88b2c44793b2c3399ede10f3f97 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1386,7 +1386,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 		}
 	}
 	
-	static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
+	static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback", false);
 
 #ifdef GL_TRANSFORM_FEEDBACK_BUFFER
 	if (use_transform_feedback &&
@@ -1526,7 +1526,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 		}
 
 		glBindBufferARB(GL_TRANSFORM_FEEDBACK_BUFFER, 0);
-
 		gGL.popMatrix();
 
 		if (cur_shader)
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 66b5f137401f38379169f7f8ba4d70e4f7b23e5f..c9037ce1eba8f91f8f670391d950d247a84e64cd 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -194,7 +194,8 @@ class LLFace
 
 	void		setSize(S32 numVertices, S32 num_indices = 0, bool align = false);
 	
-	BOOL		genVolumeBBoxes(const LLVolume &volume, S32 f,const LLMatrix4& mat, BOOL global_volume = FALSE);
+	BOOL		genVolumeBBoxes(const LLVolume &volume, S32 f,
+									const LLMatrix4& mat_vert_in, BOOL global_volume = FALSE);
 	
 	void		init(LLDrawable* drawablep, LLViewerObject* objp);
 	void		destroy();
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 8e1a1df211bc705189095992de22680ca9f3ec4c..06119620de1287281156a0f5c31e6611ac20e2ad 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -1545,7 +1545,7 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::
 		return ;
 	}
 }
-void	LLFastTimerView::onClickCloseBtn()
+void	LLFastTimerView::onClickCloseBtn(bool)
 {
 	setVisible(false);
 }
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index 5766cfa0b0525f0012d75c641dbed57e2d60f25b..1349b1e99cdd8aafe81b94c5d4245ea23f93de2f 100755
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -63,7 +63,7 @@ class LLFastTimerView : public LLFloater
 	F64 getTime(const std::string& name);
 
 protected:
-	virtual	void	onClickCloseBtn();
+	virtual	void	onClickCloseBtn(bool app_quitting = false);
 private:	
 	typedef std::vector<std::vector<S32> > bar_positions_t;
 	bar_positions_t mBarStart;
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index c151b51c23ba24cc9450256329c0ff8189b13d17..16eacc9392fb70382dc9466c2e46582f9211b0c1 100755
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -422,6 +422,19 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
 			L"PNG Images (*.png)\0*.png\0" \
 			L"\0";
 		break;
+	case FFSAVE_TGAPNG:
+		if (filename.empty())
+		{
+			wcsncpy( mFilesW,L"untitled.png", FILENAME_BUFFER_SIZE);	/*Flawfinder: ignore*/
+			//PNG by default
+		}
+		mOFN.lpstrDefExt = L"png";
+		mOFN.lpstrFilter =
+			L"PNG Images (*.png)\0*.png\0" \
+			L"Targa Images (*.tga)\0*.tga\0" \
+			L"\0";
+		break;
+		
 	case FFSAVE_JPEG:
 		if (filename.empty())
 		{
@@ -640,13 +653,16 @@ bool	LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filena
 			creator = "TVOD";
 			extension = "wav";
 			break;
-		
 		case FFSAVE_TGA:
 			type = "TPIC";
 			creator = "prvw";
 			extension = "tga";
 			break;
-		
+		case FFSAVE_TGAPNG:
+			type = "PNG";
+			creator = "prvw";
+			extension = "png";
+			break;
 		case FFSAVE_BMP:
 			type = "BMPf";
 			creator = "prvw";
@@ -921,6 +937,22 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer
 		g_slist_free (file_list);
 	}
 
+	// let's save the extension of the last added file(considering current filter)
+	GtkFileFilter *gfilter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(widget));
+	if(gfilter)
+	{
+		std::string filter = gtk_file_filter_get_name(gfilter);
+
+		if(filter == LLTrans::getString("png_image_files"))
+		{
+			picker->mCurrentExtension = ".png";
+		}
+		else if(filter == LLTrans::getString("targa_image_files"))
+		{
+			picker->mCurrentExtension = ".tga";
+		}
+	}
+
 	// set the default path for this usage context.
 	const char* cur_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget));
 	if (cur_folder != NULL)
@@ -1092,6 +1124,24 @@ static std::string add_dictionary_filter_to_gtkchooser(GtkWindow *picker)
 							LLTrans::getString("dictionary_files") + " (*.dic; *.xcu)");
 }
 
+static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker)
+{
+	GtkFileFilter *gfilter_tga = gtk_file_filter_new();
+	GtkFileFilter *gfilter_png = gtk_file_filter_new();
+
+	gtk_file_filter_add_pattern(gfilter_tga, "*.tga");
+	gtk_file_filter_add_mime_type(gfilter_png, "image/png");
+	std::string caption = LLTrans::getString("save_texture_image_files") + " (*.tga; *.png)";
+	gtk_file_filter_set_name(gfilter_tga, LLTrans::getString("targa_image_files").c_str());
+	gtk_file_filter_set_name(gfilter_png, LLTrans::getString("png_image_files").c_str());
+
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(picker),
+					gfilter_png);
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(picker),
+					gfilter_tga);
+	return caption;
+}
+
 BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename )
 {
 	BOOL rtn = FALSE;
@@ -1129,6 +1179,15 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
 				(picker, "image/bmp", LLTrans::getString("bitmap_image_files") + " (*.bmp)");
 			suggest_ext = ".bmp";
 			break;
+		case FFSAVE_PNG:
+			caption += add_simple_mime_filter_to_gtkchooser
+				(picker, "image/png", LLTrans::getString("png_image_files") + " (*.png)");
+			suggest_ext = ".png";
+			break;
+		case FFSAVE_TGAPNG:
+			caption += add_save_texture_filter_to_gtkchooser(picker);
+			suggest_ext = ".png";
+			break;
 		case FFSAVE_AVI:
 			caption += add_simple_mime_filter_to_gtkchooser
 				(picker, "video/x-msvideo",
@@ -1181,9 +1240,17 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
 		}
 
 		gtk_widget_show_all(GTK_WIDGET(picker));
+
 		gtk_main();
 
 		rtn = (getFileCount() == 1);
+
+		if(rtn && filter == FFSAVE_TGAPNG)
+		{
+			std::string selected_file = mFiles.back();
+			mFiles.pop_back();
+			mFiles.push_back(selected_file + mCurrentExtension);
+		}
 	}
 
 	gViewerWindow->getWindow()->afterDialog();
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 0d279f73f3065d696877ebeec092e34318271022..f0f82c51db0a218acef6ae0d1d41dbd0b5c99476 100755
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -107,6 +107,7 @@ class LLFilePicker
 		FFSAVE_PNG = 13,
 		FFSAVE_JPEG = 14,
 		FFSAVE_SCRIPT = 15,
+		FFSAVE_TGAPNG = 16
 	};
 
 	// open the dialog. This is a modal operation
@@ -175,6 +176,8 @@ class LLFilePicker
 	// we remember the last path that was accessed for a particular usage
 	std::map <std::string, std::string> mContextToPathMap;
 	std::string mCurContextName;
+	// we also remember the extension of the last added file.
+	std::string mCurrentExtension;
 #endif
 
 	std::vector<std::string> mFiles;
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 4a85160f95df2c4c37cbc8dabe8c72d3563dc37a..5041f4689da28690e532e3f27aab47aeca931d76 100755
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -44,7 +44,8 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i
 	mPageSize(gSavedSettings.getS32("ConversationHistoryPageSize")),
 	mAccountName(session_id[LL_FCP_ACCOUNT_NAME]),
 	mCompleteName(session_id[LL_FCP_COMPLETE_NAME]),
-	mMutex(NULL)
+	mMutex(NULL),
+	mShowHistory(false)
 {
 }
 
@@ -91,12 +92,11 @@ BOOL LLFloaterConversationPreview::postBuild()
 	mPageSpinner->setMinValue(1);
 	mPageSpinner->set(1);
 	mPageSpinner->setEnabled(false);
-	mChatHistoryLoaded = false;
 	LLLogChat::startChatHistoryThread(file, load_params);
 	return LLFloater::postBuild();
 }
 
-void LLFloaterConversationPreview::setPages(std::list<LLSD>& messages,const std::string& file_name)
+void LLFloaterConversationPreview::setPages(std::list<LLSD>& messages, const std::string& file_name)
 {
 	if(file_name == mChatHistoryFileName)
 	{
@@ -111,34 +111,30 @@ void LLFloaterConversationPreview::setPages(std::list<LLSD>& messages,const std:
 
 		std::string total_page_num = llformat("/ %d", mCurrentPage+1);
 		getChild<LLTextBox>("page_num_label")->setValue(total_page_num);
-		mChatHistoryLoaded = true;
+		mShowHistory = true;
 	}
 }
 
 void LLFloaterConversationPreview::draw()
 {
-	if(mChatHistoryLoaded)
+	if(mShowHistory)
 	{
 		showHistory();
-		mChatHistoryLoaded = false;
+		mShowHistory = false;
 	}
 	LLFloater::draw();
 }
 
 void LLFloaterConversationPreview::onOpen(const LLSD& key)
 {
-	if(mChatHistoryLoaded)
-	{
-		showHistory();
-	}
+	mShowHistory = true;
 }
 
 void LLFloaterConversationPreview::showHistory()
 {
-	// additional protection to avoid changes of mMessages in setPages()
+	// additional protection to avoid changes of mMessages in setPages
 	LLMutexLock lock(&mMutex);
-
-	if (!mMessages.size() || mCurrentPage * mPageSize >= mMessages.size())
+	if(!mMessages.size() || mCurrentPage * mPageSize >= mMessages.size())
 	{
 		return;
 	}
@@ -147,7 +143,7 @@ void LLFloaterConversationPreview::showHistory()
 	std::ostringstream message;
 	std::list<LLSD>::const_iterator iter = mMessages.begin();
 	std::advance(iter, mCurrentPage * mPageSize);
-
+	
 	for (int msg_num = 0; iter != mMessages.end() && msg_num < mPageSize; ++iter, ++msg_num)
 	{
 		LLSD msg = *iter;
@@ -198,10 +194,11 @@ void LLFloaterConversationPreview::showHistory()
 void LLFloaterConversationPreview::onMoreHistoryBtnClick()
 {
 	mCurrentPage = (int)(mPageSpinner->getValueF32());
-	if (--mCurrentPage < 0)
+	if (!mCurrentPage)
 	{
 		return;
 	}
 
-	showHistory();
+	mCurrentPage--;
+	mShowHistory = true;
 }
diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h
index f8796127baafaca6f2e5db8c655722a1f2f1369a..b0488f4ff127d51bdd58417b3cf0629bdc01e318 100755
--- a/indra/newview/llfloaterconversationpreview.h
+++ b/indra/newview/llfloaterconversationpreview.h
@@ -62,7 +62,7 @@ class LLFloaterConversationPreview : public LLFloater
 	std::string		mAccountName;
 	std::string		mCompleteName;
 	std::string     mChatHistoryFileName;
-	bool			mChatHistoryLoaded;
+	bool			mShowHistory;
 };
 
 #endif /* LLFLOATERCONVERSATIONPREVIEW_H_ */
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 49da4e64b3c512b054961f6c61d4d3d2d14f0de0..d0f32897697386a4fb9eac6a77cbf13523b32144 100755
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -30,6 +30,8 @@
 #include "llpanelgroupinvite.h"
 #include "lltrans.h"
 #include "lldraghandle.h"
+#include "llagent.h"
+#include "llgroupmgr.h"
 
 class LLFloaterGroupInvite::impl
 {
@@ -123,6 +125,12 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agen
 	LLFloaterGroupInvite *fgi = get_if_there(impl::sInstances,
 											 group_id,
 											 (LLFloaterGroupInvite*)NULL);
+
+	// refresh group information
+	gAgent.sendAgentDataUpdateRequest();
+	LLGroupMgr::getInstance()->clearGroupData(group_id);
+
+
 	if (!fgi)
 	{
 		fgi = new LLFloaterGroupInvite(group_id);
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 2c3b34e128b191fdbbf05ff186d58d88336eecd7..258cace042e74aec26bf1cd10b7d03901b42681b 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -101,6 +101,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
 
 	gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed());
 	gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed());
+	gSavedPerAccountSettings.setBOOL("ConversationsParticipantListCollapsed", !isParticipantListExpanded());
 
 	if (!LLSingleton<LLIMMgr>::destroyed())
 	{
@@ -250,6 +251,11 @@ BOOL LLFloaterIMContainer::postBuild()
 	// Init the sort order now that the root had been created
 	setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder")));
 	
+	//We should expand nearby chat participants list for the new user
+	if(gAgent.isFirstLogin() || !gSavedPerAccountSettings.getBOOL("ConversationsParticipantListCollapsed"))
+	{
+		expandConversation();
+	}
 	// Keep the xml set title around for when we have to overwrite it
 	mGeneralTitle = getTitle();
 	
@@ -715,6 +721,16 @@ void LLFloaterIMContainer::updateResizeLimits()
 	assignResizeLimits();
 }
 
+bool LLFloaterIMContainer::isMessagesPaneCollapsed()
+{
+	return mMessagesPane->isCollapsed();
+}
+
+bool LLFloaterIMContainer::isConversationsPaneCollapsed()
+{
+	return mConversationsPane->isCollapsed();
+}
+
 void LLFloaterIMContainer::collapseMessagesPane(bool collapse)
 {
 	if (mMessagesPane->isCollapsed() == collapse)
@@ -784,8 +800,8 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is
 		mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth"));
 	}
 
-	S32 delta_width =
-			gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim();
+	S32 delta_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") 
+		- mConversationsPane->getMinDim() - mConversationsStack->getPanelSpacing() + 1;
 
 	reshapeFloaterAndSetResizeLimits(collapse, delta_width);
 
@@ -2082,6 +2098,19 @@ void LLFloaterIMContainer::expandConversation()
 		}
 	}
 }
+bool LLFloaterIMContainer::isParticipantListExpanded()
+{
+	bool is_expanded = false;
+	if(!mConversationsPane->isCollapsed())
+	{
+		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession()));
+		if (widget)
+		{
+			is_expanded = widget->isOpen();
+		}
+	}
+	return is_expanded;
+}
 
 // By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs
 // So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself
@@ -2098,7 +2127,7 @@ BOOL LLFloaterIMContainer::isFrontmost()
 
 // For conversations, closeFloater() (linked to Ctrl-W) does not actually close the floater but the active conversation.
 // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
-void LLFloaterIMContainer::onClickCloseBtn()
+void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/)
 {
 	// Always unminimize before trying to close.
 	// Most of the time the user will never see this state.
@@ -2107,7 +2136,7 @@ void LLFloaterIMContainer::onClickCloseBtn()
 		LLMultiFloater::setMinimized(FALSE);
 	}
 
-	LLFloater::closeFloater();
+	LLFloater::closeFloater(app_quitting);
 }
 
 void LLFloaterIMContainer::closeHostedFloater()
@@ -2154,7 +2183,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	if(app_quitting)
 	{
 		closeAllConversations();
-		onClickCloseBtn();
+		onClickCloseBtn(app_quitting);
 	}
 	else
 	{
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 36da457cacfb5f34ee4f549eb652ef81ff575a9a..f6d973b9b3be5f7646d3be62b25106d62bc39549 100755
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -90,6 +90,8 @@ class LLFloaterIMContainer
 	static void onCurrentChannelChanged(const LLUUID& session_id);
 
 	void collapseMessagesPane(bool collapse);
+	bool isMessagesPaneCollapsed();
+	bool isConversationsPaneCollapsed();
 	
 	// Callbacks
 	static void idle(void* user_data);
@@ -134,7 +136,7 @@ class LLFloaterIMContainer
 	void onStubCollapseButtonClicked();
 	void processParticipantsStyleUpdate();
 	void onSpeakButtonClicked();
-	/*virtual*/ void onClickCloseBtn();
+	/*virtual*/ void onClickCloseBtn(bool app_quitting = false);
 	/*virtual*/ void closeHostedFloater();
 
 	void collapseConversationsPane(bool collapse, bool save_is_allowed=true);
@@ -172,6 +174,7 @@ class LLFloaterIMContainer
 	void toggleAllowTextChat(const LLUUID& participant_uuid);
 	void toggleMute(const LLUUID& participant_id, U32 flags);
 	void openNearbyChat();
+	bool isParticipantListExpanded();
 
 	LLButton* mExpandCollapseBtn;
 	LLButton* mStubCollapseBtn;
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 3d77ea4f0bb3ab7fc1861214f39b125173e0ae68..323e84751f6f7b819ba0410562d17d7735fccd65 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -308,7 +308,8 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)
 }
 
 // virtual
-void LLFloaterIMNearbyChat::onClickCloseBtn()
+void LLFloaterIMNearbyChat::onClickCloseBtn(bool)
+
 {
 	if (!isTornOff())
 	{
@@ -493,11 +494,11 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke()
 			if (!rest_of_match.empty())
 			{
 				mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
-
 				// Select to end of line, starting from the character
 				// after the last one the user typed.
-				mInputEditor->selectNext(rest_of_match, false);
+				mInputEditor->selectByCursorPosition(utf8_out_str.size()-rest_of_match.size(),utf8_out_str.size());
 			}
+
 		}
 		else if (matchChatTypeTrigger(utf8_trigger, &utf8_out_str))
 		{
diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h
index 05b48cccb03657a2b3e7f646f04cdc9225eec7c9..f0daacd6a9e7212e572f147f40d3082e7d84a94a 100755
--- a/indra/newview/llfloaterimnearbychat.h
+++ b/indra/newview/llfloaterimnearbychat.h
@@ -95,7 +95,7 @@ class LLFloaterIMNearbyChat
 	void onChatFontChange(LLFontGL* fontp);
 
 	/*virtual*/ void onTearOffClicked();
-	/*virtual*/ void onClickCloseBtn();
+	/*virtual*/ void onClickCloseBtn(bool app_qutting = false);
 
 	static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
 	EChatType processChatTypeTriggers(EChatType type, std::string &str);
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 5cb9df5625895f96c22dcfb1c9e58aa1195af85c..14e1a486d3232e1edc6689c2bc66452ada907d57 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -112,7 +112,7 @@ void LLFloaterIMSession::onTearOffClicked()
 }
 
 // virtual
-void LLFloaterIMSession::onClickCloseBtn()
+void LLFloaterIMSession::onClickCloseBtn(bool)
 {
 	LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID);
 
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index a0e0171b344baa322714bc3766e6851f499e7197..d6718843ca0109240572533c158000f33a5ab4d6 100755
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -141,7 +141,7 @@ class LLFloaterIMSession
 	/*virtual*/ void refresh();
 
     /*virtual*/ void onTearOffClicked();
-	/*virtual*/ void onClickCloseBtn();
+	/*virtual*/ void onClickCloseBtn(bool app_qutting);
 
 	// Update the window title and input field help text
 	/*virtual*/ void updateSessionName(const std::string& name);
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 6ef4d8717d75cecba8399d52959ab1dd2c7731a4..abe094d7480ce1f01fae217979481e507bf03fff 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2377,7 +2377,7 @@ void LLPanelLandAccess::refresh()
 	{
 		BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
 		BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
-		BOOL public_access = !use_access_list && !use_group;
+		BOOL public_access = !use_access_list;
 		
 		getChild<LLUICtrl>("public_access")->setValue(public_access );
 		getChild<LLUICtrl>("GroupCheck")->setValue(use_group );
@@ -2544,7 +2544,11 @@ void LLPanelLandAccess::refresh_ui()
 	getChildView("HoursSpin")->setEnabled(FALSE);
 	getChildView("AccessList")->setEnabled(FALSE);
 	getChildView("BannedList")->setEnabled(FALSE);
-	
+	getChildView("add_allowed")->setEnabled(FALSE);
+	getChildView("remove_allowed")->setEnabled(FALSE);
+	getChildView("add_banned")->setEnabled(FALSE);
+	getChildView("remove_banned")->setEnabled(FALSE);
+
 	LLParcel *parcel = mParcel->getParcel();
 	if (parcel)
 	{
@@ -2582,7 +2586,6 @@ void LLPanelLandAccess::refresh_ui()
 			{
 				getChildView("Only Allow")->setToolTip(std::string());
 			}
-			getChildView("GroupCheck")->setEnabled(FALSE);
 			getChildView("PassCheck")->setEnabled(FALSE);
 			getChildView("pass_combo")->setEnabled(FALSE);
 			getChildView("AccessList")->setEnabled(FALSE);
@@ -2592,11 +2595,7 @@ void LLPanelLandAccess::refresh_ui()
 			getChildView("limit_payment")->setEnabled(FALSE);
 			getChildView("limit_age_verified")->setEnabled(FALSE);
 
-			std::string group_name;
-			if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
-			{			
-				getChildView("GroupCheck")->setEnabled(can_manage_allowed);
-			}
+
 			BOOL group_access = getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
 			BOOL sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
 			getChildView("PassCheck")->setEnabled(can_manage_allowed);
@@ -2607,6 +2606,11 @@ void LLPanelLandAccess::refresh_ui()
 				getChildView("HoursSpin")->setEnabled(can_manage_allowed);
 			}
 		}
+		std::string group_name;
+		if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
+		{
+			getChildView("GroupCheck")->setEnabled(can_manage_allowed);
+		}
 		getChildView("AccessList")->setEnabled(can_manage_allowed);
 		S32 allowed_list_count = parcel->mAccessList.size();
 		getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
@@ -2652,17 +2656,6 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
 	{
 		return;
 	}
-
-	// If we disabled public access, enable group access by default (if applicable)
-	BOOL public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
-	if (public_access == FALSE)
-	{
-		std::string group_name;
-		if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
-		{
-			self->getChild<LLUICtrl>("GroupCheck")->setValue(public_access ? FALSE : TRUE);
-		}
-	}
 	
 	onCommitAny(ctrl, userdata);
 }
@@ -2697,7 +2690,6 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
 	if (public_access)
 	{
 		use_access_list = FALSE;
-		use_access_group = FALSE;
 		limit_payment = self->getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
 		limit_age_verified = self->getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
 	}
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 5f9556a870d66810af487f69807501b362bf54c9..c5248719e933a010ce77a14d0f5be57f6fded6c0 100755
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -57,7 +57,7 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
 	getChild<LLPanel>(sMainPanelName)->onOpen(key);
 }
 
-void LLFloaterSidePanelContainer::onClickCloseBtn()
+void LLFloaterSidePanelContainer::onClickCloseBtn(bool)
 {
 	LLPanelOutfitEdit* panel_outfit_edit =
 		dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 491723471fb1109211764fe9b6757234071b9cf4..65ec8f604e65b4446f74783655dba90f5b0c6cc2 100755
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -51,7 +51,7 @@ class LLFloaterSidePanelContainer : public LLFloater
 
 	/*virtual*/ void onOpen(const LLSD& key);
 
-	/*virtual*/ void onClickCloseBtn();
+	/*virtual*/ void onClickCloseBtn(bool app_quitting = false);
 
 	LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
 
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 3fe2518de67230cb185fda3cc036366796cfd5aa..c8b48ea6ca9c17367806172428e51243fefe68db 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -350,10 +350,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
 		if(test_prefix == prefix)
 		{
 			mSecureLockIcon->setVisible(true);
+			mAddressCombo->setLeftTextPadding(22);
 		}
 		else
 		{
 			mSecureLockIcon->setVisible(false);
+			mAddressCombo->setLeftTextPadding(2);
 		}
 	}
 	else if(event == MEDIA_EVENT_CLOSE_REQUEST)
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 54522bb7f66c32401e25d61a73b4c6ff0a1556f7..0720d443f8f812735798f5073a41645693745288 100755
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -251,6 +251,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
 			llinfos << "Muting by name " << mute.mName << llendl;
 			updateAdd(mute);
 			notifyObservers();
+			notifyObserversDetailed(mute);
 			return TRUE;
 		}
 		else
@@ -299,6 +300,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
 				llinfos << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl;
 				updateAdd(localmute);
 				notifyObservers();
+				notifyObserversDetailed(localmute);
 				if(!(localmute.mFlags & LLMute::flagParticles))
 				{
 					//Kill all particle systems owned by muted task
@@ -396,6 +398,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
 		}
 		
 		// Must be after erase.
+		notifyObserversDetailed(localmute);
 		setLoaded();  // why is this here? -MG
 	}
 	else
@@ -409,6 +412,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
 			updateRemove(mute);
 			mLegacyMutes.erase(legacy_it);
 			// Must be after erase.
+			notifyObserversDetailed(mute);
 			setLoaded(); // why is this here? -MG
 		}
 	}
@@ -762,3 +766,16 @@ void LLMuteList::notifyObservers()
 		it = mObservers.upper_bound(observer);
 	}
 }
+
+void LLMuteList::notifyObserversDetailed(const LLMute& mute)
+{
+	for (observer_set_t::iterator it = mObservers.begin();
+		it != mObservers.end();
+		)
+	{
+		LLMuteListObserver* observer = *it;
+		observer->onChangeDetailed(mute);
+		// In case onChange() deleted an entry.
+		it = mObservers.upper_bound(observer);
+	}
+}
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 7a70370fe33519106950250dd2f98d197ac25bdd..3e998b4f0e2ad852bf37485fdbf122fc1f00786a 100755
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -123,6 +123,7 @@ class LLMuteList : public LLSingleton<LLMuteList>
 
 	void setLoaded();
 	void notifyObservers();
+	void notifyObserversDetailed(const LLMute &mute);
 
 	void updateAdd(const LLMute& mute);
 	void updateRemove(const LLMute& mute);
@@ -173,6 +174,7 @@ class LLMuteListObserver
 public:
 	virtual ~LLMuteListObserver() { }
 	virtual void onChange() = 0;
+	virtual void onChangeDetailed(const LLMute& ) { }
 };
 
 
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 53deded2f23cc8594e3ab57b4924bbb3ce47d152..1ff0bfd09136e117774138a508ba1dc52865de1d 100755
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -542,6 +542,13 @@ void LLPanelMainInventory::changed(U32)
 	updateItemcountText();
 }
 
+void LLPanelMainInventory::setFocusFilterEditor()
+{
+	if(mFilterEditor)
+	{
+		mFilterEditor->setFocus(true);
+	}
+}
 
 // virtual
 void LLPanelMainInventory::draw()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 394b004e209ffafb95382edc148d1b2459da5775..fc8cc67c338dab0d47bf2b6c14f3670340f816d1 100755
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -82,6 +82,9 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
 	void setSelectCallback(const LLFolderView::signal_t::slot_type& cb);
 
 	void onFilterEdit(const std::string& search_string );
+
+	void setFocusFilterEditor();
+
 protected:
 	//
 	// Misc functions
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index 076c3e0235b9b22bb7c25eefcbccd1f321b47813..d8fc2bee32041fcdd58c2b155fa06acbb53d6756 100755
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -77,6 +77,14 @@ void LLPersistentNotificationStorage::saveNotifications()
 		}
 
 		data.append(notification->asLLSD(true));
+		if (data.size() >= gSavedSettings.getS32("MaxPersistentNotifications"))
+		{
+			llwarns << "Too many persistent notifications."
+					<< " Saved " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << history_channel->size()
+					<< " persistent notifications." << llendl;
+			break;
+		}
+
 	}
 
 	writeNotifications(output);
@@ -97,7 +105,6 @@ void LLPersistentNotificationStorage::loadNotifications()
 	}
 
 	mLoaded = true;
-
 	LLSD input;
 	if (!readNotifications(input) ||input.isUndefined())
 	{
@@ -115,9 +122,9 @@ void LLPersistentNotificationStorage::loadNotifications()
 		findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
 
 	LLNotifications& instance = LLNotifications::instance();
-
-	for (LLSD::array_const_iterator notification_it = data.beginArray();
-		notification_it != data.endArray();
+	S32 processed_notifications = 0;
+	for (LLSD::reverse_array_iterator notification_it = data.rbeginArray();
+		notification_it != data.rendArray();
 		++notification_it)
 	{
 		LLSD notification_params = *notification_it;
@@ -136,8 +143,16 @@ void LLPersistentNotificationStorage::loadNotifications()
 			// hide saved toasts so they don't confuse the user
 			notification_channel->hideToast(notification->getID());
 		}
+		++processed_notifications;
+		if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
+		{
+			llwarns << "Too many persistent notifications."
+					<< " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << llendl;
+		    break;
+		}
 	}
-
+	LLNotifications::instance().getChannel("Persistent")->
+			connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
 	LL_INFOS("LLPersistentNotificationStorage") << "finished loading notifications" << LL_ENDL;
 }
 
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 91a98792eb56b3dd0e529db8c3dce9e9d1e4d916..1ed48a978fffa2693494b8e55221b0d4c8340e9f 100755
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -36,6 +36,7 @@
 #include "llfilepicker.h"
 #include "llfloaterreg.h"
 #include "llimagetga.h"
+#include "llimagepng.h"
 #include "llinventory.h"
 #include "llnotificationsutil.h"
 #include "llresmgr.h"
@@ -261,7 +262,7 @@ void LLPreviewTexture::saveAs()
 
 	LLFilePicker& file_picker = LLFilePicker::instance();
 	const LLInventoryItem* item = getItem() ;
-	if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGA, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) )
+	if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGAPNG, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) )
 	{
 		// User canceled or we failed to acquire save file.
 		return;
@@ -358,14 +359,27 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
 
 	if( self && final && success )
 	{
-		LLPointer<LLImageTGA> image_tga = new LLImageTGA;
-		if( !image_tga->encode( src ) )
+		const U32 ext_length = 3;
+		std::string extension = self->mSaveFileName.substr( self->mSaveFileName.length() - ext_length);
+
+		// We only support saving in PNG or TGA format
+		LLPointer<LLImageFormatted> image;
+		if(extension == "png")
+		{
+			image = new LLImagePNG;
+		}
+		else if(extension == "tga")
+		{
+			image = new LLImageTGA;
+		}
+
+		if( image && !image->encode( src, 0 ) )
 		{
 			LLSD args;
 			args["FILE"] = self->mSaveFileName;
 			LLNotificationsUtil::add("CannotEncodeFile", args);
 		}
-		else if( !image_tga->save( self->mSaveFileName ) )
+		else if( image && !image->save( self->mSaveFileName ) )
 		{
 			LLSD args;
 			args["FILE"] = self->mSaveFileName;
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index 09e799e4f741b11f4968aaa58579cb626906162c..cbd8bee9d5733e7706b5273a890cdf2a747663d2 100755
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -51,7 +51,7 @@ LLSceneView::LLSceneView(const LLRect& rect)
 	setCanClose(true);
 }
 
-void LLSceneView::onClickCloseBtn()
+void LLSceneView::onClickCloseBtn(bool)
 {
 	setVisible(false);
 }
diff --git a/indra/newview/llsceneview.h b/indra/newview/llsceneview.h
index 2a3a14bbee45571dd6dee59bc3ab2633dfa7a380..1fceecb9e1a9efe975ff3574588c5f8805bfb6c9 100755
--- a/indra/newview/llsceneview.h
+++ b/indra/newview/llsceneview.h
@@ -38,7 +38,7 @@ class LLSceneView : public LLFloater
 	virtual void draw();
 	
 protected:
-	virtual void onClickCloseBtn();
+	virtual void onClickCloseBtn(bool app_qutting = false);
 
 
 };
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 8915bb2fef789c78f5c9c4a88dd178d987381f17..cbf43dbb937c522f51eaf32ee6712262b8188bea 100755
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -397,7 +397,7 @@ void LLSidepanelInventory::onToggleInboxBtn()
 void LLSidepanelInventory::onOpen(const LLSD& key)
 {
 	LLFirstUse::newInventory(false);
-
+	mPanelMainInventory->setFocusFilterEditor();
 #if AUTO_EXPAND_INBOX
 	// Expand the inbox if we have fresh items
 	LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index ad7c939728fe36b668a7f4d8283c13223a0289f4..9be6d0c5f1a8242920dba7885f1731eebf5e8eaa 100755
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -1170,6 +1170,10 @@ void LLSidepanelTaskInfo::doClickAction(U8 click_action)
 			// Warn, but do it anyway.
 			LLNotificationsUtil::add("ClickActionNotPayable");
 		}
+		else
+		{
+			handle_give_money_dialog();
+		}
 	}
 	LLSelectMgr::getInstance()->selectionSetClickAction(click_action);
 }
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index d7ae897604da1873c355de50174ddd5a158845a7..2c83f6d0b707f1f0ecd5f9e455cfb89d1adc54cd 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -89,28 +89,17 @@ class LLOcclusionQueryPool : public LLGLNamePool
 public:
 	LLOcclusionQueryPool()
 	{
-		mCurQuery = 1;
+		
 	}
 
 protected:
 
-	std::list<GLuint> mAvailableName;
-	GLuint mCurQuery;
-		
 	virtual GLuint allocateName()
 	{
 		GLuint ret = 0;
 
-		if (!mAvailableName.empty())
-		{
-			ret = mAvailableName.front();
-			mAvailableName.pop_front();
-		}
-		else
-		{
-			ret = mCurQuery++;
-		}
-
+		glGenQueriesARB(1, &ret);
+	
 		return ret;
 	}
 
@@ -119,8 +108,7 @@ class LLOcclusionQueryPool : public LLGLNamePool
 #if LL_TRACK_PENDING_OCCLUSION_QUERIES
 		LLSpatialGroup::sPendingQueries.erase(name);
 #endif
-		llassert(std::find(mAvailableName.begin(), mAvailableName.end(), name) == mAvailableName.end());
-		mAvailableName.push_back(name);
+		glDeleteQueriesARB(1, &name);
 	}
 };
 
@@ -1580,7 +1568,7 @@ void LLSpatialGroup::checkOcclusion()
 			{
 				glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
 
-				static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion");
+				static LLCachedControl<bool> wait_for_query(gSavedSettings, "RenderSynchronousOcclusion", true);
 
 				if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount)
 				{ //query was issued last frame, wait until it's available
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 6173e76a35163ce13213ca3e4757f94fc12adc21..def26b3885e5c54aa3465abc49de061cb57c7893 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1270,7 +1270,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 
 	if (mState == LOAD_FROM_NETWORK)
 	{
-		static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP");
+		static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP", true);
 
 // 		if (mHost != LLHost::invalid) get_url = false;
 		if ( use_http && mCanUseHTTP && mUrl.empty())//get http url.
@@ -1697,7 +1697,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 	
 	if (mState == DECODE_IMAGE)
 	{
-		static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
+		static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled", false);
 
 		setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
 		if (textures_decode_disabled)
@@ -1873,9 +1873,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
 // virtual
 void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response)
 {
-	static LLCachedControl<bool> log_to_viewer_log(gSavedSettings, "LogTextureDownloadsToViewerLog");
-	static LLCachedControl<bool> log_to_sim(gSavedSettings, "LogTextureDownloadsToSimulator");
-	static LLCachedControl<bool> log_texture_traffic(gSavedSettings, "LogTextureNetworkTraffic") ;
+	static LLCachedControl<bool> log_to_viewer_log(gSavedSettings, "LogTextureDownloadsToViewerLog", false);
+	static LLCachedControl<bool> log_to_sim(gSavedSettings, "LogTextureDownloadsToSimulator", false);
+	static LLCachedControl<bool> log_texture_traffic(gSavedSettings, "LogTextureNetworkTraffic", false) ;
 
 	LLMutexLock lock(&mWorkMutex);										// +Mw
 
@@ -2876,7 +2876,7 @@ void LLTextureFetch::commonUpdate()
 //virtual
 S32 LLTextureFetch::update(F32 max_time_ms)
 {
-	static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS");
+	static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS", 500.0);
 
 	{
 		mNetworkQueueMutex.lock();										// +Mfnq
@@ -3099,8 +3099,8 @@ void LLTextureFetch::sendRequestListToSimulators()
 // 				llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
 // 						<< " Packet: " << packet << " Priority: " << req->mImagePriority << llendl;
 
-				static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
-				static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
+				static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog", false);
+				static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator", false);
 				if (log_to_viewer_log || log_to_sim)
 				{
 					mTextureInfo.setRequestStartTime(req->mID, LLTimer::getTotalTime());
@@ -3359,8 +3359,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
 
 	if (packet_num >= (worker->mTotalPackets - 1))
 	{
-		static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
-		static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
+		static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog", false);
+		static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator", false);
 
 		if (log_to_viewer_log || log_to_sim)
 		{
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index d876c9a3f4b8614ae7fb8575a79abf57ceedc2c3..448fae48de4ef8548e09803d139d0038167c31d7 100755
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -555,7 +555,7 @@ BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
 		mHideBtnPressed = mHideBtn->getRect().pointInRect(x, y);
 	}
 
-	return LLFloater::handleMouseDown(x, y, mask);
+	return LLModalDialog::handleMouseDown(x, y, mask);
 }
 
 //--------------------------------------------------------------------------
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 3f75f8da5e0212e88c034b37f367c87947e5b452..6083210080f9496f03c9db5efd037d30e2658bde 100755
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -492,7 +492,7 @@ void LLToastAlertPanel::draw()
 	}
 
 	static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
-	static LLUICachedControl<S32> shadow_lines ("DropShadowFloater");
+	static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 5);
 
 	gl_drop_shadow( 0, LLToastPanel::getRect().getHeight(), LLToastPanel::getRect().getWidth(), 0,
 		shadow_color, shadow_lines);
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 94d07b37effa3f2b57945876d910b789813b77a1..3a41bf28b4710fca52a56459b9cb9059f22db4e5 100755
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -407,6 +407,28 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
 	}
 }
 
+bool LLToastNotifyPanel::isControlPanelEnabled() const
+{
+	bool cp_enabled = mControlPanel->getEnabled();
+	bool some_buttons_enabled = false;
+	if (cp_enabled)
+	{
+		LLView::child_list_const_iter_t child_it = mControlPanel->beginChild();
+		LLView::child_list_const_iter_t child_it_end = mControlPanel->endChild();
+		for(; child_it != child_it_end; ++child_it)
+		{
+			LLButton * buttonp = dynamic_cast<LLButton *>(*child_it);
+			if (buttonp && buttonp->getEnabled())
+			{
+				some_buttons_enabled = true;
+				break;
+			}
+		}
+	}
+
+	return cp_enabled && some_buttons_enabled;
+}
+
 //////////////////////////////////////////////////////////////////////////
 
 LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */,
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
index d02171b512c3bc91cfad83a7ad25436fa51d979a..fe7f1cf8f3a91e2708c4cead95019f584bbd04f9 100755
--- a/indra/newview/lltoastnotifypanel.h
+++ b/indra/newview/lltoastnotifypanel.h
@@ -69,6 +69,8 @@ class LLToastNotifyPanel: public LLToastPanel, public LLInstanceTracker<LLToastN
 
 	virtual void updateNotification() {}
 
+	bool isControlPanelEnabled() const;
+
 protected:
 	LLButton* createButton(const LLSD& form_element, BOOL is_option);
 
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index a30f8419806e89e1840f3d3fe4ccd858f3cf1c1d..e1b764a9438c541f142126bf9c2dd04fde1b0cab 100755
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -52,6 +52,12 @@ std::string LLToastPanel::getTitle()
 	return mNotification->getMessage();
 }
 
+//virtual
+const std::string& LLToastPanel::getNotificationName()
+{
+	return mNotification->getName();
+}
+
 //virtual
 const LLUUID& LLToastPanel::getID()
 {
diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h
index e4ab95007e521c104a1ca47f0839000112613a32..51630381f2118ff899b298484a1cc80d21df40d4 100755
--- a/indra/newview/lltoastpanel.h
+++ b/indra/newview/lltoastpanel.h
@@ -45,6 +45,7 @@ class LLToastPanel : public LLPanel {
 	virtual ~LLToastPanel() = 0;
 
 	virtual std::string getTitle();
+	virtual const std::string& getNotificationName();
 	virtual const LLUUID& getID();
 
 	static const S32 MIN_PANEL_HEIGHT;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index ef7d0cd81bb13dfd514bc3a526d83c0a38156a45..1a137f7129d5326ad66b5262b7f6b4bd7f20da14 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -355,7 +355,7 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y)
 
 BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y)
 {
-	static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold");
+	static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3);
 	
 	S32 mouse_delta_x = x - mDragStartX;
 	S32 mouse_delta_y = y - mDragStartY;
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index f6e840adcd803988264a97bd9c9c8f2b29b1ef81..aeeb591d55f31d33bcb863133970567defed02b2 100755
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -919,7 +919,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
 		{
 			if (i == X_I || i == Y_I || i == Z_I)
 			{
-				static LLCachedControl<F32> build_mode_scale(gSavedSettings,"FlycamBuildModeScale");
+				static LLCachedControl<F32> build_mode_scale(gSavedSettings,"FlycamBuildModeScale", 1.0);
 				cur_delta[i] *= build_mode_scale;
 			}
 		}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 2df028de69c098fcf3f58c64c4c0f316b62fa332..fd98e0fd3ee76d488113badca69d6179c2ee09e9 100755
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3758,18 +3758,18 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
 	// If it is attached to an avatar and the pref is off, we shouldn't show it
 	if (attached_to_another_avatar)
 	{
-		static LLCachedControl<bool> show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING);
+		static LLCachedControl<bool> show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING, false);
 		return show_media_on_others;
 	}
 	if (inside_parcel)
 	{
-		static LLCachedControl<bool> show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING);
+		static LLCachedControl<bool> show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING, true);
 
 		return show_media_within_parcel;
 	}
 	else 
 	{
-		static LLCachedControl<bool> show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING);
+		static LLCachedControl<bool> show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING, true);
 
 		return show_media_outside_parcel;
 	}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index c38af1f990b733346b83ed6fa2773d79cfaa770e..6bc480f0edb18f934af639baf0e9341b62b089b9 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -45,6 +45,7 @@
 #include "llsd.h"
 #include "llsdserialize.h"
 #include "llteleportflags.h"
+#include "lltoastnotifypanel.h"
 #include "lltransactionflags.h"
 #include "llvfile.h"
 #include "llvfs.h"
@@ -3216,7 +3217,20 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			payload["online"] = (offline == IM_ONLINE);
 			payload["sender"] = msg->getSender().getIPandPort();
 
-			if (is_muted)
+			bool add_notification = true;
+			for (LLToastNotifyPanel::instance_iter ti(LLToastNotifyPanel::beginInstances())
+				, tend(LLToastNotifyPanel::endInstances()); ti != tend; ++ti)
+			{
+				LLToastNotifyPanel& panel = *ti;
+				const std::string& notification_name = panel.getNotificationName();
+				if (notification_name == "OfferFriendship" && panel.isControlPanelEnabled())
+				{
+					add_notification = false;
+					break;
+				}
+			}
+
+			if (is_muted && add_notification)
 			{
 				LLNotifications::instance().forceResponse(LLNotification::Params("OfferFriendship").payload(payload), 1);
 			}
@@ -3227,18 +3241,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 					send_do_not_disturb_message(msg, from_id);
 				}
 				args["NAME_SLURL"] = LLSLURL("agent", from_id, "about").getSLURLString();
-				if(message.empty())
-				{
-					//support for frienship offers from clients before July 2008
-				        LLNotificationsUtil::add("OfferFriendshipNoMessage", args, payload);
-				}
-				else
+
+				if (add_notification)
 				{
-					args["[MESSAGE]"] = message;
-				    LLNotification::Params params("OfferFriendship");
-				    params.substitutions = args;
-				    params.payload = payload;
-				    LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
+					if(message.empty())
+					{
+						//support for frienship offers from clients before July 2008
+						LLNotificationsUtil::add("OfferFriendshipNoMessage", args, payload);
+					}
+					else
+					{
+						args["[MESSAGE]"] = message;
+						LLNotification::Params params("OfferFriendship");
+						params.substitutions = args;
+						params.payload = payload;
+						LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
+					}
 				}
 			}
 		}
@@ -3804,19 +3822,6 @@ class LLFetchInWelcomeArea : public LLInventoryFetchDescendentsObserver
 				LLInventoryModel::EXCLUDE_TRASH,
 				is_card);
 		}
-		LLSD args;
-		if ( land_items.count() > 0 )
-		{	// Show notification that they can now teleport to landmarks.  Use a random landmark from the inventory
-			S32 random_land = ll_rand( land_items.count() - 1 );
-			args["NAME"] = land_items[random_land]->getName();
-			LLNotificationsUtil::add("TeleportToLandmark",args);
-		}
-		if ( card_items.count() > 0 )
-		{	// Show notification that they can now contact people.  Use a random calling card from the inventory
-			S32 random_card = ll_rand( card_items.count() - 1 );
-			args["NAME"] = card_items[random_card]->getName();
-			LLNotificationsUtil::add("TeleportToPerson",args);
-		}
 
 		gInventory.removeObserver(this);
 		delete this;
@@ -4093,18 +4098,6 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
 
 		if (isAgentAvatarValid())
 		{
-			// Chat the "back" SLURL. (DEV-4907)
-
-			LLSLURL slurl;
-			gAgent.getTeleportSourceSLURL(slurl);
-			LLSD substitution = LLSD().with("[T_SLURL]", slurl.getSLURLString());
-			std::string completed_from = LLAgent::sTeleportProgressMessages["completed_from"];
-			LLStringUtil::format(completed_from, substitution);
-
-			LLSD args;
-			args["MESSAGE"] = completed_from;
-			LLNotificationsUtil::add("SystemMessageTip", args);
-
 			// Set the new position
 			gAgentAvatarp->setPositionAgent(agent_pos);
 			gAgentAvatarp->clearChat();
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 678f24fb3c14c01db222b14bdbb1e2660fec8e9c..51f63e00181f42bcb1193d7bb400722011b262fc 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -232,6 +232,7 @@ class BaseCapabilitiesComplete : public LLHTTPClient::Responder
 		if( mID != regionp->getHttpResponderID() ) // region is no longer referring to this responder
 		{
 			LL_WARNS2("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
+			regionp->failedSeedCapability();
 			return ;
 		}
 
@@ -301,17 +302,12 @@ class BaseCapabilitiesCompleteTracker :  public LLHTTPClient::Responder
 		
 		if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() )
 		{
-			llinfos << "BaseCapabilitiesCompleteTracker " << "sim " << regionp->getName()
-				<< " sent duplicate seed caps that differs in size - most likely content. " 
-				<< (S32) regionp->getRegionImpl()->mCapabilities.size() << " vs " << regionp->getRegionImpl()->mSecondCapabilitiesTracker.size()
-				<< llendl;
-
+			llinfos<<"BaseCapabilitiesCompleteTracker "<<"Sim sent duplicate seed caps that differs in size - most likely content."<<llendl;			
 			//todo#add cap debug versus original check?
-			/*
-			CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
+			/*CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
 			while (iter!=regionp->getRegionImpl()->mCapabilities.end() )
 			{
-				llinfos << "BaseCapabilitiesCompleteTracker Original " << iter->first << " " << iter->second<<llendl;
+				llinfos<<"BaseCapabilitiesCompleteTracker Original "<<iter->first<<" "<< iter->second<<llendl;
 				++iter;
 			}
 			*/
@@ -399,9 +395,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
 	mImpl->mObjectPartition.push_back(new LLBridgePartition());	//PARTITION_BRIDGE
 	mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
 	mImpl->mObjectPartition.push_back(NULL);						//PARTITION_NONE
-
-	mRenderInfoRequestTimer.resetWithExpiry(0.f);		// Set timer to be expired
-	setCapabilitiesReceivedCallback(boost::bind(&LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer, _1));
 }
 
 
@@ -1586,7 +1579,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
 	capabilityNames.append("AgentState");
 	capabilityNames.append("AttachmentResources");
 	capabilityNames.append("AvatarPickerSearch");
-	capabilityNames.append("AvatarRenderInfo");
 	capabilityNames.append("CharacterProperties");
 	capabilityNames.append("ChatSessionRequest");
 	capabilityNames.append("CopyInventoryFromNotecard");
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 50f0a5f1af7e4673585f250b7b16bbab88530943..553f6a2d5993ad2b10986137ca7d7efebdf8bc8a 100755
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -461,7 +461,7 @@ void LLViewerShaderMgr::setShaders()
 		S32 deferred_class = 0;
 		S32 transform_class = gGLManager.mHasTransformFeedback ? 1 : 0;
 
-		static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
+		static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback", false);
 		if (!use_transform_feedback)
 		{
 			transform_class = 0;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 84f66c359fbda3ebcdb3eb8cc54331f97731718e..693eca8a061ba89c39022dfd346a126565e817f8 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1422,7 +1422,7 @@ void LLViewerFetchedTexture::processTextureStats()
 	{
 		updateVirtualSize() ;
 		
-		static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
+		static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
 		
 		if (textures_fullres)
 		{
@@ -1747,9 +1747,9 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
 
 bool LLViewerFetchedTexture::updateFetch()
 {
-	static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
-	static LLCachedControl<F32>  sCameraMotionThreshold(gSavedSettings,"TextureCameraMotionThreshold");
-	static LLCachedControl<S32>  sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost");
+	static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled", false);
+	static LLCachedControl<F32>  sCameraMotionThreshold(gSavedSettings,"TextureCameraMotionThreshold", 0.2);
+	static LLCachedControl<S32>  sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost", 3);
 	if(textures_decode_disabled)
 	{
 		return false ;
@@ -2828,7 +2828,7 @@ void LLViewerLODTexture::processTextureStats()
 {
 	updateVirtualSize() ;
 	
-	static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
+	static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
 	
 	if (textures_fullres)
 	{
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 2efe4665fa393fc0bea784a5fa525cf82e5f9fac..783d1f220226e005091ffcbb96fb694f57214775 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -500,7 +500,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
 												   LLGLenum primary_format,
 												   LLHost request_from_host)
 {
-	static LLCachedControl<bool> fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled");
+	static LLCachedControl<bool> fast_cache_fetching_enabled(gSavedSettings, "FastCacheFetchEnabled", true);
 
 	LLPointer<LLViewerFetchedTexture> imagep ;
 	switch(texture_type)
@@ -1373,7 +1373,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
 // static
 void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_data)
 {
-	static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
+	static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
 
 	LLFastTimer t(FTM_PROCESS_IMAGES);
 	
@@ -1445,7 +1445,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
 // static
 void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_data)
 {
-	static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
+	static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
 
 	LLFastTimer t(FTM_PROCESS_IMAGES);
 	
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index bf11bce3da2860993963675ff1e4a92853e6183c..54cf7cf28d240818aef8347f9ffd6d0e6c594876 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -313,7 +313,7 @@ class LLDebugText
 
 	void update()
 	{
-		static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
+		static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic", false) ;
 
 		std::string wind_vel_text;
 		std::string wind_vector_text;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d449efb7e74f1dba07cba2deb803177eda844f0a..6d29919784523b91f2426e6c741243aed2b7e9ae 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -707,7 +707,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mVisualComplexityStale(TRUE),
 	mLoadedCallbacksPaused(FALSE),
 	mHasPelvisOffset( FALSE ),
-	mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")),
+	mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
 	mLastRezzedStatus(-1),
 	mIsEditingAppearance(FALSE),
 	mUseLocalAppearance(FALSE),
@@ -934,7 +934,7 @@ void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
 		}
 		if (mBakedTextureDatas[i].mMaskTexName)
 		{
-			LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName));
+			LLImageGL::deleteTextures(1, (GLuint*)&(mBakedTextureDatas[i].mMaskTexName));
 			mBakedTextureDatas[i].mMaskTexName = 0 ;
 		}
 	}
@@ -2707,8 +2707,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
 				LLFontGL::getFontSansSerifSmall());
 		}
 
-		static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames");
-		static LLUICachedControl<bool> show_usernames("NameTagShowUsernames");
+		static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames", true);
+		static LLUICachedControl<bool> show_usernames("NameTagShowUsernames", true);
 
 		if (LLAvatarName::useDisplayNames())
 		{
@@ -2934,7 +2934,7 @@ void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
 
 LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
 {
-	static LLUICachedControl<bool> show_friends("NameTagShowFriends");
+	static LLUICachedControl<bool> show_friends("NameTagShowFriends", false);
 	const char* color_name;
 	if (show_friends && is_friend)
 	{
@@ -2989,7 +2989,7 @@ bool LLVOAvatar::isVisuallyMuted()
 
 	if (!isSelf())
 	{
-		static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions");
+		static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions", 0);
 		if (render_auto_mute_functions)		// Hacky debug switch for developing feature
 		{
 			// Priority order (highest priority first)
@@ -3001,9 +3001,9 @@ bool LLVOAvatar::isVisuallyMuted()
 			//       - AND aren't over the thresholds
 			// * otherwise visually mute all other avatars
 
-			static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit");
-			static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit");
-			static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit");
+			static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
+			static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0.0);
+			static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
 
 			if (mVisuallyMuteSetting == ALWAYS_VISUAL_MUTE)
 			{	// Always want to see this AV as an impostor
@@ -3390,8 +3390,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 
 			LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
 
-			static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow");
-			static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast");
+			static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
+			static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
 
 			F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
 						
@@ -5521,7 +5521,10 @@ void LLVOAvatar::addChild(LLViewerObject *childp)
 	LLViewerObject::addChild(childp);
 	if (childp->mDrawable)
 	{
-		attachObject(childp);
+		if (!attachObject(childp))
+		{
+			mPendingAttachment.push_back(childp);
+		}
 	}
 	else
 	{
@@ -5555,7 +5558,21 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
 	if (!attachment)
 	{
 		llwarns << "Object attachment point invalid: " << attachmentID << llendl;
-		attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
+
+		for (int i = 0; i < 15 && !attachment; i++)
+		{
+			attachment = get_if_there(mAttachmentPoints, i, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
+
+			if (attachment)
+			{
+				llwarns << "Object attachment point falling back to : " << i << llendl;
+			}
+		}
+		
+		if (!attachment)
+		{
+			llerrs << "Could not find any object attachment point for: " << attachmentID << llendl;
+		}
 	}
 
 	return attachment;
@@ -5628,7 +5645,10 @@ void LLVOAvatar::lazyAttach()
 	{
 		if (mPendingAttachment[i]->mDrawable)
 		{
-			attachObject(mPendingAttachment[i]);
+			if (!attachObject(mPendingAttachment[i]))
+			{
+				still_pending.push_back(mPendingAttachment[i]);
+			}
 		}
 		else
 		{
@@ -7272,7 +7292,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
 			}
 
 			U32 gl_name;
-			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_ALPHA8, 1, &gl_name );
+			LLImageGL::generateTextures(1, &gl_name );
 			stop_glerror();
 
 			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, gl_name);
@@ -7309,7 +7329,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
 						maskData->mLastDiscardLevel = discard_level;
 						if (self->mBakedTextureDatas[baked_index].mMaskTexName)
 						{
-							LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, &(self->mBakedTextureDatas[baked_index].mMaskTexName));
+							LLImageGL::deleteTextures(1, &(self->mBakedTextureDatas[baked_index].mMaskTexName));
 						}
 						self->mBakedTextureDatas[baked_index].mMaskTexName = gl_name;
 						found_texture_id = true;
@@ -7877,7 +7897,7 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d
 
 void LLVOAvatar::idleUpdateRenderCost()
 {
-	static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit");
+	static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
 	static const U32 ARC_LIMIT = 20000;
 
 	if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES))
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 15628d5ab2a85e66e06b6002a3edfe6a0d61639f..9ce99444d9647e216699b11d2c0a530ea81e1b9c 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -3066,7 +3066,7 @@ void LLVOAvatarSelf::deleteScratchTextures()
 		 namep; 
 		 namep = sScratchTexNames.getNextData() )
 	{
-		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, 0, -1, 1, (U32 *)namep );
+		LLImageGL::deleteTextures(1, (U32 *)namep );
 		stop_glerror();
 	}
 
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index af55c8f741ad800fba5c576def69a47daca9b7e7..815965fb0a7d495152b48350d1a0e9ead77f8bf7 100755
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -113,8 +113,8 @@ LLVoiceClient::LLVoiceClient()
 	:
 	mVoiceModule(NULL),
 	m_servicePump(NULL),
-	mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled")),
-	mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault")),
+	mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled", true)),
+	mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault", "00000000-0000-0000-0000-000000000000")),
 	mPTTDirty(true),
 	mPTT(true),
 	mUsePTT(true),
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index ff73aa5354569809fb46ae6731692e762a0307c2..9497041482b6253823d11c69ba867aa437e9dd4a 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -786,7 +786,6 @@ void LLVivoxVoiceClient::stateMachine()
 						{
 							loglevel = "0";	// turn logging off completely
 						}
-						loglevel = "0";	// turn logging off completely
 						params.args.add("-ll");
 						params.args.add(loglevel);
 						params.cwd = gDirUtilp->getAppRODataDir();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d9efd23b436c72b702a5a995337de768adfc2f70..17efc5482b887ae97dbb423a3531f645a1c2e02f 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -693,7 +693,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
 		}
 	}
 
-	static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable");
+	static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable", false);
 		
 	if (dont_load_textures || LLAppViewer::getTextureFetch()->mDebugPause) // || !mDrawable->isVisible())
 	{
@@ -1036,8 +1036,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
 			}
 		}
 
-
-		static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
+		static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback", false);
 
 		bool cache_in_vram = use_transform_feedback && gTransformPositionProgram.mProgramObject &&
 			(!mVolumeImpl || !mVolumeImpl->isVolumeUnique());
@@ -2618,7 +2617,6 @@ void LLVOVolume::setLightTextureID(LLUUID id)
 		if (hasLightTexture())
 		{
 			setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
-			parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
 			mLightTexture = NULL;
 		}
 	}		
@@ -2636,8 +2634,7 @@ void LLVOVolume::setSpotLightParams(LLVector3 params)
 		
 void LLVOVolume::setIsLight(BOOL is_light)
 {
-	BOOL was_light = getIsLight();
-	if (is_light != was_light)
+	if (is_light != getIsLight())
 	{
 		if (is_light)
 		{
@@ -2822,7 +2819,7 @@ void LLVOVolume::updateSpotLightPriority()
 bool LLVOVolume::isLightSpotlight() const
 {
 	LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
-	if (params && getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE))
+	if (params)
 	{
 		return params->isLightSpotlight();
 	}
@@ -3752,30 +3749,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
 			{
 				LLFace* face = mDrawable->getFace(face_hit);				
 
-				bool ignore_alpha = false;
-
-				const LLTextureEntry* te = face->getTextureEntry();
-				if (te)
-				{
-					LLMaterial* mat = te->getMaterialParams();
-					if (mat)
-					{
-						U8 mode = mat->getDiffuseAlphaMode();
-
-						if (mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE ||
-							mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE)
-						{
-							ignore_alpha = true;
-						}
-					}
-				}
-
 				if (face &&
-					(ignore_alpha ||
-					pick_transparent || 
-					!face->getTexture() || 
-					!face->getTexture()->hasGLTexture() || 
-					face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))))
+					(pick_transparent || !face->getTexture() || !face->getTexture()->hasGLTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))))
 				{
 					local_end = p;
 					if (face_hitp != NULL)
@@ -4460,6 +4435,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 
 	bool emissive = false;
 
+	
+
 	{
 		LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST);
 
@@ -5198,7 +5175,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
 
 	U32 buffer_usage = group->mBufferUsage;
 	
-	static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback");
+	static LLCachedControl<bool> use_transform_feedback(gSavedSettings, "RenderUseTransformFeedback", false);
 
 	if (use_transform_feedback &&
 		gTransformPositionProgram.mProgramObject && //transform shaders are loaded
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 7996f8a64005b31f6e1b3f58f93877639b46c7c5..103668d0510ce381d2daf42038b9d4698e9b56f7 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -140,6 +140,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
 {
 	llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
 	LLViewerRegion *regionp = getRegionFromHandle(region_handle);
+	std::string seedUrl;
 	if (regionp)
 	{
 		llinfos << "Region exists, removing it " << llendl;
@@ -161,6 +162,9 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
 			llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl;
 		}
 
+		// Save capabilities seed URL
+		seedUrl = regionp->getCapability("Seed");
+
 		// Kill the old host, and then we can continue on and add the new host.  We have to kill even if the host
 		// matches, because all the agent state for the new camera is completely different.
 		removeRegion(old_host);
@@ -188,6 +192,11 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
 		llerrs << "Unable to create new region!" << llendl;
 	}
 
+	if ( !seedUrl.empty() )
+	{
+		regionp->setCapability("Seed", seedUrl);
+	}
+
 	mRegionList.push_back(regionp);
 	mActiveRegionList.push_back(regionp);
 	mCulledRegionList.push_back(regionp);
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 5fa380e0e3a920e8ef6a726a4d5b196e089c38d0..fd9cdd95a325b200f70060e3be9432444902100d 100755
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -518,10 +518,17 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID&
 		case MAP_ITEM_LAND_FOR_SALE:		// land for sale
 		case MAP_ITEM_LAND_FOR_SALE_ADULT:	// adult land for sale 
 		{
+			F32 cost_per_sqm = 0.0f;
+			if ((F32)extra > 0)
+			{
+				cost_per_sqm = (F32)extra2 / (F32)extra;
+			}
+
 			static LLUIString tooltip_fmt = LLTrans::getString("worldmap_item_tooltip_format");
 
 			tooltip_fmt.setArg("[AREA]",  llformat("%d", extra));
 			tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2));
+			tooltip_fmt.setArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
 			new_item.setTooltip(tooltip_fmt.getString());
 
 			if (type == MAP_ITEM_LAND_FOR_SALE)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b0c73d03049aa0c7423ef5b04ded112b53346974..5da8a78b1b423ed43a30dc6e4007364297a4d64e 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1198,13 +1198,13 @@ void LLPipeline::releaseGLBuffers()
 	
 	if (mNoiseMap)
 	{
-		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mNoiseMap);
+		LLImageGL::deleteTextures(1, &mNoiseMap);
 		mNoiseMap = 0;
 	}
 
 	if (mTrueNoiseMap)
 	{
-		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 0, 1, &mTrueNoiseMap);
+		LLImageGL::deleteTextures(1, &mTrueNoiseMap);
 		mTrueNoiseMap = 0;
 	}
 
@@ -1229,7 +1229,7 @@ void LLPipeline::releaseLUTBuffers()
 {
 	if (mLightFunc)
 	{
-		LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_R16F, 0, 1, &mLightFunc);
+		LLImageGL::deleteTextures(1, &mLightFunc);
 		mLightFunc = 0;
 	}
 }
@@ -1323,7 +1323,7 @@ void LLPipeline::createGLBuffers()
 				noise[i].mV[2] = ll_frand()*scaler+1.f-scaler/2.f;
 			}
 
-			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mNoiseMap);
+			LLImageGL::generateTextures(1, &mNoiseMap);
 			
 			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap);
 			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false);
@@ -1339,7 +1339,7 @@ void LLPipeline::createGLBuffers()
 				noise[i] = ll_frand()*2.0-1.0;
 			}
 
-			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, GL_RGB16F_ARB, 1, &mTrueNoiseMap);
+			LLImageGL::generateTextures(1, &mTrueNoiseMap);
 			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap);
 			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false);
 			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
@@ -1452,7 +1452,7 @@ void LLPipeline::createLUTBuffers()
 			//
 			pix_format = GL_R32F;
 #endif
-			LLImageGL::generateTextures(LLTexUnit::TT_TEXTURE, pix_format, 1, &mLightFunc);
+			LLImageGL::generateTextures(1, &mLightFunc);
 			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
 			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false);
 			//LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 54f60f4441f309bdd2c391e0235cd597eaa68631..e4a78c12929bd8c80bff50946f271efb570cb68b 100755
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -152,6 +152,8 @@ with the same filename but different name
   <texture name="Command_Speak_Icon"        file_name="toolbar_icons/speak.png"        preload="true" />
   <texture name="Command_View_Icon"         file_name="toolbar_icons/view.png"         preload="true" />
   <texture name="Command_Voice_Icon"        file_name="toolbar_icons/nearbyvoice.png"  preload="true" />
+  <texture name="Command_Highlighting_Icon" file_name="toolbar_icons/highlighting.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+  <texture name="Command_Highlighting_Selected_Icon" file_name="toolbar_icons/highlighting_selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
   <texture name="Caret_Bottom_Icon"         file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" />
   <texture name="Caret_Right_Icon"          file_name="toolbar_icons/caret_right.png"  preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" />
   <texture name="Caret_Left_Icon"           file_name="toolbar_icons/caret_left.png"   preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" />
@@ -162,6 +164,7 @@ with the same filename but different name
   <texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
   <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
   <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+  <texture name="ComboButton_Hovered" file_name="widgets/ComboButton_Hover.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
 
   <texture name="Container" file_name="containers/Container.png" preload="false" />
 
diff --git a/indra/newview/skins/default/textures/toolbar_icons/highlighting.png b/indra/newview/skins/default/textures/toolbar_icons/highlighting.png
new file mode 100644
index 0000000000000000000000000000000000000000..c227f07513ee688479381592845d2a0979fe7455
Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/highlighting.png differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png b/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa1bb26a56bb19e4b4023fffb5bd9293ee634beb
Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png b/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png
new file mode 100644
index 0000000000000000000000000000000000000000..d492b30b4059aebf49ecd8d4daacbf5fb2c07eff
Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/ComboButton_Hover.png differ
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 1215efb7f96478c879bf0c70d9bfaa693d01abe9..b639d534c398ee04188f8f66bcf975545ff2b41a 100755
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -41,7 +41,7 @@
          auto_resize="false"
          user_resize="true"        
          name="conversations_layout_panel"
-         min_dim="38"
+         min_dim="43"
          expanded_min_dim="136">
             <layout_stack
              animate="false" 
@@ -100,7 +100,7 @@
                 <layout_panel
                  auto_resize="false"
                  name="conversations_pane_buttons_collapsed"
-                 width="31">
+                 width="36">
                     <button
                      follows="right|top"
                      height="25"
@@ -110,10 +110,10 @@
                      image_unselected="Toolbar_Middle_Off"
                      layout="topleft"
                      top="1"
-                     left="0"
+                     left="5"
                      name="expand_collapse_btn"
                      tool_tip="Collapse/Expand this list"
-                     width="31" />
+                     width="34" />
                 </layout_panel>
             </layout_stack>
             <panel
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index cea10adca8e8b182df6f9c18259bac5e39d70afe..4ba056f90463eb23cc6a4841d57f6119c8f66018 100755
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -125,11 +125,10 @@
       <icon
         name="media_secure_lock_flag"
         height="16"
-        follows="top|right"
         image_name="Lock2"
         layout="topleft"
-        left_delta="620"
-        top_delta="2"
+        left_delta="4"
+        top="2"
         visible="false" 
         tool_tip="Secured Browsing"
         width="16" />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
index 50910dff32437eba7156eaf03f2ca7aac9cfc720..77b9095f7cdf9996cc9e2506f662b2533f0b3912 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
@@ -17,7 +17,7 @@
          parameter="profile" />
     </menu_item_call>
     <menu_item_call
-     label="Send IM..."
+     label="IM"
      layout="topleft"
      name="Send IM">
         <menu_item_call.on_click
@@ -25,7 +25,26 @@
          parameter="im" />
     </menu_item_call>
     <menu_item_call
-     label="Add Friend..."
+     label="Offer teleport"
+     layout="topleft"
+     name="Offer Teleport">
+        <on_click function="AvatarIcon.Action" parameter="teleport"/>
+    </menu_item_call>
+    <menu_item_call
+     label="Voice call"
+     layout="topleft"
+     name="Voice Call">
+        <on_click function="AvatarIcon.Action" parameter="voice_call"/>
+    </menu_item_call>
+    <menu_item_call
+     label="Chat history..."
+     layout="topleft"
+     name="Chat History">
+        <on_click function="AvatarIcon.Action" parameter="chat_history"/>   
+    </menu_item_call>
+    <menu_item_separator layout="topleft" name="separator_chat_history"/>
+    <menu_item_call
+     label="Add friend"
      layout="topleft"
      name="Add Friend">
         <menu_item_call.on_click
@@ -33,11 +52,56 @@
          parameter="add" />
     </menu_item_call>
     <menu_item_call
-     label="Remove Friend..."
+     label="Remove friend"
      layout="topleft"
      name="Remove Friend">
         <menu_item_call.on_click
          function="AvatarIcon.Action"
          parameter="remove" />
     </menu_item_call>
+    <menu_item_call
+     label="Invite to group..."
+     layout="topleft"
+     name="Invite Group">
+      <on_click function="AvatarIcon.Action" parameter="invite_to_group" />   
+    </menu_item_call>
+    <menu_item_separator layout="topleft" name="separator_invite_to_group"/>
+    <menu_item_call
+     label="Zoom In"
+     layout="topleft"
+     name="Zoom In">
+      <on_click function="AvatarIcon.Action" parameter="zoom_in" />
+    </menu_item_call>
+    <menu_item_call
+     label="Map"
+     layout="topleft"
+     name="Map">
+       <on_click function="AvatarIcon.Action" parameter="map" />
+    </menu_item_call>
+    <menu_item_call
+     label="Share"
+     layout="topleft"
+     name="Share">
+       <on_click function="AvatarIcon.Action" parameter="share" />
+    </menu_item_call>
+    <menu_item_call
+     label="Pay"
+     layout="topleft"
+     name="Pay">
+       <on_click function="AvatarIcon.Action" parameter="pay" />
+    </menu_item_call>
+    <menu_item_check
+     label="Block Voice"
+     layout="topleft"
+     name="Block Unblock">
+       <on_click function="AvatarIcon.Action" parameter="block_unblock" />
+       <on_check function="AvatarIcon.Check" parameter="is_blocked" />
+    </menu_item_check>
+    <menu_item_check
+     label="Block Text"
+     layout="topleft"
+     name="Mute Text">
+       <on_click function="AvatarIcon.Action" parameter="mute_unmute" />
+       <on_check function="AvatarIcon.Check" parameter="is_muted" />   
+  </menu_item_check>
 </menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 2d65052def2b41e23e1475906c2db501e1c7b282..2ec0910aeaf8180698d5aef54392110c806acd0c 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1297,19 +1297,19 @@
      tear_off="true">
         <menu_item_call
          label="How to..."
-         name="How To">
+         name="How To"
+         shortcut="F1">
             <menu_item_call.on_click
              function="Help.ToggleHowTo"
              parameter="" />
         </menu_item_call>
         <menu_item_call
-         label="[SECOND_LIFE] Help"
-         name="Second Life Help"
-         shortcut="F1">
-            <menu_item_call.on_click
-             function="ShowHelp"
-             parameter="f1_help" />
-        </menu_item_call>
+           label="Quickstart"
+           name="Quickstart">
+        <menu_item_call.on_click
+            function="Advanced.ShowURL"
+            parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Quickstart/ta-p/1087919"/>
+        </menu_item_call>              
 <!--        <menu_item_call
          label="Tutorial"
          name="Tutorial">
@@ -1318,21 +1318,13 @@
              parameter="hud" />
         </menu_item_call>-->
 		<menu_item_separator/>
-		
-		<menu_item_call
-             label="User’s guide"
-             name="User’s guide">
-             <menu_item_call.on_click
-                 function="Advanced.ShowURL"
-                 parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/>
-        </menu_item_call>
-        <menu_item_call
-             label="Knowledge Base"
-             name="Knowledge Base">
-             <menu_item_call.on_click
-                 function="Advanced.ShowURL"
-                 parameter="http://community.secondlife.com/t5/tkb/communitypage"/>
-        </menu_item_call>
+      <menu_item_call
+           label="Knowledge Base"
+           name="Knowledge Base">
+        <menu_item_call.on_click
+            function="Advanced.ShowURL"
+            parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/>
+      </menu_item_call>
         <menu_item_call
              label="Wiki"
              name="Wiki">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 0b090ec2bcf351adba246fcccfdb0b1616b7bc40..9db926f7f1da8f765276823df400b909d0dc7282 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3481,7 +3481,7 @@ or you can install it now.
    name="DownloadBackgroundTip"
    type="notify">
 We have downloaded an update to your [APP_NAME] installation.
-Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
+Version [VERSION] [[INFO_URL] Information about this update]
     <tag>confirm</tag>
     <usetemplate
      name="okcancelbuttons"
@@ -3493,8 +3493,8 @@ Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
  icon="alertmodal.tga"
  name="DownloadBackgroundDialog"
  type="alertmodal">
-We have downloaded an update to your [APP_NAME] installation.
-Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
+    We have downloaded an update to your [APP_NAME] installation.
+    Version [VERSION] [[INFO_URL] Information about this update]
     <tag>confirm</tag>
     <usetemplate
      name="okcancelbuttons"
@@ -6309,12 +6309,21 @@ You can only claim public land in the Region you&apos;re in.
   <notification
    icon="notify.tga"
    name="RegionTPAccessBlocked"
-   persist="true"
+   persist="false"
    type="notify">
    <tag>fail</tag>
     The region you're trying to visit contains content exceeding your current preferences.  You can change your preferences using Me &gt; Preferences &gt; General.
   </notification>
 
+  <notification
+   icon="notify.tga"
+   name="RegionAboutToShutdown"
+   persist="false"
+   type="notify">
+    <tag>fail</tag>
+    The region you're trying to enter is about to shut down.
+  </notification>
+  
   <notification
 	icon="notify.tga"
 	name="URBannedFromRegion"
@@ -6841,7 +6850,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
    priority="high"
    sound="UISndAlert"
    type="notify">
-This region will restart in [MINUTES] minutes.
+The region "[NAME]" will restart in [MINUTES] minutes.
 If you stay in this region you will be logged out.
   </notification>
 
@@ -6851,7 +6860,7 @@ If you stay in this region you will be logged out.
    priority="high"
    sound="UISndAlert"
    type="notify">
-This region will restart in [SECONDS] seconds.
+The region "[NAME]" will restart in [SECONDS] seconds.
 If you stay in this region you will be logged out.
   </notification>
 
@@ -8734,11 +8743,11 @@ You are no longer allowed here and have [EJECT_TIME] seconds to leave.
 
   <notification
    icon="alertmodal.tga"
-   name="NoEnterServerFull"
+   name="NoEnterRegionMaybeFull"
    type="notify">
    <tag>fail</tag>
-You can't enter this region because 
-the server is full.
+You can't enter region "[NAME]".
+It may be full or restarting soon.
   </notification>
 
   <notification
@@ -9502,6 +9511,14 @@ Cannot attach object because you do not have permission to move it.
 Not enough script resources available to attach object!
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="CantAttachObjectBeingRemoved"
+   type="notify">
+    <tag>fail</tag>
+    Cannot attach object because it is already being removed.
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="CantDropItemTrialUser"
diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
index a054e71e34710eaa61d99e731fcf50397606a715..4372cf69bf208029e88c52361ea6e21d6c48cce5 100755
--- a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
@@ -11,7 +11,7 @@
      height="20"
      default_icon_name="Generic_Person"
      layout="topleft"
-     left="5"
+     left="9"
      top="2"
      visible="false"
      width="20" />
@@ -20,7 +20,7 @@
      height="20"
      default_icon_name="Generic_Group"
      layout="topleft"
-     left="5"
+     left="9"
      top="2"
      visible="false"
      width="20" />
@@ -29,9 +29,9 @@
      height="20"
      image_name="Nearby_chat_icon"
      layout="topleft"
-     left="5"
+     left="10"
      name="nearby_chat_icon"
-     top="2"
+     top="3"
      visible="false"
      width="20"/>
     <layout_stack
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 3edeb9aa3670b7e782b7afac5715e28633fbeb5c..c7edba21f85aa56e2ea2e084102ed0a56b7d3ef9 100755
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -87,6 +87,7 @@
 	         direction="down"
 	         height="23"
 	         image_overlay="Arrow_Left_Off"
+	         image_hover_unselected="PushButton_Over"
 	         image_bottom_pad="1"
 	         layout="topleft"
 	         left="10"
@@ -99,6 +100,7 @@
 	         direction="down"
 	         height="23"
 	         image_overlay="Arrow_Right_Off"
+	         image_hover_unselected="PushButton_Over"
 	         image_bottom_pad="1"
 	         layout="topleft"
 	         left_pad="0"
@@ -111,6 +113,7 @@
 	         height="23"
 	         image_bottom_pad="1"
 	         image_overlay="Home_Off"
+	         image_hover_unselected="PushButton_Over"
 	         layout="topleft"
 	         left_pad="7"
 	         name="home_btn"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index ed274d02337bd81253c674aaf23e7faa1dca6f08..d22cddb6019082e88a309f068fddf48d07c10cf8 100755
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -66,7 +66,8 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
      tab_position="top"
      top="0"
      halign="center"
-     right="-5">
+     right="-5"
+     use_highlighting_on_hover="true">
 
 <!-- ================================= NEARBY tab =========================== -->
 
@@ -483,7 +484,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
             <text
                 type="string"
                 length="1"
-                follows="all"
+                follows="left|top|right"
                 height="14"
                 layout="topleft"
                 right="-10"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 1507538501f5a6d42192f49e4d50635a52d2956a..83cff58d7cbf76036289e8b8f29244cef34e7e30 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -379,7 +379,7 @@ Please try logging in again in a minute.</string>
 	<!-- world map -->
 	<string name="texture_loading">Loading...</string>
 	<string name="worldmap_offline">Offline</string>
-	<string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE]</string>
+	<string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE] (L$[PRICE_PER_SQM]/m²)</string>
 	<string name="worldmap_results_none_found">None found.</string>
 
 	<!-- animations uploading status codes -->
@@ -448,6 +448,8 @@ Please try logging in again in a minute.</string>
 	<string name="load_file_verb">Load</string>
 	<string name="targa_image_files">Targa Images</string>
 	<string name="bitmap_image_files">Bitmap Images</string>
+	<string name="png_image_files">PNG Images</string>
+	<string name="save_texture_image_files">Targa or PNG Images</string>
 	<string name="avi_movie_file">AVI Movie File</string>
 	<string name="xaf_animation_file">XAF Anim File</string>
 	<string name="xml_file">XML File</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 61ec046649d85ddced12ac0f6810beb9a2af34a4..4ea1aa6efbef011e50aa451780be76313855d0fb 100755
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -150,6 +150,7 @@
   <combo_button
 		name="Location History"
                 label=""
+                image_hover_unselected="ComboButton_Hovered"
                 pad_right="0"/>
   <combo_list
 	      bg_writeable_color="MenuDefaultBgColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 0586119681a5cf16953c5bd056eec0a9e2b8298f..9559be214a56117ef6e2efe10afe12c3e45e6d32 100755
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -24,17 +24,26 @@ label_pad_left - padding to the left of tab button labels
                tab_bottom_image_unselected="Toolbar_Left_Off"
                tab_bottom_image_selected="Toolbar_Left_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
+               tab_top_image_hovered="TabTop_Left_Selected"
+               tab_button_image_hovered="Toolbar_Left_Selected"
+               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
   <middle_tab tab_top_image_unselected="TabTop_Middle_Off"
                tab_top_image_selected="TabTop_Middle_Selected"
                tab_bottom_image_unselected="Toolbar_Middle_Off"
                tab_bottom_image_selected="Toolbar_Middle_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
+               tab_top_image_hovered="TabTop_Middle_Selected"
+               tab_button_image_hovered="Toolbar_Middle_Selected"
+               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
   <last_tab tab_top_image_unselected="TabTop_Right_Off"
                tab_top_image_selected="TabTop_Right_Selected"
                tab_bottom_image_unselected="Toolbar_Right_Off"
                tab_bottom_image_selected="Toolbar_Right_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
+               tab_top_image_hovered="TabTop_Right_Selected"
+               tab_button_image_hovered="Toolbar_Right_Selected"
+               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
 </tab_container>