Commits

Kent Quirk  committed 2c132fa Merge

Merge from q/viewer-release to dessie/viewer-release for 2.1.1 beta 1

  • Participants
  • Parent commits ee6af1f, a2b52f8

Comments (0)

Files changed (204)

File doc/contributions.txt

File contents unchanged.

File indra/llcharacter/llmultigesture.cpp

 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepAnimation::getLabel() const 
 {
 	std::vector<std::string> strings;
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepSound::getLabel() const
 {
 	std::vector<std::string> strings;
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepChat::getLabel() const
 {
 	std::vector<std::string> strings;
 	dp.unpackU32(mFlags, "flags");
 	return TRUE;
 }
-// *TODO: Translate
+// *NOTE: result is translated in LLPreviewGesture::getLabel()
 std::vector<std::string> LLGestureStepWait::getLabel() const
 {
 	std::vector<std::string> strings;

File indra/llcommon/llformat.cpp

 
 #include <cstdarg>
 
-std::string llformat(const char *fmt, ...)
+// common used function with va_list argument
+// wrapper for vsnprintf to be called from llformatXXX functions.
+static void va_format(std::string& out, const char *fmt, va_list va)
 {
 	char tstr[1024];	/* Flawfinder: ignore */
-	va_list va;
-	va_start(va, fmt);
 #if LL_WINDOWS
 	_vsnprintf(tstr, 1024, fmt, va);
 #else
 	vsnprintf(tstr, 1024, fmt, va);	/* Flawfinder: ignore */
 #endif
+	out.assign(tstr);
+}
+
+std::string llformat(const char *fmt, ...)
+{
+	std::string res;
+	va_list va;
+	va_start(va, fmt);
+	va_format(res, fmt, va);
 	va_end(va);
-	return std::string(tstr);
+	return res;
 }
+
+std::string llformat_to_utf8(const char *fmt, ...)
+{
+	std::string res;
+	va_list va;
+	va_start(va, fmt);
+	va_format(res, fmt, va);
+	va_end(va);
+
+#if LL_WINDOWS
+	// made converting to utf8. See EXT-8318.
+	res = ll_convert_string_to_utf8_string(res);
+#endif
+	return res;
+}

File indra/llcommon/llformat.h

 
 std::string LL_COMMON_API llformat(const char *fmt, ...);
 
+// the same version as above but ensures that returned string is in utf8 on windows
+// to enable correct converting utf8_to_wstring.
+std::string LL_COMMON_API llformat_to_utf8(const char *fmt, ...);
+
 #endif // LL_LLFORMAT_H

File indra/llcommon/llmd5.cpp

 
 }
 
-
-
-
-
-
 // MD5 update for istreams.
 // Like update for files; see above.
 
 
 }
 
-
-
-
+void  LLMD5::update(const std::string& s)
+{
+	update((unsigned char *)s.c_str(),s.length());
+}
 
 // MD5 finalization. Ends an MD5 message-digest operation, writing the
 // the message digest and zeroizing the context.
 	finalize();
 }
 
-void LLMD5::raw_digest(unsigned char *s)
+void LLMD5::raw_digest(unsigned char *s) const
 {
 	if (!finalized)
 	{
 
 
 
-void LLMD5::hex_digest(char *s)
+void LLMD5::hex_digest(char *s) const
 {
 	int i;
 
 
 
 
+
 std::ostream& operator<<(std::ostream &stream, LLMD5 context)
 {
 	char s[33];		/* Flawfinder: ignore */
 	return stream;
 }
 
+bool operator==(const LLMD5& a, const LLMD5& b)
+{
+	unsigned char a_guts[16];
+	unsigned char b_guts[16];
+	a.raw_digest(a_guts);
+	b.raw_digest(b_guts);
+	if (memcmp(a_guts,b_guts,16)==0)
+		return true;
+	else
+		return false;
+}
 
-
+bool operator!=(const LLMD5& a, const LLMD5& b)
+{
+	return !(a==b);
+}
 
 // PRIVATE METHODS:
 
-
-
 void LLMD5::init(){
   finalized=0;  // we just started!
 
     output[i] = ((uint4)input[j]) | (((uint4)input[j+1]) << 8) |
       (((uint4)input[j+2]) << 16) | (((uint4)input[j+3]) << 24);
 }
+
+

File indra/llcommon/llmd5.h

   void  update     (const uint1 *input, const uint4 input_length);
   void  update     (std::istream& stream);
   void  update     (FILE *file);
+  void  update     (const std::string& str);
   void  finalize   ();
 
 // constructors for special circumstances.  All these constructors finalize
   LLMD5              (const unsigned char *string, const unsigned int number);
   
 // methods to acquire finalized result
-  void				raw_digest(unsigned char *array);	// provide 16-byte array for binary data
-  void				hex_digest(char *string);			// provide 33-byte array for ascii-hex string
+  void				raw_digest(unsigned char *array) const;	// provide 16-byte array for binary data
+  void				hex_digest(char *string) const;			// provide 33-byte array for ascii-hex string
+
   friend std::ostream&   operator<< (std::ostream&, LLMD5 context);
 
-
-
 private:
 
 
 
 };
 
+LL_COMMON_API bool operator==(const LLMD5& a, const LLMD5& b);
+LL_COMMON_API bool operator!=(const LLMD5& a, const LLMD5& b);
+
 #endif // LL_LLMD5_H

File indra/llcommon/llstring.cpp

 	}
 }
 
-std::string ll_convert_wide_to_string(const wchar_t* in)
+std::string ll_convert_wide_to_string(const wchar_t* in, unsigned int code_page)
 {
 	std::string out;
 	if(in)
 	{
 		int len_in = wcslen(in);
 		int len_out = WideCharToMultiByte(
-			CP_ACP,
+			code_page,
 			0,
 			in,
 			len_in,
 		if(pout)
 		{
 			WideCharToMultiByte(
-				CP_ACP,
+				code_page,
 				0,
 				in,
 				len_in,
 	}
 	return out;
 }
+
+wchar_t* ll_convert_string_to_wide(const std::string& in, unsigned int code_page)
+{
+	// From review:
+	// We can preallocate a wide char buffer that is the same length (in wchar_t elements) as the utf8 input,
+	// plus one for a null terminator, and be guaranteed to not overflow.
+
+	//	Normally, I'd call that sort of thing premature optimization,
+	// but we *are* seeing string operations taking a bunch of time, especially when constructing widgets.
+//	int output_str_len = MultiByteToWideChar(code_page, 0, in.c_str(), in.length(), NULL, 0);
+
+	// reserve place to NULL terminator
+	int output_str_len = in.length();
+	wchar_t* w_out = new wchar_t[output_str_len + 1];
+
+	memset(w_out, 0, output_str_len + 1);
+	int real_output_str_len = MultiByteToWideChar (code_page, 0, in.c_str(), in.length(), w_out, output_str_len);
+
+	//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858.
+	w_out[real_output_str_len] = 0;
+
+	return w_out;
+}
+
+std::string ll_convert_string_to_utf8_string(const std::string& in)
+{
+	wchar_t* w_mesg = ll_convert_string_to_wide(in, CP_ACP);
+	std::string out_utf8(ll_convert_wide_to_string(w_mesg, CP_UTF8));
+	delete[] w_mesg;
+
+	return out_utf8;
+}
 #endif // LL_WINDOWS
 
 long LLStringOps::sPacificTimeOffset = 0;

File indra/llcommon/llstring.h

  *
  * This replaces the unsafe W2A macro from ATL.
  */
-LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in);
+LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in, unsigned int code_page);
+
+/**
+ * Converts a string to wide string.
+ *
+ * It will allocate memory for result string with "new []". Don't forget to release it with "delete []".
+ */
+LL_COMMON_API wchar_t* ll_convert_string_to_wide(const std::string& in, unsigned int code_page);
+
+/**
+ * Converts incoming string into urf8 string
+ *
+ */
+LL_COMMON_API std::string ll_convert_string_to_utf8_string(const std::string& in);
 
 //@}
 #endif // LL_WINDOWS

File indra/llmessage/llcurl.cpp

 		responseCode = 499;
 		responseReason = strerror(code) + " : " + mErrorBuffer;
 	}
-		
-	if(responseCode >= 300 && responseCode < 400) //redirect
-	{
-		char new_url[512] ;
-		curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url);
-		responseReason = new_url ; //get the new URL.
-	}
 
 	if (mResponder)
 	{	
 	setopt(CURLOPT_HEADERFUNCTION, (void*)&curlHeaderCallback);
 	setopt(CURLOPT_HEADERDATA, (void*)this);
 
+	// Allow up to five redirects
+	if(responder && responder->followRedir())
+	{
+		setopt(CURLOPT_FOLLOWLOCATION, 1);
+		setopt(CURLOPT_MAXREDIRS, MAX_REDIRECTS);
+	}
+
 	setErrorBuffer();
 	setCA();
 
 	curl_global_cleanup();
 }
 
+const unsigned int LLCurl::MAX_REDIRECTS = 5;

File indra/llmessage/llcurl.h

 			// Used internally to set the url for debugging later.
 			void setURL(const std::string& url);
 
+			virtual bool followRedir() 
+			{
+				return false;
+			}
+
 	public: /* but not really -- don't touch this */
 		U32 mReferenceCount;
 
 private:
 	static std::string sCAPath;
 	static std::string sCAFile;
+	static const unsigned int MAX_REDIRECTS;
 };
 
 namespace boost

File indra/llrender/llimagegl.cpp

 {
 	if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D)
 	{
+		{
+			//check viewport
+			GLint vp[4] ;
+			glGetIntegerv(GL_VIEWPORT, vp) ;
+			llcallstacks << "viewport: " << vp[0] << " : " << vp[1] << " : " << vp[2] << " : " << vp[3] << llcallstacksendl ;
+		}
+
 		GLint texname;
 		glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
 		BOOL error = FALSE;
 		if (texname != mTexName)
 		{
+			llinfos << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << llendl;
+
 			error = TRUE;
 			if (gDebugSession)
 			{

File indra/llui/llaccordionctrl.cpp

 			}
 			return 0;
 		}
+		else if(str_action == "deselect_current")
+		{
+			// Reset selection to the currently selected tab.
+			if (mSelectedTab)
+			{
+				mSelectedTab->setSelected(false);
+				mSelectedTab = NULL;
+				return 1;
+			}
+			return 0;
+		}
 	}
 	else if (info.has("scrollToShowRect"))
 	{
 		mScrollbar->setDocPos(0);
 }
 
+void LLAccordionCtrl::expandDefaultTab()
+{
+	if (mAccordionTabs.size() > 0)
+	{
+		LLAccordionCtrlTab* tab = mAccordionTabs.front();
+
+		if (!tab->getDisplayChildren())
+		{
+			tab->setDisplayChildren(true);
+		}
+
+		for (size_t i = 1; i < mAccordionTabs.size(); ++i)
+		{
+			tab = mAccordionTabs[i];
+
+			if (tab->getDisplayChildren())
+			{
+				tab->setDisplayChildren(false);
+			}
+		}
+
+		arrange();
+	}
+}
+
 void LLAccordionCtrl::sort()
 {
 	if (!mTabComparator)

File indra/llui/llaccordionctrl.h

 	S32		notifyParent(const LLSD& info);
 
 	void	reset		();
+	void	expandDefaultTab();
 
 	void	setComparator(const LLTabComparator* comp) { mTabComparator = comp; }
 	void	sort();
 
 	const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; }
 
+	bool getFitParent() const {return mFitParent;}
+
 private:
 	void	initNoTabsWidget(const LLTextBox::Params& tb_params);
 	void	updateNoTabsHelpTextVisibility();

File indra/llui/llaccordionctrltab.cpp

 #include "linden_common.h"
 
 #include "llaccordionctrltab.h"
+#include "llaccordionctrl.h"
 
 #include "lllocalcliprect.h"
 #include "llscrollbar.h"
 	mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams);
 	addChild(mHeader, 1);
 
-	if (p.selection_enabled)
+	LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
+
+	if (!p.selection_enabled)
 	{
-		LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
+		LLFocusableElement::setFocusLostCallback(boost::bind(&LLAccordionCtrlTab::deselectOnFocusLost, this));
 	}
 
 	reshape(100, 200,FALSE);
 		getParent()->notifyParent(LLSD().with("action", "select_current"));
 }
 
+void LLAccordionCtrlTab::deselectOnFocusLost()
+{
+	if(getParent()) // A parent may not be set if tabs are added dynamically.
+	{
+		getParent()->notifyParent(LLSD().with("action", "deselect_current"));
+	}
+
+}
+
 S32 LLAccordionCtrlTab::getHeaderHeight()
 {
 	return mHeaderVisible?HEADER_HEIGHT:0; 
 				setRect(panel_rect);
 			}
 			
-			//LLAccordionCtrl should rearrange accodion tab if one of accordion change its size
+			//LLAccordionCtrl should rearrange accordion tab if one of accordion change its size
 			if (getParent()) // A parent may not be set if tabs are added dynamically.
 				getParent()->notifyParent(info);
 			return 1;
 			return 1;
 		}
 	}
+	else if (info.has("scrollToShowRect"))
+	{
+		LLAccordionCtrl* parent = dynamic_cast<LLAccordionCtrl*>(getParent());
+		if (parent && parent->getFitParent())
+		{
+			//	EXT-8285 ('No attachments worn' text appears at the bottom of blank 'Attachments' accordion)
+			//	The problem was in passing message "scrollToShowRect" IN LLAccordionCtrlTab::notifyParent
+			//	FROM child LLScrollContainer TO parent LLAccordionCtrl with "it_parent" set to true.
+
+			//	It is wrong notification for parent accordion which leads to recursive call of adjustContainerPanel
+			//	As the result of recursive call of adjustContainerPanel we got LLAccordionCtrlTab
+			//	that reshaped and re-sized with different rectangles.
+
+			//	LLAccordionCtrl has own scrollContainer and LLAccordionCtrlTab has own scrollContainer
+			//	both should handle own scroll container's event.
+			//	So, if parent accordion "fit_parent" accordion tab should handle its scroll container events itself.
+
+			return 1;
+		}
+	}
+
 	return LLUICtrl::notifyParent(info);
 }
 

File indra/llui/llaccordionctrltab.h

 	LLView* findContainerView	();
 
 	void selectOnFocusReceived();
+	void deselectOnFocusLost();
 
 private:
 

File indra/llui/llcheckboxctrl.cpp

 	// must be big enough to hold all children
 	setUseBoundingRect(TRUE);
 
-	// Label (add a little space to make sure text actually renders)
-	const S32 FUDGE = 10;
-	S32 text_width = mFont->getWidth( p.label ) + FUDGE;
-	S32 text_height = llround(mFont->getLineHeight());
-	LLRect label_rect;
-	label_rect.setOriginAndSize(
-		llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
-		llcheckboxctrl_vpad + 1, // padding to get better alignment
-		text_width + llcheckboxctrl_hpad,
-		text_height );
-
 	// *HACK Get rid of this with SL-55508... 
 	// this allows blank check boxes and radio boxes for now
 	std::string local_label = p.label;
 	}
 
 	LLTextBox::Params tbparams = p.label_text;
-	tbparams.rect(label_rect);
 	tbparams.initial_value(local_label);
 	if (p.font.isProvided())
 	{
 	mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
 	addChild(mLabel);
 
+	S32 text_width = mLabel->getTextBoundingRect().getWidth();
+	S32 text_height = llround(mFont->getLineHeight());
+	LLRect label_rect;
+	label_rect.setOriginAndSize(
+		llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
+		llcheckboxctrl_vpad + 1, // padding to get better alignment
+		text_width + llcheckboxctrl_hpad,
+		text_height );
+	mLabel->setShape(label_rect);
+
+
 	// Button
 	// Note: button cover the label by extending all the way to the right.
 	LLRect btn_rect;
 	static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
 	static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
 
-	const S32 FUDGE = 10;
-	S32 text_width = mFont->getWidth( mLabel->getText() ) + FUDGE;
+	S32 text_width = mLabel->getTextBoundingRect().getWidth();
 	S32 text_height = llround(mFont->getLineHeight());
 	LLRect label_rect;
 	label_rect.setOriginAndSize(
 		llcheckboxctrl_vpad,
 		text_width,
 		text_height );
-	mLabel->setRect(label_rect);
+	mLabel->setShape(label_rect);
 
 	LLRect btn_rect;
 	btn_rect.setOriginAndSize(
 		llcheckboxctrl_vpad,
 		llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
 		llmax( text_height, llcheckboxctrl_btn_size() ) );
-	mButton->setRect( btn_rect );
+	mButton->setShape( btn_rect );
 	
 	LLUICtrl::reshape(width, height, called_from_parent);
 }

File indra/llui/llflatlistview.cpp

 {
 	if (mNoItemsCommentTextbox)
 	{
-		if (visible)
-		{
-/*
-// *NOTE: MA 2010-02-04
-// Deprecated after params of the comment text box were moved into widget (flat_list_view.xml)
-// can be removed later if nothing happened.
-			// We have to update child rect here because of issues with rect after reshaping while creating LLTextbox
-			// It is possible to have invalid LLRect if Flat List is in LLAccordionTab
-			LLRect comment_rect = getLocalRect();
-
-			// To see comment correctly (EXT - 3244) in mNoItemsCommentTextbox we must get border width
-			// of LLFlatListView (@see getBorderWidth()) and stretch mNoItemsCommentTextbox to this width
-			// But getBorderWidth() returns 0 if LLFlatListView not visible. So we have to get border width
-			// from 'scroll_border'
-			LLViewBorder* scroll_border = getChild<LLViewBorder>("scroll border");
-			comment_rect.stretch(-scroll_border->getBorderWidth());
-			mNoItemsCommentTextbox->setRect(comment_rect);
-*/
-		}
-		mSelectedItemsBorder->setVisible(FALSE);
+		mSelectedItemsBorder->setVisible(!visible);
 		mNoItemsCommentTextbox->setVisible(visible);
 	}
 }

File indra/llui/llfloater.cpp

 	}
 }
 
+void LLFloater::destroy()
+{
+	// LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before
+	// it was deleted via LLMortician::updateClass(). See EXT-8458.
+	LLFloaterReg::removeInstance(mInstanceName, mKey);
+	die();
+}
+
 // virtual
 LLFloater::~LLFloater()
 {

File indra/llui/llfloater.h

 	BOOL			getAutoFocus() const { return mAutoFocus; }
 	LLDragHandle*	getDragHandle() const { return mDragHandle; }
 
-	void			destroy() { die(); } // Don't call this directly.  You probably want to call closeFloater()
+	void			destroy(); // Don't call this directly.  You probably want to call closeFloater()
 
 	virtual	void	onClickCloseBtn();
 

File indra/llui/llmenugl.cpp

 }
 
 //virtual
+LLSD LLMenuItemGL::getValue() const
+{
+	return getLabel();
+}
+
+//virtual
 BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask)
 {
 	if( getEnabled() && (!gKeyboard->getKeyRepeated(key) || mAllowKeyRepeat) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) )

File indra/llui/llmenugl.h

 
 	// LLUICtrl overrides
 	/*virtual*/ void setValue(const LLSD& value);
+	/*virtual*/ LLSD getValue() const;
 
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
 

File indra/llui/llnotifications.cpp

 LLSD LLNotification::asLLSD()
 {
 	LLSD output;
+	output["id"] = mId;
 	output["name"] = mTemplatep->mName;
 	output["form"] = getForm()->asLLSD();
 	output["substitutions"] = mSubstitutions;

File indra/llui/llnotifications.h

 		}
 	};
 
+	LLNotificationResponderPtr getResponderPtr() { return mResponder; }
+
 private:
 	
 	LLUUID mId;

File indra/llui/llresmgr.cpp

 		{
 			if (fraction == remaining_count)
 			{
-				fraction_string = llformat("%d%c", fraction, getThousandsSeparator());
+				fraction_string = llformat_to_utf8("%d%c", fraction, getThousandsSeparator());
 			}
 			else
 			{
-				fraction_string = llformat("%3.3d%c", fraction, getThousandsSeparator());
+				fraction_string = llformat_to_utf8("%3.3d%c", fraction, getThousandsSeparator());
 			}
 			output = fraction_string + output;
 		}

File indra/llui/lltextbase.cpp

 		? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight)
 		: mVisibleTextRect.getWidth();
 
+	if (!mScroller)
+	{
+		// push doc rect to top of text widget
+		doc_rect.translate(0, mVisibleTextRect.getHeight() - doc_rect.mTop);
+	}
+
 	mDocumentView->setShape(doc_rect);
 
 	//update mVisibleTextRect *after* mDocumentView has been resized
 }
 
 LLImageTextSegment::LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor)
-	:LLTextSegment(pos,pos+1)
-	,mStyle( style )
-	,mEditor(editor)
+:	LLTextSegment(pos,pos+1),
+	mStyle( style ),
+	mEditor(editor)
 {
 }
 

File indra/newview/app_settings/settings.xml

       <key>Value</key>
       <integer>2</integer>
     </map>
-    <key>AvatarBakedTextureTimeout</key>
+    <key>AvatarBakedTextureUploadTimeout</key>
     <map>
       <key>Comment</key>
       <string>Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance.  Set to 0 to disable and wait until all baked textures are at highest resolution.</string>
       <key>Type</key>
       <string>U32</string>
       <key>Value</key>
-      <integer>120</integer>
-    </map>
+      <integer>60</integer>
+    </map>
+    <key>AvatarBakedLocalTextureUpdateTimeout</key>
+    <map>
+      <key>Comment</key>
+      <string>Specifes the maximum time in seconds to wait before updating your appearance during appearance mode.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>10</integer>
+    </map>
+
     <key>AvatarSex</key>
     <map>
       <key>Comment</key>

File indra/newview/llagent.cpp

 		return;
 	}
 
-	if (gAgentCamera.cameraCustomizeAvatar())
+	if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures())
 	{
 		// ignore baked textures when in customize mode
 		return;
 {
 	if (!isAgentAvatarValid()) return;
 
-	if (gAgentQueryManager.mNumPendingQueries > 0 && !gAgentCamera.cameraCustomizeAvatar()) 
+	if (gAgentQueryManager.mNumPendingQueries > 0 && (isAgentAvatarValid() && gAgentAvatarp->isUsingBakedTextures())) 
 	{
 		return;
 	}

File indra/newview/llagentcamera.cpp

 		*/
 	}
 
-	if( cameraCustomizeAvatar() )
+	if(cameraCustomizeAvatar())
 	{
 		new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
 	}

File indra/newview/llagentlanguage.cpp

 // library includes
 #include "llui.h"					// getLanguage()
 
-LLAgentLanguage::LLAgentLanguage()
+// static
+void LLAgentLanguage::init()
 {
-	gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update));
-	gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&update));
-	gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update));
-	gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update));
+	gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&onChange));
+	gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&onChange));
+	gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&onChange));
+	gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&onChange));
 }
 
+// static
+void LLAgentLanguage::onChange()
+{
+	// Clear inventory cache so that default names of inventory items
+	// appear retranslated (EXT-8308).
+	gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
+}
 
 // send language settings to the sim
 // static
 bool LLAgentLanguage::update()
 {
 	LLSD body;
-	std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage");
+	std::string url;
+
+	if (gAgent.getRegion())
+	{
+		url = gAgent.getRegion()->getCapability("UpdateAgentLanguage");
+	}
+
 	if (!url.empty())
 	{
 		std::string language = LLUI::getLanguage();

File indra/newview/llagentlanguage.h

 #ifndef LL_LLAGENTLANGUAGE_H
 #define LL_LLAGENTLANGUAGE_H
 
-#include "llsingleton.h"	// LLSingleton<>
-#include "llevent.h"
-
-class LLAgentLanguage: public LLSingleton<LLAgentLanguage>, public LLOldEvents::LLSimpleListener
+class LLAgentLanguage
 {
  public:
-	LLAgentLanguage();
+	static void init();
 	static bool update();
+
+ private:
+	static void onChange();
 };
 
 #endif // LL_LLAGENTLANGUAGE_H

File indra/newview/llagentwearables.cpp

 	gAgent.sendReliableMessage();
 }
 
-void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update)
+void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update,
+									const std::string new_name)
 {
 	LLWearable* old_wearable = getWearable(type, index);
 	if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion()))
 		LLInventoryItem* item = gInventory.getItem(old_item_id);
 		if (item)
 		{
+			std::string item_name = item->getName();
+			bool name_changed = false;
+			if (!new_name.empty() && (new_name != item->getName()))
+			{
+				llinfos << "saveWearable changing name from "  << item->getName() << " to " << new_name << llendl;
+				item_name = new_name;
+				name_changed = true;
+			}
 			// Update existing inventory item
 			LLPointer<LLViewerInventoryItem> template_item =
 				new LLViewerInventoryItem(item->getUUID(),
 										  new_wearable->getAssetID(),
 										  new_wearable->getAssetType(),
 										  item->getInventoryType(),
-										  item->getName(),
+										  item_name,
 										  item->getDescription(),
 										  item->getSaleInfo(),
 										  item->getFlags(),
 			template_item->setTransactionID(new_wearable->getTransactionID());
 			template_item->updateServer(FALSE);
 			gInventory.updateItem(template_item);
+			if (name_changed)
+			{
+				gInventory.notifyObservers();
+			}
 		}
 		else
 		{

File indra/newview/llagentwearables.h

 	//--------------------------------------------------------------------
 public:	
 	void			saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found);
-	void			saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE);
+	void			saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE,
+								 const std::string new_name = "");
 	void			saveAllWearables();
 	void			revertWearable(const LLWearableType::EType type, const U32 index);
 

File indra/newview/llappearancemgr.cpp

 		LLNotificationsUtil::add("CannotWearTrash");
 		return false;
 	}
+	else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), LLAppearanceMgr::instance().getCOF())) // EXT-84911
+	{
+		return false;
+	}
 
 	switch (item_to_wear->getType())
 	{
 	llinfos << "wearInventoryCategory( " << category->getName()
 			 << " )" << llendl;
 
-	callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
-														   &LLAppearanceMgr::instance(),
-														   category->getUUID(), copy, append));
+	callAfterCategoryFetch(category->getUUID(), boost::bind(&LLAppearanceMgr::wearCategoryFinal,
+															&LLAppearanceMgr::instance(),
+															category->getUUID(), copy, append));
 }
 
 void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)
 			LLViewerInventoryItem *item2 = outfit_items.get(i);
 
 			if (item1->getLinkedUUID() != item2->getLinkedUUID() || 
+				item1->getName() != item2->getName() ||
 				item1->LLInventoryItem::getDescription() != item2->LLInventoryItem::getDescription())
 			{
 				mOutfitIsDirty = true;
 	return gInventory.isObjectDescendentOf(obj_id, getCOF());
 }
 
+// static
+bool LLAppearanceMgr::isLinkInCOF(const LLUUID& obj_id)
+{
+	 LLInventoryModel::cat_array_t cats;
+	 LLInventoryModel::item_array_t items;
+	 LLLinkedItemIDMatches find_links(gInventory.getLinkedItemID(obj_id));
+	 gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(),
+	 cats,
+	 items,
+	 LLInventoryModel::EXCLUDE_TRASH,
+	 find_links);
+
+	 return !items.empty();
+}
+
 BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const
 {
 	if (!getIsInCOF(obj_id)) return FALSE;
 	return FALSE;
 	*/
 }
+
+// Shim class to allow arbitrary boost::bind
+// expressions to be run as one-time idle callbacks.
+//
+// TODO: rework idle function spec to take a boost::function in the first place.
+class OnIdleCallbackOneTime
+{
+public:
+	OnIdleCallbackOneTime(nullary_func_t callable):
+		mCallable(callable)
+	{
+	}
+	static void onIdle(void *data)
+	{
+		gIdleCallbacks.deleteFunction(onIdle, data);
+		OnIdleCallbackOneTime* self = reinterpret_cast<OnIdleCallbackOneTime*>(data);
+		self->call();
+		delete self;
+	}
+	void call()
+	{
+		mCallable();
+	}
+private:
+	nullary_func_t mCallable;
+};
+
+void doOnIdleOneTime(nullary_func_t callable)
+{
+	OnIdleCallbackOneTime* cb_functor = new OnIdleCallbackOneTime(callable);
+	gIdleCallbacks.addFunction(&OnIdleCallbackOneTime::onIdle,cb_functor);
+}
+
+// Shim class to allow generic boost functions to be run as
+// recurring idle callbacks.  Callable should return true when done,
+// false to continue getting called.
+//
+// TODO: rework idle function spec to take a boost::function in the first place.
+class OnIdleCallbackRepeating
+{
+public:
+	OnIdleCallbackRepeating(bool_func_t callable):
+		mCallable(callable)
+	{
+	}
+	// Will keep getting called until the callable returns true.
+	static void onIdle(void *data)
+	{
+		OnIdleCallbackRepeating* self = reinterpret_cast<OnIdleCallbackRepeating*>(data);
+		bool done = self->call();
+		if (done)
+		{
+			gIdleCallbacks.deleteFunction(onIdle, data);
+			delete self;
+		}
+	}
+	bool call()
+	{
+		return mCallable();
+	}
+private:
+	bool_func_t mCallable;
+};
+
+void doOnIdleRepeating(bool_func_t callable)
+{
+	OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable);
+	gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor);
+}
+
+class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
+{
+public:
+	CallAfterCategoryFetchStage2(const uuid_vec_t& ids,
+								 nullary_func_t callable) :
+		LLInventoryFetchItemsObserver(ids),
+		mCallable(callable)
+	{
+	}
+	~CallAfterCategoryFetchStage2()
+	{
+	}
+	virtual void done()
+	{
+		llinfos << this << " done with incomplete " << mIncomplete.size()
+				<< " complete " << mComplete.size() <<  " calling callable" << llendl;
+
+		gInventory.removeObserver(this);
+		doOnIdleOneTime(mCallable);
+		delete this;
+	}
+protected:
+	nullary_func_t mCallable;
+};
+
+class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
+{
+public:
+	CallAfterCategoryFetchStage1(const LLUUID& cat_id, nullary_func_t callable) :
+		LLInventoryFetchDescendentsObserver(cat_id),
+		mCallable(callable)
+	{
+	}
+	~CallAfterCategoryFetchStage1()
+	{
+	}
+	virtual void done()
+	{
+		// What we do here is get the complete information on the items in
+		// the library, and set up an observer that will wait for that to
+		// happen.
+		LLInventoryModel::cat_array_t cat_array;
+		LLInventoryModel::item_array_t item_array;
+		gInventory.collectDescendents(mComplete.front(),
+									  cat_array,
+									  item_array,
+									  LLInventoryModel::EXCLUDE_TRASH);
+		S32 count = item_array.count();
+		if(!count)
+		{
+			llwarns << "Nothing fetched in category " << mComplete.front()
+					<< llendl;
+			//dec_busy_count();
+			gInventory.removeObserver(this);
+
+			// lets notify observers that loading is finished.
+			gAgentWearables.notifyLoadingFinished();
+			delete this;
+			return;
+		}
+
+		llinfos << "stage1 got " << item_array.count() << " items, passing to stage2 " << llendl;
+		uuid_vec_t ids;
+		for(S32 i = 0; i < count; ++i)
+		{
+			ids.push_back(item_array.get(i)->getUUID());
+		}
+		
+		gInventory.removeObserver(this);
+		
+		// do the fetch
+		CallAfterCategoryFetchStage2 *stage2 = new CallAfterCategoryFetchStage2(ids, mCallable);
+		stage2->startFetch();
+		if(stage2->isFinished())
+		{
+			// everything is already here - call done.
+			stage2->done();
+		}
+		else
+		{
+			// it's all on it's way - add an observer, and the inventory
+			// will call done for us when everything is here.
+			gInventory.addObserver(stage2);
+		}
+		delete this;
+	}
+protected:
+	nullary_func_t mCallable;
+};
+
+void callAfterCategoryFetch(const LLUUID& cat_id, nullary_func_t cb)
+{
+	CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(cat_id, cb);
+	stage1->startFetch();
+	if (stage1->isFinished())
+	{
+		stage1->done();
+	}
+	else
+	{
+		gInventory.addObserver(stage1);
+	}
+}
+
+void wear_multiple(const uuid_vec_t& ids, bool replace)
+{
+	LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
+	
+	bool first = true;
+	uuid_vec_t::const_iterator it;
+	for (it = ids.begin(); it != ids.end(); ++it)
+	{
+		// if replace is requested, the first item worn will replace the current top
+		// item, and others will be added.
+		LLAppearanceMgr::instance().wearItemOnAvatar(*it,false,first && replace,cb);
+		first = false;
+	}
+}
+

File indra/newview/llappearancemgr.h

 	BOOL getIsInCOF(const LLUUID& obj_id) const;
 	// Is this in the COF and can the user delete it from the COF?
 	BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
+
+	/**
+	 * Checks if COF contains link to specified object.
+	 */
+	static bool isLinkInCOF(const LLUUID& obj_id);
 };
 
 class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
 
 LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name);
 
-// Shim class and template function to allow arbitrary boost::bind
-// expressions to be run as one-time idle callbacks.
-template <typename T>
-class OnIdleCallbackOneTime
-{
-public:
-	OnIdleCallbackOneTime(T callable):
-		mCallable(callable)
-	{
-	}
-	static void onIdle(void *data)
-	{
-		gIdleCallbacks.deleteFunction(onIdle, data);
-		OnIdleCallbackOneTime<T>* self = reinterpret_cast<OnIdleCallbackOneTime<T>*>(data);
-		self->call();
-		delete self;
-	}
-	void call()
-	{
-		mCallable();
-	}
-private:
-	T mCallable;
-};
+typedef boost::function<void ()> nullary_func_t;
+typedef boost::function<bool ()> bool_func_t;
 
-template <typename T>
-void doOnIdleOneTime(T callable)
-{
-	OnIdleCallbackOneTime<T>* cb_functor = new OnIdleCallbackOneTime<T>(callable);
-	gIdleCallbacks.addFunction(&OnIdleCallbackOneTime<T>::onIdle,cb_functor);
-}
+// Call a given callable once in idle loop.
+void doOnIdleOneTime(nullary_func_t callable);
 
-// Shim class and template function to allow arbitrary boost::bind
-// expressions to be run as recurring idle callbacks.
-// Callable should return true when done, false to continue getting called.
-template <typename T>
-class OnIdleCallbackRepeating
-{
-public:
-	OnIdleCallbackRepeating(T callable):
-		mCallable(callable)
-	{
-	}
-	// Will keep getting called until the callable returns true.
-	static void onIdle(void *data)
-	{
-		OnIdleCallbackRepeating<T>* self = reinterpret_cast<OnIdleCallbackRepeating<T>*>(data);
-		bool done = self->call();
-		if (done)
-		{
-			gIdleCallbacks.deleteFunction(onIdle, data);
-			delete self;
-		}
-	}
-	bool call()
-	{
-		return mCallable();
-	}
-private:
-	T mCallable;
-};
+// Repeatedly call a callable in idle loop until it returns true.
+void doOnIdleRepeating(bool_func_t callable);
 
-template <typename T>
-void doOnIdleRepeating(T callable)
-{
-	OnIdleCallbackRepeating<T>* cb_functor = new OnIdleCallbackRepeating<T>(callable);
-	gIdleCallbacks.addFunction(&OnIdleCallbackRepeating<T>::onIdle,cb_functor);
-}
+// Invoke a given callable after category contents are fully fetched.
+void callAfterCategoryFetch(const LLUUID& cat_id, nullary_func_t cb);
 
-template <class T>
-class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
-{
-public:
-	CallAfterCategoryFetchStage2(const uuid_vec_t& ids,
-								 T callable) :
-		LLInventoryFetchItemsObserver(ids),
-		mCallable(callable)
-	{
-	}
-	~CallAfterCategoryFetchStage2()
-	{
-	}
-	virtual void done()
-	{
-		llinfos << this << " done with incomplete " << mIncomplete.size()
-				<< " complete " << mComplete.size() <<  " calling callable" << llendl;
-
-		gInventory.removeObserver(this);
-		doOnIdleOneTime(mCallable);
-		delete this;
-	}
-protected:
-	T mCallable;
-};
-
-template <class T>
-class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
-{
-public:
-	CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) :
-		LLInventoryFetchDescendentsObserver(cat_id),
-		mCallable(callable)
-	{
-	}
-	~CallAfterCategoryFetchStage1()
-	{
-	}
-	virtual void done()
-	{
-		// What we do here is get the complete information on the items in
-		// the library, and set up an observer that will wait for that to
-		// happen.
-		LLInventoryModel::cat_array_t cat_array;
-		LLInventoryModel::item_array_t item_array;
-		gInventory.collectDescendents(mComplete.front(),
-									  cat_array,
-									  item_array,
-									  LLInventoryModel::EXCLUDE_TRASH);
-		S32 count = item_array.count();
-		if(!count)
-		{
-			llwarns << "Nothing fetched in category " << mComplete.front()
-					<< llendl;
-			//dec_busy_count();
-			gInventory.removeObserver(this);
-
-			// lets notify observers that loading is finished.
-			gAgentWearables.notifyLoadingFinished();
-			delete this;
-			return;
-		}
-
-		llinfos << "stage1 got " << item_array.count() << " items, passing to stage2 " << llendl;
-		uuid_vec_t ids;
-		for(S32 i = 0; i < count; ++i)
-		{
-			ids.push_back(item_array.get(i)->getUUID());
-		}
-		
-		gInventory.removeObserver(this);
-		
-		// do the fetch
-		CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable);
-		stage2->startFetch();
-		if(stage2->isFinished())
-		{
-			// everything is already here - call done.
-			stage2->done();
-		}
-		else
-		{
-			// it's all on it's way - add an observer, and the inventory
-			// will call done for us when everything is here.
-			gInventory.addObserver(stage2);
-		}
-		delete this;
-	}
-protected:
-	T mCallable;
-};
-
-template <class T> 
-void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
-{
-	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable);
-	stage1->startFetch();
-	if (stage1->isFinished())
-	{
-		stage1->done();
-	}
-	else
-	{
-		gInventory.addObserver(stage1);
-	}
-}
+// Wear all items in a uuid vector.
+void wear_multiple(const uuid_vec_t& ids, bool replace);
 
 #endif

File indra/newview/llappviewer.cpp

 #include "llgroupmgr.h"
 #include "llagent.h"
 #include "llagentcamera.h"
+#include "llagentlanguage.h"
 #include "llagentwearables.h"
 #include "llwindow.h"
 #include "llviewerstats.h"
 
 bool	create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
 {
-	if(!match || !base)
+	if(!match || !base || base->getPlainText())
 		return false;
 
 	LLUUID match_id = match->getID();
 	params.view = icon;
 	params.left_pad = 4;
 	params.right_pad = 4;
-	params.top_pad = 2;
+	params.top_pad = -2;
 	params.bottom_pad = 2;
 
 	base->appendWidget(params," ",false);
 		LLStringOps::sPM = LLTrans::getString("dateTimePM");
 	}
 
+	LLAgentLanguage::init();
+
 	return true;
 }
 

File indra/newview/llavataractions.cpp

 		}
 
 		LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
-		if (NULL == active_panel)
+		if (!active_panel)
 		{
-			return;
+			active_panel = get_outfit_editor_inventory_panel();
+			if (!active_panel) return;
 		}
 
 		const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();

File indra/newview/llchathistory.cpp

 		return pInstance;
 	}
 
+	~LLChatHistoryHeader()
+	{
+		// Detach the info button so that it doesn't get destroyed (EXT-8463).
+		hideInfoCtrl();
+	}
+
 	BOOL handleMouseUp(S32 x, S32 y, MASK mask)
 	{
 		return LLPanel::handleMouseUp(x,y,mask);
 				
 		if (!sInfoCtrl)
 		{
+			// *TODO: Delete the button at exit.
 			sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance());
-			sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
+			if (sInfoCtrl)
+			{
+				sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
+			}
+		}
+
+		if (!sInfoCtrl)
+		{
+			llassert(sInfoCtrl != NULL);
+			return;
 		}
 
 		LLTextBase* name = getChild<LLTextBase>("user_name");

File indra/newview/llcofwearables.cpp

 	mClothingTab(NULL),
 	mAttachmentsTab(NULL),
 	mBodyPartsTab(NULL),
-	mLastSelectedTab(NULL)
+	mLastSelectedTab(NULL),
+	mAccordionCtrl(NULL)
 {
 	mClothingMenu = new CofClothingContextMenu(this);
 	mAttachmentMenu = new CofAttachmentContextMenu(this);
 	mTab2AssetType[mAttachmentsTab] = LLAssetType::AT_OBJECT;
 	mTab2AssetType[mBodyPartsTab] = LLAssetType::AT_BODYPART;
 
+	mAccordionCtrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
+
 	return LLPanel::postBuild();
 }
 
 	typedef std::map<std::string, LLAssetType::EType> type_map_t;
 
 	static type_map_t type_map;
-	static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
-	const LLAccordionCtrlTab* expanded_tab = accordion_ctrl->getExpandedTab();
 
-	return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
+	if (mAccordionCtrl != NULL)
+	{
+		const LLAccordionCtrlTab* expanded_tab = mAccordionCtrl->getExpandedTab();
+
+		return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
+	}
+
+	return LLAssetType::AT_NONE;
 }
 
 LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType()
 {
-	static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion");
-	const LLAccordionCtrlTab* selected_tab = accordion_ctrl->getSelectedTab();
+	if (mAccordionCtrl != NULL)
+	{
+		const LLAccordionCtrlTab* selected_tab = mAccordionCtrl->getSelectedTab();
 
-	return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
+		return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
+	}
+
+	return LLAssetType::AT_NONE;
+}
+
+void LLCOFWearables::expandDefaultAccordionTab()
+{
+	if (mAccordionCtrl != NULL)
+	{
+		mAccordionCtrl->expandDefaultTab();
+	}
 }
 
 void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContextMenu* menu)

File indra/newview/llcofwearables.h

 #include "llappearancemgr.h"
 #include "llinventorymodel.h"
 
+class LLAccordionCtrl;
 class LLAccordionCtrlTab;
 class LLListContextMenu;
 class LLPanelClothingListItem;
 
 	LLAssetType::EType getExpandedAccordionAssetType();
 	LLAssetType::EType getSelectedAccordionAssetType();
+	void expandDefaultAccordionTab();
 
 	LLCOFCallbacks& getCOFCallbacks() { return mCOFCallbacks; }
 
 	LLListContextMenu* mClothingMenu;
 	LLListContextMenu* mAttachmentMenu;
 	LLListContextMenu* mBodyPartMenu;
+
+	LLAccordionCtrl*	mAccordionCtrl;
 };
 
 

File indra/newview/llcurrencyuimanager.cpp

 #include "lluictrlfactory.h"
 #include "lltextbox.h"
 #include "lllineeditor.h"
+#include "llresmgr.h" // for LLLocale
+#include "lltrans.h"
 #include "llviewercontrol.h"
 #include "llversioninfo.h"
 
 	if (mUSDCurrencyEstimated)
 	{
 		// we have the old-style USD-specific value
-		return "US$ " + llformat("%#.2f", mUSDCurrencyEstimatedCost / 100.0);
+		LLStringUtil::format_map_t args;
+		{
+			LLLocale locale_override(LLStringUtil::getLocale());
+			args["[AMOUNT]"] = llformat("%#.2f", mUSDCurrencyEstimatedCost / 100.0);
+		}
+		return LLTrans::getString("LocalEstimateUSD", args);
 	}
 	return "";
 }

File indra/newview/lldrawpoolbump.cpp

 										0, 
 										0);									
 		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
-		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL, NULL );
+		gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
 		LLStandardBumpmap::sStandardBumpmapCount++;
 	}
 
 
 			// Note: this may create an LLImageGL immediately
 			src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
-			src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL, NULL );
+			src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
 			bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image
 
 //			bump_total++;

File indra/newview/lldynamictexture.cpp

 			{
 				generateGLTexture() ;
 			}
+			if(!mGLTexturep->getHasGLTexture())
+			{
+				generateGLTexture() ;
+			}
 			llcallstacks << "class type: " << (S32)getType() << llcallstacksendl ;
 
 			success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);

File indra/newview/llface.cpp

 	F32 cos_angle_to_view_dir;	
 	BOOL in_frustum = calcPixelArea(cos_angle_to_view_dir, radius);
 
-	if (mPixelArea < 0.0001f || !in_frustum)
+	if (mPixelArea < F_ALMOST_ZERO || !in_frustum)
 	{
 		setVirtualSize(0.f) ;
 		return 0.f;

File indra/newview/llfloatergroups.cpp

 #include "llbutton.h"
 #include "llgroupactions.h"
 #include "llscrolllistctrl.h"
+#include "llselectmgr.h"
 #include "lltextbox.h"
 #include "lluictrlfactory.h"
 #include "lltrans.h"
 		list_ctrl->setContextMenu(LLScrollListCtrl::MENU_GROUP);
 	}
 	
+	LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterGroupPicker::onBtnCancel, this));
 
 	childSetAction("OK", onBtnOK, this);
 

File indra/newview/llfloaterland.cpp

 			LLStyle::Params style;
 			style.image(LLUI::getUIImage(gFloaterView->getParentFloater(this)->getString("maturity_icon_moderate")));
 			LLCheckBoxWithTBAcess* fullaccess_mature_ctrl = (LLCheckBoxWithTBAcess*)mMatureCtrl;
-			fullaccess_mature_ctrl->getTextBox()->setText(std::string("icon"),style);
+			fullaccess_mature_ctrl->getTextBox()->setText(LLStringExplicit(""));
+			fullaccess_mature_ctrl->getTextBox()->appendImageSegment(style);
 			fullaccess_mature_ctrl->getTextBox()->appendText(getString("mature_check_mature"), false);
 			fullaccess_mature_ctrl->setToolTip(getString("mature_check_mature_tooltip"));
 			fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), FALSE);

File indra/newview/llfloatersearch.cpp

File contents unchanged.

File indra/newview/llfloatersearch.h

File contents unchanged.

File indra/newview/llfloatervoicedevicesettings.cpp

 				iter != LLVoiceClient::getInstance()->getCaptureDevices().end();
 				iter++)
 			{
-				mCtrlInputDevices->add( *iter, ADD_BOTTOM );
+				// Lets try to localize some system device names. EXT-8375
+				std::string device_name = *iter;
+				LLStringUtil::toLower(device_name); //compare in low case