From e2049c332b9b834e843249c1ae0ba8542491940f Mon Sep 17 00:00:00 2001
From: Boroondas Gupte <hg@boroon.dasgupta.ch>
Date: Sun, 24 Oct 2010 16:01:57 +0200
Subject: CTS-323: (part 1 of 2) Don't cast pointers to U32

---
 doc/contributions.txt     | 1 +
 indra/llmath/llsimdmath.h | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index c8125c675f..200d8b6b17 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -149,6 +149,7 @@ Blakar Ogre
 blino Nakamura
 	VWR-17
 Boroondas Gupte
+	CTS-323
 	SNOW-278
 	VWR-233
 	WEB-262
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index 9377bfdb53..1be1b7a55f 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -41,16 +41,18 @@
 #error SSE2 not enabled. LLVector4a and related class will not compile.
 #endif
 
+#include <stdint.h>
+
 template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address) 
 { 
 	return reinterpret_cast<T*>(
-		(reinterpret_cast<U32>(address) + 0xF) & ~0xF);
+		(reinterpret_cast<uintptr_t>(address) + 0xF) & ~0xF);
 }
 
 template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) 
 { 
 	return reinterpret_cast<T*>(
-		(reinterpret_cast<U32>(address) + 0x3F) & ~0x3F);
+		(reinterpret_cast<uintptr_t>(address) + 0x3F) & ~0x3F);
 }
 
 #if LL_LINUX || LL_DARWIN
-- 
cgit v1.2.3


From b3541777921142572f735c4b028e4fba91ae80a0 Mon Sep 17 00:00:00 2001
From: Tofu Buzzard <no-email>
Date: Mon, 15 Nov 2010 16:48:10 +0000
Subject: VWR-23839 Pulseaudio support is crashing web media on some new Linux
 distros

---
 indra/cmake/PulseAudio.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake
index e918de0198..360a971058 100644
--- a/indra/cmake/PulseAudio.cmake
+++ b/indra/cmake/PulseAudio.cmake
@@ -1,7 +1,7 @@
 # -*- cmake -*-
 include(Prebuilt)
 
-set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
+set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
 
 if (PULSEAUDIO)
   if (STANDALONE)
-- 
cgit v1.2.3


From dbd06789e6c91f6d9a42e5aafa98996ada915c21 Mon Sep 17 00:00:00 2001
From: Dessie Linden <dessie@lindenlab.com>
Date: Wed, 8 Dec 2010 16:49:28 -0800
Subject: Added tag 2.4.0-beta2 for changeset 25bd6007e3d2

---
 .hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags b/.hgtags
index 1289dfdf24..44e822aae4 100644
--- a/.hgtags
+++ b/.hgtags
@@ -40,3 +40,4 @@ dbc206fc61d89ff4cfe15aade0bf0c7bc7fee1c9 2.4.0-start
 dc6483491b4af559060bccaef8e9045a303212dd 2.4.0-beta1
 dc6483491b4af559060bccaef8e9045a303212dd 2.4.0-beta1
 3bc1f50a72e117f4d4ad8d555f0c785ea8cc201e 2.4.0-beta1
+25bd6007e3d2fc15db9326ed4b18a24a5969a46a 2.4.0-beta2
-- 
cgit v1.2.3


From ee538257d316696382d12ea222294a4b8786dc84 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 10 Dec 2010 13:01:01 +0200
Subject: STORM-622 FIXED Texture picker screws up when multiple textures are
 opened.

Reason:
	In viewer 2 ability was added to set aspect ratio while previewing textures. It was achieved by resizing the floater containing a texture, instead of proportionally resize the texture. The problem happened when multifloater was opened with texture preview floaters and for some floaters textures were not loaded yet. After texture was loaded, the floater (in multifloater) which contained just loaded texture resized to fit with the new texture's size and texture preview floaters screwed up from the multifloater.

Solution:
        Proportionally resizing a texture inside the floater instead of the floater itself.

Also two issues was fixed: 1. when floater resized the texture streched in the floater and lost its proportions. 2. When docking texture floater to the multifloater, multifloater resized to fit with docked floater and other texture lost their proportions.
---
 indra/newview/llpreview.cpp        |  3 +-
 indra/newview/llpreviewtexture.cpp | 77 ++------------------------------------
 2 files changed, 6 insertions(+), 74 deletions(-)

diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 69542764d2..a90f23d637 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -454,12 +454,13 @@ LLMultiPreview::LLMultiPreview()
 	{
 		// start with a rect in the top-left corner ; will get resized
 		LLRect rect;
-		rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 200);
+		rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
 		setRect(rect);
 	}
 	setTitle(LLTrans::getString("MultiPreviewTitle"));
 	buildTabContainer();
 	setCanResize(TRUE);
+	mAutoResize = FALSE;
 }
 
 void LLMultiPreview::onOpen(const LLSD& key)
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index fd6b326ef1..7657cccd4e 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -318,7 +318,7 @@ void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
 		}
 	}
 
-	mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() +  (client_height / 2), client_width, client_height);	
+	mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() +  (client_height / 2), client_width, client_height);
 
 }
 
@@ -400,7 +400,6 @@ void LLPreviewTexture::updateDimensions()
 	{
 		return;
 	}
-
 	
 	mUpdateDimensions = FALSE;
 
@@ -408,80 +407,12 @@ void LLPreviewTexture::updateDimensions()
 	getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
 
 	
-	LLRect dim_rect(getChildView("dimensions")->getRect());
-
-	S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
-
-	// add space for dimensions and aspect ratio
-	S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD;
-
-	S32 screen_width = gFloaterView->getSnapRect().getWidth();
-	S32 screen_height = gFloaterView->getSnapRect().getHeight();
-
-	S32 max_image_width = screen_width - 2*horiz_pad;
-	S32 max_image_height = screen_height - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD) 
-		- (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height);
-
-	S32 client_width = llmin(max_image_width,mImage->getFullWidth());
-	S32 client_height = llmin(max_image_height,mImage->getFullHeight());
-
-	if (mAspectRatio > 0.f)
-	{
-		if(mAspectRatio > 1.f)
-		{
-			client_height = llceil((F32)client_width / mAspectRatio);
-			if(client_height > max_image_height)
-			{
-				client_height = max_image_height;
-				client_width = llceil((F32)client_height * mAspectRatio);
-			}
-		}
-		else//mAspectRatio < 1.f
-		{
-			client_width = llceil((F32)client_height * mAspectRatio);
-			if(client_width > max_image_width)
-			{
-				client_width = max_image_width;
-				client_height = llceil((F32)client_width / mAspectRatio);
-			}
-		}
-	}
-	else
-	{
-
-		if(client_height > max_image_height)
-		{
-			F32 ratio = (F32)max_image_height/client_height;
-			client_height = max_image_height;
-			client_width = llceil((F32)client_height * ratio);
-		}
-		
-		if(client_width > max_image_width)
-		{
-			F32 ratio = (F32)max_image_width/client_width;
-			client_width = max_image_width;
-			client_height = llceil((F32)client_width * ratio);
-		}
-	}
-
-	//now back to whole floater
-	S32 floater_width = llmax(getMinWidth(),client_width + 2*horiz_pad);
-	S32 floater_height = llmax(getMinHeight(),client_height + (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD)
-		+ (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height));
-
 	//reshape floater
-	reshape( floater_width, floater_height );
-	gFloaterView->adjustToFitScreen(this, FALSE);
+	reshape(getRect().getWidth(), getRect().getHeight());
 
-	//setup image rect...
-	LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0);
-	client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
-	client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ;
-
-	mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() +  (client_height / 2), client_width, client_height);	
+	gFloaterView->adjustToFitScreen(this, FALSE);
 
-	// Hide the aspect ratio label if the window is too narrow
-	// Assumes the label should be to the right of the dimensions
+	LLRect dim_rect(getChildView("dimensions")->getRect());
 	LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
 	getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
 }
-- 
cgit v1.2.3


From a42b6acd6ae677a4347771baa49d75dc560269a3 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Fri, 10 Dec 2010 16:30:45 +0200
Subject: STORM-431 FIXED Hot keys did't work with autocompletion in search
 field.

---
 indra/newview/llsearchcombobox.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index db531b5695..6558c9a7fa 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -131,6 +131,9 @@ void LLSearchComboBox::focusTextEntry()
 	if (mTextEntry)
 	{
 		gFocusMgr.setKeyboardFocus(mTextEntry);
+
+		// Let the editor handle editing hotkeys (STORM-431).
+		LLEditMenuHandler::gEditMenuHandler = mTextEntry;
 	}
 }
 
-- 
cgit v1.2.3


From 18a18f5985c76adaed040b4bdcba15cc251dbeb5 Mon Sep 17 00:00:00 2001
From: Seth ProductEngine <slitovchuk@productengine.com>
Date: Fri, 10 Dec 2010 19:13:25 +0200
Subject: STORM-693 FIXED Preview thumbnails in the Edit Wearable and Edit Body
 Parts panels now follow opacity settings for inactive floater. When the
 floater is active the thumbnails are opaque. The behavior is similar to
 texture control's.

---
 indra/newview/llscrollingpanelparam.cpp | 8 ++++++--
 indra/newview/lltoolmorph.cpp           | 4 ++--
 indra/newview/lltoolmorph.h             | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 05b273cd29..f8c20dada0 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -165,12 +165,16 @@ void LLScrollingPanelParam::draw()
 	getChildView("max param text")->setVisible( FALSE );
 	LLPanel::draw();
 
+	// If we're in a focused floater, don't apply the floater's alpha to visual param hint,
+	// making its behavior similar to texture controls'.
+	F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
+
 	// Draw the hints over the "less" and "more" buttons.
 	gGL.pushUIMatrix();
 	{
 		const LLRect& r = mHintMin->getRect();
 		gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
-		mHintMin->draw();
+		mHintMin->draw(alpha);
 	}
 	gGL.popUIMatrix();
 
@@ -178,7 +182,7 @@ void LLScrollingPanelParam::draw()
 	{
 		const LLRect& r = mHintMax->getRect();
 		gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
-		mHintMax->draw();
+		mHintMax->draw(alpha);
 	}
 	gGL.popUIMatrix();
 
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index ca80a1db79..964b17d3a6 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -244,13 +244,13 @@ BOOL LLVisualParamHint::render()
 //-----------------------------------------------------------------------------
 // draw()
 //-----------------------------------------------------------------------------
-void LLVisualParamHint::draw()
+void LLVisualParamHint::draw(F32 alpha)
 {
 	if (!mIsVisible) return;
 
 	gGL.getTexUnit(0)->bind(this);
 
-	gGL.color4f(1.f, 1.f, 1.f, 1.f);
+	gGL.color4f(1.f, 1.f, 1.f, alpha);
 
 	LLGLSUIDefault gls_ui;
 	gGL.begin(LLRender::QUADS);
diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h
index 59201233ae..a6889be151 100644
--- a/indra/newview/lltoolmorph.h
+++ b/indra/newview/lltoolmorph.h
@@ -68,7 +68,7 @@ public:
 	BOOL					render();
 	void					requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
 	void					setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
-	void					draw();
+	void					draw(F32 alpha);
 	
 	LLViewerVisualParam*	getVisualParam() { return mVisualParam; }
 	F32						getVisualParamWeight() { return mVisualParamWeight; }
-- 
cgit v1.2.3


From 26d063f5521f80bc7eca214fb8338fee4e87f301 Mon Sep 17 00:00:00 2001
From: Seth ProductEngine <slitovchuk@productengine.com>
Date: Fri, 10 Dec 2010 19:54:07 +0200
Subject: STORM-378 FIX REVERTED Backed out changeset: 1bce3dd882df

---
 indra/newview/llfloaterpostcard.cpp | 4 +++-
 indra/newview/llfloatersnapshot.cpp | 7 +++++++
 indra/newview/llviewermenufile.cpp  | 2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index 054ab4538b..dd0b1d999c 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -366,7 +366,9 @@ void LLFloaterPostcard::sendPostcard()
 	{
 		gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
 	}
-
+	
+	// give user feedback of the event
+	gViewerWindow->playSnapshotAnimAndSound();
 	LLUploadDialog::modalUploadDialog(getString("upload_message"));
 
 	// don't destroy the window until the upload is done
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 1aba5ef92f..b310256874 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -1006,6 +1006,7 @@ void LLSnapshotLivePreview::saveTexture()
 				    LLFloaterPerms::getEveryonePerms(),
 				    "Snapshot : " + pos_string,
 				    callback, expected_upload_cost, userdata);
+		gViewerWindow->playSnapshotAnimAndSound();
 	}
 	else
 	{
@@ -1027,6 +1028,10 @@ BOOL LLSnapshotLivePreview::saveLocal()
 	mDataSize = 0;
 	updateSnapshot(FALSE, FALSE);
 
+	if(success)
+	{
+		gViewerWindow->playSnapshotAnimAndSound();
+	}
 	return success;
 }
 
@@ -1046,6 +1051,8 @@ void LLSnapshotLivePreview::saveWeb()
 
 	LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(gAgentCamera.getCameraPositionGlobal(),
 		boost::bind(&LLSnapshotLivePreview::regionNameCallback, this, jpg, metadata, _1, _2, _3, _4));
+
+	gViewerWindow->playSnapshotAnimAndSound();
 }
 
 void LLSnapshotLivePreview::regionNameCallback(LLImageJPEG* snapshot, LLSD& metadata, const std::string& name, S32 x, S32 y, S32 z)
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 048691696b..237aa39e6e 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -404,6 +404,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
 									   gSavedSettings.getBOOL("RenderUIInSnapshot"),
 									   FALSE))
 		{
+			gViewerWindow->playSnapshotAnimAndSound();
+			
 			LLPointer<LLImageFormatted> formatted;
 			switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
 			{
-- 
cgit v1.2.3


From bae83c7eac98229271a6baf4c961fe167c74a597 Mon Sep 17 00:00:00 2001
From: Seth ProductEngine <slitovchuk@productengine.com>
Date: Fri, 10 Dec 2010 19:55:47 +0200
Subject: STORM-378 ADDITIONAL FIX REVERTED Backed out changeset: f858446d207f

---
 indra/newview/llfloatersnapshot.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index b310256874..0931f77281 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -908,8 +908,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
 			previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal();
 			previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame
 		}
-
-		gViewerWindow->playSnapshotAnimAndSound();
 	}
 	previewp->getWindow()->decBusyCount();
 	// only show fullscreen preview when in freeze frame mode
-- 
cgit v1.2.3


From 8ab943f470552dd9469d6025bcd359a67ad5513e Mon Sep 17 00:00:00 2001
From: "Andrew A. de Laix" <alain@lindenlab.com>
Date: Fri, 10 Dec 2010 15:41:14 -0800
Subject: fix working directory in install script and remove dependency on open
 option --args which is 10.6 only.  Also fix erroneous check in process
 launcher which was mistakenly reporting a failed execution of the new updater
 script.

---
 indra/llcommon/llprocesslauncher.cpp                          | 9 +--------
 indra/viewer_components/updater/scripts/darwin/update_install | 3 ++-
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp
index 81e5f8820d..4b0f6b0251 100644
--- a/indra/llcommon/llprocesslauncher.cpp
+++ b/indra/llcommon/llprocesslauncher.cpp
@@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void)
 	delete[] fake_argv;
 	
 	mProcessID = id;
-	
-	// At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked)
-	// If the process doesn't exist at this point, the exec failed.
-	if(!isRunning())
-	{
-		result = -1;
-	}
-	
+
 	return result;
 }
 
diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
index b174b3570a..bfc12ada11 100755
--- a/indra/viewer_components/updater/scripts/darwin/update_install
+++ b/indra/viewer_components/updater/scripts/darwin/update_install
@@ -5,5 +5,6 @@
 # to a marker file which should be created if the installer fails.q
 #
 
-open ../Resources/mac-updater.app --args -dmg "$1" -name "Second Life Viewer 2" -marker "$2"
+cd "$(dirname $0)"
+../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" &
 exit 0
-- 
cgit v1.2.3


From ac2253abc430093ae15708bfb582448fb36c00ed Mon Sep 17 00:00:00 2001
From: "Andrew A. de Laix" <alain@lindenlab.com>
Date: Fri, 10 Dec 2010 16:11:16 -0800
Subject: fix quoting in script to work with spaces in directory names.

---
 indra/viewer_components/updater/scripts/darwin/update_install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
index bfc12ada11..9df382f119 100755
--- a/indra/viewer_components/updater/scripts/darwin/update_install
+++ b/indra/viewer_components/updater/scripts/darwin/update_install
@@ -5,6 +5,6 @@
 # to a marker file which should be created if the installer fails.q
 #
 
-cd "$(dirname $0)"
+cd "$(dirname "$0")"
 ../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2" -marker "$2" &
 exit 0
-- 
cgit v1.2.3


From 4f9e6ff2ffcd3c277399d35e5765b8525b3e1b53 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 10 Dec 2010 17:27:17 -0800
Subject: Defensive coding for linux updater script for consistency with
 alain's work on the mac script. Should be safer if the user is installing to
 a path with spaces in it.

---
 indra/viewer_components/updater/scripts/linux/update_install | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index fef5ef7d09..a271926e25 100755
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -1,10 +1,10 @@
 #! /bin/bash
-INSTALL_DIR=$(cd "$(dirname $0)/.." ; pwd)
-export LD_LIBRARY_PATH=$INSTALL_DIR/lib
+INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd)
+export LD_LIBRARY_PATH="$INSTALL_DIR/lib"
 bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
 
 if [ $? -ne 0 ]
-   then touch $2
+   then touch "$2"
 fi
 
-rm -f $1
+rm -f "$1"
-- 
cgit v1.2.3


From 1d686283a467808eda2d7bd8a2c109d4924151f2 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Sat, 11 Dec 2010 17:24:39 +0200
Subject: STORM-391 WIP Removed unused methods.

---
 indra/newview/llscreenchannel.cpp | 5 -----
 indra/newview/llscreenchannel.h   | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 9e0e10d66f..64e75a6cb2 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -605,10 +605,6 @@ void LLScreenChannel::showToastsBottom()
 			mHiddenToastsNum++;
 		}
 	}
-	else
-	{
-		closeOverflowToastPanel();
-	}
 }
 
 //--------------------------------------------------------------------------
@@ -731,7 +727,6 @@ void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast)
 //--------------------------------------------------------------------------
 void LLScreenChannel::hideToastsFromScreen()
 {
-	closeOverflowToastPanel();
 	for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
 		(*it).toast->setVisible(FALSE);
 }
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 023a65d872..c536a21779 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -81,9 +81,6 @@ public:
 	// show all toasts in a channel
 	virtual void		redrawToasts() {};
 
-	virtual void 		closeOverflowToastPanel() {};
-	virtual void 		hideOverflowToastPanel() {};
-
 	
 	// Channel's behavior-functions
 	// set whether a channel will control hovering inside itself or not
-- 
cgit v1.2.3


From 0d764afb9c0ba5dd3aeed67370f8d5c7d9b7cf45 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Sat, 11 Dec 2010 18:02:59 +0200
Subject: STORM-391 FIXED Dismiss toasts that don't fit on screen.

Make sure older toasts don't appear after newer ones fade out.
---
 indra/newview/llscreenchannel.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 64e75a6cb2..0eeb89792b 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -595,14 +595,13 @@ void LLScreenChannel::showToastsBottom()
 		}
 	}
 
+	// Dismiss toasts we don't have space for (STORM-391).
 	if(it != mToastList.rend())
 	{
 		mHiddenToastsNum = 0;
 		for(; it != mToastList.rend(); it++)
 		{
-			(*it).toast->stopTimer();
-			(*it).toast->setVisible(FALSE);
-			mHiddenToastsNum++;
+			(*it).toast->hide();
 		}
 	}
 }
-- 
cgit v1.2.3


From 872e4dcdde979981d35889152dbee827775c4b7c Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Sat, 11 Dec 2010 18:54:33 +0200
Subject: STORM-766 ADDITIONAL FIX Made day cycle image in the advanced sky
 editor honor floater opacity settings.

---
 indra/newview/skins/default/xui/en/floater_windlight_options.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
index 85a5be369c..249ad95c41 100644
--- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
@@ -594,6 +594,7 @@
              left_delta="14"
              top_pad="10"
              name="SkyDayCycle"
+             use_draw_context_alpha="false"
              width="148" />
             <slider
              control_name="WLSunAngle"
-- 
cgit v1.2.3


From d3eccbcd8b9bc51b1a940325509b9508c3697391 Mon Sep 17 00:00:00 2001
From: Andrew Productengine <adyukov@productengine.com>
Date: Mon, 13 Dec 2010 13:17:48 +0200
Subject: STORM-229 FIXED Fixed long loading times and stalling of Viewer while
 loading big scripts or pasting a lot of text into script.

The bug was fixed by Satomi Ahn. Here is the description of what causes the problem from her comment in ticket:
"Disabling the loading of syntax keywords in LLScriptEdCore::postBuild() removes the freeze (and with it: syntax highlighting).
So it obviously comes from the parsing of the text.

I also noticed something else: by adding a llwarn in LLTextEditor::updateSegments(), I saw that this function was called a lot of times when loading a script, roughly once for each line in the script (naively I would have thought only necessary to update when finished... or to only update the new line).
My llwarn was in the "if (mReflowIndex < S32_MAX && mKeywords.isLoaded())", which means that, at each call, the text is actually parsed for all keywords... so the parsing of the script becomes quadratic instead of linear!!!"

- To fix this, Satomi added a flag depending on which parsing is disabled when it is not necessary.
---
 doc/contributions.txt       |  1 +
 indra/llui/lltexteditor.cpp | 10 ++++++++--
 indra/llui/lltexteditor.h   |  1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 4c33834a46..67683204e2 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -607,6 +607,7 @@ Sammy Frederix
 	VWR-6186
 Satomi Ahn
 	STORM-501
+	STORM-229
 Scrippy Scofield
 	VWR-3748
 Seg Baphomet
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 94bf716e7d..5a46c7c98e 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -277,6 +277,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
 		mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
 		updateRects();
 	}
+	
+	mParseOnTheFly = TRUE;
 }
 
 void LLTextEditor::initFromParams( const LLTextEditor::Params& p)
@@ -324,8 +326,10 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Param
 
 	blockUndo();
 	deselect();
-
+	
+	mParseOnTheFly = FALSE;
 	LLTextBase::setText(utf8str, input_params);
+	mParseOnTheFly = TRUE;
 
 	resetDirty();
 }
@@ -1367,6 +1371,7 @@ void LLTextEditor::pastePrimary()
 // paste from primary (itsprimary==true) or clipboard (itsprimary==false)
 void LLTextEditor::pasteHelper(bool is_primary)
 {
+	mParseOnTheFly = FALSE;
 	bool can_paste_it;
 	if (is_primary)
 	{
@@ -1450,6 +1455,7 @@ void LLTextEditor::pasteHelper(bool is_primary)
 	deselect();
 
 	onKeyStroke();
+	mParseOnTheFly = TRUE;
 }
 
 
@@ -2385,7 +2391,7 @@ void LLTextEditor::loadKeywords(const std::string& filename,
 
 void LLTextEditor::updateSegments()
 {
-	if (mReflowIndex < S32_MAX && mKeywords.isLoaded())
+	if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly)
 	{
 		LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING);
 		// HACK:  No non-ascii keywords for now
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 58ecefdccb..9e4b95003b 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -315,6 +315,7 @@ private:
 
 	BOOL			mAllowEmbeddedItems;
 	bool			mShowContextMenu;
+	bool			mParseOnTheFly;
 
 	LLUUID			mSourceID;
 
-- 
cgit v1.2.3


From 37cd8ad2a27188538c29fdcce58cf8ec6185231c Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Mon, 13 Dec 2010 13:38:46 +0200
Subject: STORM-781 FIXED Added support for editing multiple scripts within
 inventory of the same object using external editor.

The bug was caused by using the object ID as temporary file name for editing script,
which of course didn't work for multiple scripts in the same object inventory.

The fix is to use MD5("object id" + "script inventory item id") for the file name.
---
 indra/newview/llpreviewscript.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 330e809c53..d0ebf047e8 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -2034,7 +2034,17 @@ bool LLLiveLSLEditor::writeToFile(const std::string& filename)
 
 std::string LLLiveLSLEditor::getTmpFileName()
 {
-	return std::string(LLFile::tmpdir()) + "sl_script_" + mObjectUUID.asString() + ".lsl";
+	// Take script inventory item id (within the object inventory)
+	// to consideration so that it's possible to edit multiple scripts
+	// in the same object inventory simultaneously (STORM-781).
+	std::string script_id = mObjectUUID.asString() + "_" + mItemUUID.asString();
+
+	// Use MD5 sum to make the file name shorter and not exceed maximum path length.
+	char script_id_hash_str[33];               /* Flawfinder: ignore */
+	LLMD5 script_id_hash((const U8 *)script_id.c_str());
+	script_id_hash.hex_digest(script_id_hash_str);
+
+	return std::string(LLFile::tmpdir()) + "sl_script_" + script_id_hash_str + ".lsl";
 }
 
 void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url,
-- 
cgit v1.2.3


From 31d401e1c3ccedfc06b9efda51923d050029cfc9 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Mon, 13 Dec 2010 18:38:12 +0200
Subject: STORM-401 FIXED Add recepients of teleport offers to the recent
 people list.

---
 indra/newview/llviewermessage.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b7f72a2e4c..7313463f1b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6306,6 +6306,9 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
 				payload["from_id"] = target_id;
 				payload["SUPPRESS_TOAST"] = true;
 				LLNotificationsUtil::add("TeleportOfferSent", args, payload);
+
+				// Add the recepient to the recent people list.
+				LLRecentPeople::instance().add(target_id);
 			}
 		}
 		gAgent.sendReliableMessage();
-- 
cgit v1.2.3


From 29dc24a3ea8d6f3d3aa83fd6b22921937d0dd430 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Tue, 14 Dec 2010 14:53:51 +0200
Subject: STORM-713 FIXED XML/UI issues in llTextBox

- As the class LLToastNotifyPanel is deprecated, made the class LLToastScriptTextbox derived directly from LLToastPanel.

- Added callback for ignore button.

Now LLToastScriptTextbox has its own XML, therefore it's not needed to dynamically create toast panel.

Since LLToastNotifyPanel is deprecated all new notification toasts should be created this way.
---
 indra/newview/llscriptfloater.h                    |  4 +-
 indra/newview/lltoastscripttextbox.cpp             | 16 +++++-
 indra/newview/lltoastscripttextbox.h               | 13 +++--
 .../skins/default/xui/en/panel_notify_textbox.xml  | 66 +++++++++++++++-------
 4 files changed, 69 insertions(+), 30 deletions(-)

diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index dc52baa115..8e959a3d0e 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -30,7 +30,7 @@
 #include "lltransientdockablefloater.h"
 #include "llnotificationptr.h"
 
-class LLToastNotifyPanel;
+class LLToastPanel;
 
 /**
  * Handles script notifications ("ScriptDialog" and "ScriptDialogGroup")
@@ -206,7 +206,7 @@ protected:
 private:
 	bool isScriptTextbox(LLNotificationPtr notification);
 
-	LLToastNotifyPanel* mScriptForm;
+	LLToastPanel* mScriptForm;
 	LLUUID mNotificationId;
 	LLUUID mObjectId;
 	bool mSaveFloaterPosition;
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index c013f521cc..2529ec865a 100644
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -46,11 +46,16 @@
 
 const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 7;
 
-LLToastScriptTextbox::LLToastScriptTextbox(LLNotificationPtr& notification)
-:	LLToastNotifyPanel(notification)
+LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification)
+:	LLToastPanel(notification)
 {
 	buildFromFile( "panel_notify_textbox.xml");
 
+	LLTextEditor* text_editorp = getChild<LLTextEditor>("text_editor_box");
+	text_editorp->setValue(notification->getMessage());
+
+	getChild<LLButton>("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this));
+
 	const LLSD& payload = notification->getPayload();
 
 	//message body
@@ -107,3 +112,10 @@ void LLToastScriptTextbox::onClickSubmit()
 		llwarns << response << llendl;
 	}
 }
+
+void LLToastScriptTextbox::onClickIgnore()
+{
+	LLSD response = mNotification->getResponseTemplate();
+	mNotification->respond(response);
+	close();
+}
diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h
index ae3b545e0a..8e69d8834d 100644
--- a/indra/newview/lltoastscripttextbox.h
+++ b/indra/newview/lltoastscripttextbox.h
@@ -30,13 +30,11 @@
 #include "lltoastnotifypanel.h"
 #include "llnotificationptr.h"
 
-class LLButton;
-
 /**
  * Toast panel for scripted llTextbox notifications.
  */
 class LLToastScriptTextbox
-:	public LLToastNotifyPanel
+:	public LLToastPanel
 {
 public:
 	void close();
@@ -46,12 +44,15 @@ public:
 	// Non-transient messages.  You can specify non-default button
 	// layouts (like one for script dialogs) by passing various
 	// numbers in for "layout".
-	LLToastScriptTextbox(LLNotificationPtr& notification);
+	LLToastScriptTextbox(const LLNotificationPtr& notification);
 
 	/*virtual*/ ~LLToastScriptTextbox();
-protected:
-	void onClickSubmit();
+
 private:
+
+	void onClickSubmit();
+	void onClickIgnore();
+
 	static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
 };
 
diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
index 4634eeed46..d5b6057233 100644
--- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
+++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
    background_visible="true"
-   height="230"
+   height="220"
    label="instant_message"
    layout="topleft"
    left="0"
@@ -14,55 +14,81 @@
   <panel
    bevel_style="none"
    follows="left|right|top"
-   height="150"
+   height="185"
    label="info_panel"
    layout="topleft"
    left="0"
    name="info_panel"
    top="0"
-   width="305">
+   width="305">    
+    <text_editor
+     bg_readonly_color="0.0 0.0 0.0 0"
+     enabled="false"
+     follows="left|right|top|bottom"
+     font="SansSerif"
+     height="110" 
+     layout="topleft"
+     left="10"
+     mouse_opaque="false"
+     name="text_editor_box"
+     read_only="true"
+     text_color="white"
+     text_readonly_color="white"
+     top="10"
+     width="285"
+     wrap="true"
+     parse_highlights="true"
+     parse_urls="true"/>
     <text_editor
      parse_urls="true"
      enabled="true"
      follows="all"
-     height="60"
+     height="50"
      layout="topleft"
-     left="25"
+     left="10"
      max_length="250"
      name="message"
      parse_highlights="true"
      read_only="false"
-     top="40"
+     top_pad="10"
      type="string"
      use_ellipses="true"
      value="message"
-     width="260"
-     word_wrap="true" >
+     width="285"
+     word_wrap="true"
+     parse_url="false" >
     </text_editor>
-     parse_urls="false"
-    <button
-     top="110"
-     follows="top|left"
-     height="20"
-     label="Submit"
-     layout="topleft"
-     left="25"
-     name="btn_submit"
-     width="70" />
   </panel>
   <panel
      background_visible="false"
      follows="left|right|bottom"
-     height="0" 
+     height="25" 
      width="290"
      label="control_panel"
      layout="topleft"
      left="10"
      name="control_panel"
-     top_pad="5">
+     top_pad="0">
     <!-- 
 	 Notes:
 	 This panel holds the Ignore button and possibly other buttons of notification.
       -->
+    <button
+     top="0"
+     follows="top|left"
+     height="20"
+     label="Submit"
+     layout="topleft"
+     name="btn_submit"
+     width="70" />
+    <button
+     follows="top|right"
+     height="20"
+     label="Ignore"
+     layout="topleft"
+     left="215"
+     name="ignore_btn"
+     top="0"
+     width="70" />
   </panel>
 </panel>
-- 
cgit v1.2.3


From ff38b75bbf2c766af57834bc8d136d58a2a56f9d Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Tue, 14 Dec 2010 17:04:22 +0200
Subject: STORM-434 FIXED Tooltips don't appear on Mini-Location bar.

- Added localized tooltips for icons and info button in LLPanelTopInfoBar
---
 indra/newview/llpaneltopinfobar.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index a9ca7314ce..30949f8f02 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -38,6 +38,7 @@
 #include "llsidetray.h"
 #include "llslurl.h"
 #include "llstatusbar.h"
+#include "lltrans.h"
 #include "llviewercontrol.h"
 #include "llviewerinventory.h"
 #include "llviewermenu.h"
@@ -102,6 +103,13 @@ void LLPanelTopInfoBar::initParcelIcons()
 	mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon");
 	mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon");
 
+	mParcelIcon[VOICE_ICON]->setToolTip(LLTrans::getString("LocationCtrlVoiceTooltip"));
+	mParcelIcon[FLY_ICON]->setToolTip(LLTrans::getString("LocationCtrlFlyTooltip"));
+	mParcelIcon[PUSH_ICON]->setToolTip(LLTrans::getString("LocationCtrlPushTooltip"));
+	mParcelIcon[BUILD_ICON]->setToolTip(LLTrans::getString("LocationCtrlBuildTooltip"));
+	mParcelIcon[SCRIPTS_ICON]->setToolTip(LLTrans::getString("LocationCtrlScriptsTooltip"));
+	mParcelIcon[DAMAGE_ICON]->setToolTip(LLTrans::getString("LocationCtrlDamageTooltip"));
+
 	mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON));
 	mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON));
 	mParcelIcon[PUSH_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PUSH_ICON));
@@ -129,6 +137,7 @@ BOOL LLPanelTopInfoBar::postBuild()
 {
 	mInfoBtn = getChild<LLButton>("place_info_btn");
 	mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this));
+	mInfoBtn->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
 
 	mParcelInfoText = getChild<LLTextBox>("parcel_info_text");
 	mDamageText = getChild<LLTextBox>("damage_text");
-- 
cgit v1.2.3


From a702b34394e4b38b27338eb6d68d22b498984118 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Tue, 14 Dec 2010 17:11:08 +0200
Subject: STORM-352 FIXED Vertical scrollbar isn't reshaped in resident profile
 panel after decreasing panel height

- Set height of scroll container the same as bounding panel's height
---
 indra/newview/skins/default/xui/en/panel_profile.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 7caf425058..61e3bb354f 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -59,7 +59,7 @@
          left="0"
          name="profile_scroll"
          opaque="true"
-         height="527"
+         height="400"
          width="317"
          top="0">
           <panel
-- 
cgit v1.2.3


From 4f798c40d8b57eedac0dbaeb992eeb715cd55850 Mon Sep 17 00:00:00 2001
From: "Christian Goetze (CG)" <cg@lindenlab.com>
Date: Tue, 14 Dec 2010 15:32:32 -0800
Subject: Remove reference to then test codeticket service.

---
 BuildParams | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/BuildParams b/BuildParams
index 8e4164d5ca..dadacb0682 100644
--- a/BuildParams
+++ b/BuildParams
@@ -46,9 +46,6 @@ viewer-beta.viewer_channel = "Second Life Beta Viewer"
 viewer-beta.login_channel = "Second Life Beta Viewer"
 viewer-beta.build_debug_release_separately = true
 viewer-beta.build_viewer_update_version_manager = true
-# Settings to test new code ticket service
-viewer-beta.codeticket_server_url = "http://pdp75.lindenlab.com:8000/codeticket/linden/"
-viewer-beta.codeticket_add_context = true
 
 # ========================================
 # Viewer Release
-- 
cgit v1.2.3


From 27f3470b7ecff97e5e7798a3cf120260c209fc42 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Wed, 15 Dec 2010 15:44:06 +0200
Subject: STORM-786 FIXED Fixed disappearing controls in avatar picks list.

Caused by an improper fix of STORM-690.

Made the way we switch between profile view panels (profile view / pick_info / pick_edit)
more robust. It now suits both My Profile and Profile View panels.
---
 indra/newview/llpanelprofile.cpp | 126 +++++++++++++++++++++++++++++++++------
 indra/newview/llpanelprofile.h   |  29 ++++++++-
 2 files changed, 135 insertions(+), 20 deletions(-)

diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 6038ab20d8..f4e8392916 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -114,9 +114,102 @@ public:
 LLAgentHandler gAgentHandler;
 
 
+//-- LLPanelProfile::ChildStack begins ----------------------------------------
+LLPanelProfile::ChildStack::ChildStack(LLPanel* parent)
+:	mParent(parent)
+{
+	llassert_always(parent != NULL);
+}
+
+/// Save current parent's child views and remove them from the child list.
+bool LLPanelProfile::ChildStack::push()
+{
+	view_list_t vlist = *mParent->getChildList();
+
+	for (view_list_t::const_iterator it = vlist.begin(); it != vlist.end(); ++it)
+	{
+		LLView* viewp = *it;
+		mParent->removeChild(viewp);
+	}
+
+	mStack.push_back(vlist);
+	dump();
+	return true;
+}
+
+/// Restore saved children (adding them back to the child list).
+bool LLPanelProfile::ChildStack::pop()
+{
+	if (mStack.size() == 0)
+	{
+		llwarns << "Empty stack" << llendl;
+		llassert(mStack.size() == 0);
+		return false;
+	}
+
+	view_list_t& top = mStack.back();
+	for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+	{
+		LLView* viewp = *it;
+		mParent->addChild(viewp);
+	}
+
+	mStack.pop_back();
+	dump();
+	return true;
+}
+
+/// Temporarily add all saved children back.
+void LLPanelProfile::ChildStack::preParentReshape()
+{
+	mSavedStack = mStack;
+	while(mStack.size() > 0)
+	{
+		pop();
+	}
+}
+
+/// Add the temporarily saved children back.
+void LLPanelProfile::ChildStack::postParentReshape()
+{
+	mStack = mSavedStack;
+	mSavedStack = stack_t();
+
+	for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it)
+	{
+		const view_list_t& vlist = (*stack_it);
+		for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+		{
+			LLView* viewp = *list_it;
+			lldebugs << "removing " << viewp->getName() << llendl;
+			mParent->removeChild(viewp);
+		}
+	}
+}
+
+void LLPanelProfile::ChildStack::dump()
+{
+	unsigned lvl = 0;
+	lldebugs << "child stack dump:" << llendl;
+	for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl)
+	{
+		std::ostringstream dbg_line;
+		dbg_line << "lvl #" << lvl << ":";
+		const view_list_t& vlist = (*stack_it);
+		for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+		{
+			dbg_line << " " << (*list_it)->getName();
+		}
+		lldebugs << dbg_line.str() << llendl;
+	}
+}
+
+//-- LLPanelProfile::ChildStack ends ------------------------------------------
+
 LLPanelProfile::LLPanelProfile()
  : LLPanel()
  , mTabCtrl(NULL)
+ , mChildStack(this)
  , mAvatarId(LLUUID::null)
 {
 }
@@ -136,6 +229,15 @@ BOOL LLPanelProfile::postBuild()
 	return TRUE;
 }
 
+// virtual
+void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+	// Temporarily add saved children back and reshape them.
+	mChildStack.preParentReshape();
+	LLPanel::reshape(width, height, called_from_parent);
+	mChildStack.postParentReshape();
+}
+
 void LLPanelProfile::onOpen(const LLSD& key)
 {
 	// open the desired panel
@@ -177,7 +279,6 @@ void LLPanelProfile::onOpen(const LLSD& key)
 	}
 }
 
-//*TODO redo panel toggling
 void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
 {
 	// TRUE - we need to open/expand "panel"
@@ -204,21 +305,10 @@ void LLPanelProfile::onTabSelected(const LLSD& param)
 	}
 }
 
-void LLPanelProfile::setAllChildrenVisible(BOOL visible)
-{
-	const child_list_t* child_list = getChildList();
-	child_list_const_iter_t child_it = child_list->begin();
-	for (; child_it != child_list->end(); ++child_it)
-	{
-		LLView* viewp = *child_it;
-		viewp->setVisible(visible);
-	}
-}
-
 void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
 {
 	// Hide currently visible panel (STORM-690).
-	setAllChildrenVisible(FALSE);
+	mChildStack.push();
 
 	// Add the panel or bring it to front.
 	if (panel->getParent() != this)
@@ -231,7 +321,7 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
 	}
 
 	panel->setVisible(TRUE);
-
+	panel->setFocus(TRUE); // prevent losing focus by the floater
 	panel->onOpen(params);
 
 	LLRect new_rect = getRect();
@@ -249,15 +339,17 @@ void LLPanelProfile::closePanel(LLPanel* panel)
 		removeChild(panel);
 
 		// Make the underlying panel visible.
+		mChildStack.pop();
+
+		// Prevent losing focus by the floater
 		const child_list_t* child_list = getChildList();
 		if (child_list->size() > 0)
 		{
-			child_list->front()->setVisible(TRUE);
-			child_list->front()->setFocus(TRUE); // prevent losing focus by the floater
+			child_list->front()->setFocus(TRUE);
 		}
 		else
 		{
-			llwarns << "No underlying panel to make visible." << llendl;
+			llwarns << "No underlying panel to focus." << llendl;
 		}
 	}
 }
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index d2bcee8076..577b71f284 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -41,7 +41,7 @@ class LLPanelProfile : public LLPanel
 
 public:
 	/*virtual*/ BOOL postBuild();
-
+	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 	/*virtual*/ void onOpen(const LLSD& key);
 
 	virtual void togglePanel(LLPanel*, const LLSD& key = LLSD());
@@ -58,8 +58,6 @@ protected:
 
 	virtual void onTabSelected(const LLSD& param);
 
-	virtual void setAllChildrenVisible(BOOL visible);
-
 	LLTabContainer* getTabCtrl() { return mTabCtrl; }
 
 	const LLUUID& getAvatarId() { return mAvatarId; }
@@ -72,8 +70,33 @@ protected:
 
 private:
 
+	//-- ChildStack begins ----------------------------------------------------
+	class ChildStack
+	{
+		LOG_CLASS(LLPanelProfile::ChildStack);
+	public:
+		ChildStack(LLPanel* parent);
+
+		bool push();
+		bool pop();
+		void preParentReshape();
+		void postParentReshape();
+
+	private:
+		void dump();
+
+		typedef LLView::child_list_t view_list_t;
+		typedef std::list<view_list_t> stack_t;
+
+		stack_t		mStack;
+		stack_t		mSavedStack;
+		LLPanel*	mParent;
+	};
+	//-- ChildStack ends ------------------------------------------------------
+
 	LLTabContainer* mTabCtrl;	
 	profile_tabs_t mTabContainer;
+	ChildStack		mChildStack;
 	LLUUID mAvatarId;
 };
 
-- 
cgit v1.2.3


From 10d9328b86991272b6cbc7eda73e8f09afccfb52 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Wed, 15 Dec 2010 16:00:37 +0200
Subject: STORM-786 ADDITIONAL FIX Fixed Windows build.

---
 indra/newview/llpanelprofile.cpp | 11 ++++++++---
 indra/newview/llpanelprofile.h   |  3 ++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index f4e8392916..b035d7d473 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -115,10 +115,15 @@ LLAgentHandler gAgentHandler;
 
 
 //-- LLPanelProfile::ChildStack begins ----------------------------------------
-LLPanelProfile::ChildStack::ChildStack(LLPanel* parent)
-:	mParent(parent)
+LLPanelProfile::ChildStack::ChildStack()
+:	mParent(NULL)
+{
+}
+
+void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
 {
 	llassert_always(parent != NULL);
+	mParent = parent;
 }
 
 /// Save current parent's child views and remove them from the child list.
@@ -209,9 +214,9 @@ void LLPanelProfile::ChildStack::dump()
 LLPanelProfile::LLPanelProfile()
  : LLPanel()
  , mTabCtrl(NULL)
- , mChildStack(this)
  , mAvatarId(LLUUID::null)
 {
+	mChildStack.setParent(this);
 }
 
 BOOL LLPanelProfile::postBuild()
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 577b71f284..0a572e6f25 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -75,7 +75,8 @@ private:
 	{
 		LOG_CLASS(LLPanelProfile::ChildStack);
 	public:
-		ChildStack(LLPanel* parent);
+		ChildStack();
+		void setParent(LLPanel* parent);
 
 		bool push();
 		bool pop();
-- 
cgit v1.2.3


From 73962e2134035855def0177db171d8eddaa193cb Mon Sep 17 00:00:00 2001
From: Seth ProductEngine <slitovchuk@productengine.com>
Date: Thu, 16 Dec 2010 00:50:03 +0200
Subject: STORM-771 FIXED Pasting wearable items from clipboard to Current
 Outfit or an outfit folder now creates links to these items.

---
 indra/newview/llinventorybridge.cpp | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5ba87423c7..ab0acbae50 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -104,6 +104,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
 bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*);
 bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
 void teleport_via_landmark(const LLUUID& asset_id);
+static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
 
 // +=================================================+
 // |        LLInvFVBridge                            |
@@ -2341,6 +2342,10 @@ void LLFolderBridge::pasteFromClipboard()
 	LLInventoryModel* model = getInventoryModel();
 	if(model && isClipboardPasteable())
 	{
+		const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+		const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+		const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
 		const LLUUID parent_id(mUUID);
 
 		LLDynamicArray<LLUUID> objects;
@@ -2353,7 +2358,14 @@ void LLFolderBridge::pasteFromClipboard()
 			LLInventoryItem *item = model->getItem(item_id);
 			if (item)
 			{
-				if(LLInventoryClipboard::instance().isCutMode())
+				if (move_is_into_current_outfit || move_is_into_outfit)
+				{
+					if (can_move_to_outfit(item, move_is_into_current_outfit))
+					{
+						dropToOutfit(item, move_is_into_current_outfit);
+					}
+				}
+				else if(LLInventoryClipboard::instance().isCutMode())
 				{
 					// move_inventory_item() is not enough,
 					//we have to update inventory locally too
@@ -2381,9 +2393,13 @@ void LLFolderBridge::pasteFromClipboard()
 
 void LLFolderBridge::pasteLinkFromClipboard()
 {
-	const LLInventoryModel* model = getInventoryModel();
+	LLInventoryModel* model = getInventoryModel();
 	if(model)
 	{
+		const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+		const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+		const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
 		const LLUUID parent_id(mUUID);
 
 		LLDynamicArray<LLUUID> objects;
@@ -2393,7 +2409,15 @@ void LLFolderBridge::pasteLinkFromClipboard()
 			 ++iter)
 		{
 			const LLUUID &object_id = (*iter);
-			if (LLInventoryCategory *cat = model->getCategory(object_id))
+			if (move_is_into_current_outfit || move_is_into_outfit)
+			{
+				LLInventoryItem *item = model->getItem(object_id);
+				if (item && can_move_to_outfit(item, move_is_into_current_outfit))
+				{
+					dropToOutfit(item, move_is_into_current_outfit);
+				}
+			}
+			else if (LLInventoryCategory *cat = model->getCategory(object_id))
 			{
 				const std::string empty_description = "";
 				link_inventory_item(
-- 
cgit v1.2.3


From 4056ab8fbf70a684aea64c8106c72f9e870ebe56 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 17 Dec 2010 14:45:47 -0600
Subject: SH-506 Remove (now obsolete) streaming cost info display.

---
 indra/newview/llviewerwindow.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c929691d2d..96ee3f6180 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -519,10 +519,6 @@ public:
 
 			ypos += y_inc;
 
-			addText(xpos, ypos, llformat("Selection Streaming Cost: %.3f ", LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost()));
-
-			ypos += y_inc;
-
 			addText(xpos, ypos, llformat("Selection Triangle Count: %.3f Ktris ", LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount()/1000.f));
 
 			ypos += y_inc;
-- 
cgit v1.2.3


From ac7fad4cd0beeee670be40fae1956e5f22a0f17d Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 17 Dec 2010 14:58:39 -0600
Subject: SH-558 Fix for crash in physics shape display.

---
 indra/newview/llspatialpartition.cpp | 81 +++++++++++++++++++-----------------
 1 file changed, 42 insertions(+), 39 deletions(-)

diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 6b77209867..cc54f21a7e 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3001,56 +3001,59 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
 					index_offset += face.mNumVertices;
 				}
 
-				LLCDMeshData mesh;
-				mesh.mIndexBase = &index[0];
-				mesh.mVertexBase = pos[0].mV;
-				mesh.mNumVertices = pos.size();
-				mesh.mVertexStrideBytes = 12;
-				mesh.mIndexStrideBytes = 6;
-				mesh.mIndexType = LLCDMeshData::INT_16;
-
-				mesh.mNumTriangles = index.size()/3;
-				
-				LLCDMeshData res;
+				if (!pos.empty() && !index.empty())
+				{
+					LLCDMeshData mesh;
+					mesh.mIndexBase = &index[0];
+					mesh.mVertexBase = pos[0].mV;
+					mesh.mNumVertices = pos.size();
+					mesh.mVertexStrideBytes = 12;
+					mesh.mIndexStrideBytes = 6;
+					mesh.mIndexType = LLCDMeshData::INT_16;
+
+					mesh.mNumTriangles = index.size()/3;
+					
+					LLCDMeshData res;
 
-				LLConvexDecomposition::getInstance()->generateSingleHullMeshFromMesh( &mesh, &res );
+					LLConvexDecomposition::getInstance()->generateSingleHullMeshFromMesh( &mesh, &res );
 
-				//copy res into phys_volume
-				phys_volume->mHullPoints = (LLVector4a*) malloc(sizeof(LLVector4a)*res.mNumVertices);
-				phys_volume->mNumHullPoints = res.mNumVertices;
+					//copy res into phys_volume
+					phys_volume->mHullPoints = (LLVector4a*) malloc(sizeof(LLVector4a)*res.mNumVertices);
+					phys_volume->mNumHullPoints = res.mNumVertices;
 
-				S32 idx_size = (res.mNumTriangles*3*2+0xF) & ~0xF;
-				phys_volume->mHullIndices = (U16*) malloc(idx_size);
-				phys_volume->mNumHullIndices = res.mNumTriangles*3;
+					S32 idx_size = (res.mNumTriangles*3*2+0xF) & ~0xF;
+					phys_volume->mHullIndices = (U16*) malloc(idx_size);
+					phys_volume->mNumHullIndices = res.mNumTriangles*3;
 
-				const F32* v = res.mVertexBase;
+					const F32* v = res.mVertexBase;
 
-				for (S32 i = 0; i < res.mNumVertices; ++i)
-				{
-					F32* p = (F32*) ((U8*)v+i*res.mVertexStrideBytes);
-					phys_volume->mHullPoints[i].load3(p);
-				}
+					for (S32 i = 0; i < res.mNumVertices; ++i)
+					{
+						F32* p = (F32*) ((U8*)v+i*res.mVertexStrideBytes);
+						phys_volume->mHullPoints[i].load3(p);
+					}
 
-				if (res.mIndexType == LLCDMeshData::INT_16)
-				{
-					for (S32 i = 0; i < res.mNumTriangles; ++i)
+					if (res.mIndexType == LLCDMeshData::INT_16)
 					{
-						U16* idx = (U16*) (((U8*)res.mIndexBase)+i*res.mIndexStrideBytes);
+						for (S32 i = 0; i < res.mNumTriangles; ++i)
+						{
+							U16* idx = (U16*) (((U8*)res.mIndexBase)+i*res.mIndexStrideBytes);
 
-						phys_volume->mHullIndices[i*3+0] = idx[0];
-						phys_volume->mHullIndices[i*3+1] = idx[1];
-						phys_volume->mHullIndices[i*3+2] = idx[2];
+							phys_volume->mHullIndices[i*3+0] = idx[0];
+							phys_volume->mHullIndices[i*3+1] = idx[1];
+							phys_volume->mHullIndices[i*3+2] = idx[2];
+						}
 					}
-				}
-				else
-				{
-					for (S32 i = 0; i < res.mNumTriangles; ++i)
+					else
 					{
-						U32* idx = (U32*) (((U8*)res.mIndexBase)+i*res.mIndexStrideBytes);
+						for (S32 i = 0; i < res.mNumTriangles; ++i)
+						{
+							U32* idx = (U32*) (((U8*)res.mIndexBase)+i*res.mIndexStrideBytes);
 
-						phys_volume->mHullIndices[i*3+0] = (U16) idx[0];
-						phys_volume->mHullIndices[i*3+1] = (U16) idx[1];
-						phys_volume->mHullIndices[i*3+2] = (U16) idx[2];
+							phys_volume->mHullIndices[i*3+0] = (U16) idx[0];
+							phys_volume->mHullIndices[i*3+1] = (U16) idx[1];
+							phys_volume->mHullIndices[i*3+2] = (U16) idx[2];
+						}
 					}
 				}
 			}
-- 
cgit v1.2.3


From e9d21ba941a52665d7ad2ee3483c6ac7b7ec6486 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 20 Dec 2010 15:09:15 -0600
Subject: Fix for windows build.  Reviewed by Nyx.

---
 indra/llmath/llsimdmath.h | 2 ++
 indra/llmath/llvolume.cpp | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index b6ac5190a7..c7cdf7b32c 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -35,7 +35,9 @@
 #error SSE2 not enabled. LLVector4a and related class will not compile.
 #endif
 
+#if !LL_WINDOWS
 #include <stdint.h>
+#endif
 
 template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address) 
 { 
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index c0b50b606e..8a7b19800c 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -29,7 +29,9 @@
 #include "llmath.h"
 
 #include <set>
+#if !LL_WINDOWS
 #include <stdint.h>
+#endif
 
 #include "llerror.h"
 #include "llmemtype.h"
-- 
cgit v1.2.3