From 2e47e6d816f08bf75ed7dd06230996cfa606a737 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Thu, 25 Mar 2010 17:21:39 -0600
Subject: fix for EXT-5854:Unable to Pay Object That Features Transparant
 (alpha) Texture. (transplanted from 3939f139f6caff2bb192a2afde18e51aada4d57a)

---
 indra/llrender/llimagegl.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 68b556c3bb..cd851cf8a3 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1705,8 +1705,8 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
 	U32 size = pick_width * pick_height;
 	size = (size + 7) / 8; // pixelcount-to-bits
 	mPickMask = new U8[size];
-	mPickMaskWidth = pick_width;
-	mPickMaskHeight = pick_height;
+	mPickMaskWidth = pick_width - 1;
+	mPickMaskHeight = pick_height - 1;
 
 	memset(mPickMask, 0, sizeof(U8) * size);
 
@@ -1749,20 +1749,20 @@ BOOL LLImageGL::getMask(const LLVector2 &tc)
 			llassert(false);
 		}
 
-		llassert(mPickMaskWidth > 0 && mPickMaskHeight > 0);
+		llassert(mPickMaskWidth >= 0 && mPickMaskHeight >= 0);
 		
 		S32 x = llfloor(u * mPickMaskWidth);
 		S32 y = llfloor(v * mPickMaskHeight);
 
-		if (LL_UNLIKELY(x >= mPickMaskWidth))
+		if (LL_UNLIKELY(x > mPickMaskWidth))
 		{
 			LL_WARNS_ONCE("render") << "Ooh, width overrun on pick mask read, that coulda been bad." << LL_ENDL;
-			x = llmax(0, mPickMaskWidth-1);
+			x = llmax((U16)0, mPickMaskWidth);
 		}
-		if (LL_UNLIKELY(y >= mPickMaskHeight))
+		if (LL_UNLIKELY(y > mPickMaskHeight))
 		{
 			LL_WARNS_ONCE("render") << "Ooh, height overrun on pick mask read, that woulda been bad." << LL_ENDL;
-			y = llmax(0, mPickMaskHeight-1);
+			y = llmax((U16)0, mPickMaskHeight);
 		}
 
 		S32 idx = y*mPickMaskWidth+x;
-- 
cgit v1.2.3


From 12e570913cadc1c2abb82306d42f9cd93dd7cba6 Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Fri, 26 Mar 2010 16:57:56 -0700
Subject: EXT-EXT-6317 - cursor does not indicate clicking will trigger an
 action when over transparent objects

reviewed by Leyla
(transplanted from 4b90aa824b05ef6d29973b55bec8eb6210e1edf9)
---
 indra/newview/lltoolpie.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index d15db536e6..aa5c99439c 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -496,6 +496,8 @@ void LLToolPie::selectionPropertiesReceived()
 BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 {
 	mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
+	// perform a separate pick that detects transparent objects since they respond to 1-click actions
+	LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE);
 
 	// Show screen-space highlight glow effect
 	bool show_highlight = false;
@@ -507,10 +509,11 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 		parent = object->getRootEdit();
 	}
 
-	if (object && useClickAction(mask, object, parent))
+	LLViewerObject* click_action_object = click_action_pick.getObject();
+	if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit()))
 	{
 		show_highlight = true;
-		ECursorType cursor = cursor_from_object(object);
+		ECursorType cursor = cursor_from_object(click_action_object);
 		gViewerWindow->setCursor(cursor);
 		lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
 	}
-- 
cgit v1.2.3


From 6a1677d9e5907b4e34a0e71084a95c1fa138569d Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Fri, 26 Mar 2010 08:54:58 +0000
Subject: If the EXT-5854 fix is correct, this assert no longer makes sense.
 (transplanted from 3bef6f249a0ab74f823e67fb32339abb92b13165)

---
 indra/llrender/llimagegl.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index cd851cf8a3..8addee606b 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1749,8 +1749,6 @@ BOOL LLImageGL::getMask(const LLVector2 &tc)
 			llassert(false);
 		}
 
-		llassert(mPickMaskWidth >= 0 && mPickMaskHeight >= 0);
-		
 		S32 x = llfloor(u * mPickMaskWidth);
 		S32 y = llfloor(v * mPickMaskHeight);
 
-- 
cgit v1.2.3


From cdbdb1168694bcbfc58208f2941f513b556a0d6e Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 6 Apr 2010 14:47:20 -0400
Subject: EXT-4151 : Immediately check if a fetchObserver filter is done, else
 add to observer list automatically

FetchObservers now take in a list of IDs to check against.
Made some naming changes.
---
 indra/newview/llagentwearables.cpp      | 21 +++++----
 indra/newview/llagentwearablesfetch.cpp | 35 ++++++++-------
 indra/newview/llagentwearablesfetch.h   |  4 +-
 indra/newview/llappearancemgr.h         | 17 ++++---
 indra/newview/llfloatergesture.cpp      |  6 ++-
 indra/newview/llfriendcard.cpp          | 15 ++++---
 indra/newview/llgesturemgr.cpp          |  5 ++-
 indra/newview/llgesturemgr.h            |  2 +-
 indra/newview/llinventorybridge.cpp     | 27 ++++++++----
 indra/newview/llinventoryobserver.cpp   | 43 +++++++++++-------
 indra/newview/llinventoryobserver.h     | 78 +++++++++++++++++----------------
 indra/newview/llpaneloutfitedit.cpp     |  3 +-
 indra/newview/llsidepanelappearance.cpp | 12 ++---
 indra/newview/llstartup.cpp             |  3 +-
 indra/newview/lltooldraganddrop.cpp     | 16 ++++---
 indra/newview/llviewermenu.cpp          | 15 ++++---
 indra/newview/llviewermessage.cpp       | 29 +++++++-----
 17 files changed, 187 insertions(+), 144 deletions(-)

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 9d3b5763e8..bc8931827e 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -905,8 +905,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
 
 		// Get the UUID of the current outfit folder (will be created if it doesn't exist)
 		const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
-		
-		LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch();
+		uuid_vec_t folders;
+		folders.push_back(current_outfit_id);
+		LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(folders);
 		
 		//lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
 		// Add wearables
@@ -952,9 +953,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
 		
 		// Get the complete information on the items in the inventory and set up an observer
 		// that will trigger when the complete information is fetched.
-		uuid_vec_t folders;
-		folders.push_back(current_outfit_id);
-		outfit->fetch(folders);
+		outfit->startFetch();
 		if(outfit->isEverythingComplete())
 		{
 			// everything is already here - call done.
@@ -2061,16 +2060,16 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
 {	
 	llinfos << "starting outfit population" << llendl;
 
-	LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch();
+	const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
+	uuid_vec_t folders;
+	folders.push_back(my_outfits_id);
+	LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(folders);
+	outfits->mMyOutfitsID = my_outfits_id;
 	
 	// Get the complete information on the items in the inventory and 
 	// setup an observer that will wait for that to happen.
-	uuid_vec_t folders;
-	outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
-
-	folders.push_back(outfits->mMyOutfitsID);
 	gInventory.addObserver(outfits);
-	outfits->fetch(folders);
+	outfits->startFetch();
 	if (outfits->isEverythingComplete())
 	{
 		outfits->done();
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 3d6740f5a1..6b7edaa302 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -39,7 +39,8 @@
 #include "llinventoryfunctions.h"
 #include "llvoavatarself.h"
 
-LLInitialWearablesFetch::LLInitialWearablesFetch()
+LLInitialWearablesFetch::LLInitialWearablesFetch(const uuid_vec_t& ids) :
+	LLInventoryFetchDescendentsObserver(ids)
 {
 }
 
@@ -86,12 +87,11 @@ void LLInitialWearablesFetch::processContents()
 	delete this;
 }
 
-class LLFetchAndLinkObserver: public LLInventoryFetchObserver
+class LLFetchAndLinkObserver: public LLInventoryFetchItemsObserver
 {
 public:
 	LLFetchAndLinkObserver(uuid_vec_t& ids):
-		m_ids(ids),
-		LLInventoryFetchObserver(true) // retry for missing items
+		LLInventoryFetchItemsObserver(ids, true) // retry for missing items
 	{
 	}
 	~LLFetchAndLinkObserver()
@@ -103,8 +103,8 @@ public:
 
 		// Link to all fetched items in COF.
 		LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
-		for (uuid_vec_t::iterator it = m_ids.begin();
-			 it != m_ids.end();
+		for (uuid_vec_t::iterator it = mIDs.begin();
+			 it != mIDs.end();
 			 ++it)
 		{
 			LLUUID id = *it;
@@ -123,8 +123,6 @@ public:
 								link_waiter);
 		}
 	}
-private:
-	uuid_vec_t m_ids;
 };
 
 void LLInitialWearablesFetch::processWearablesMessage()
@@ -173,9 +171,9 @@ void LLInitialWearablesFetch::processWearablesMessage()
 
 		// Need to fetch the inventory items for ids, then create links to them after they arrive.
 		LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids);
-		fetcher->fetch(ids);
+		fetcher->startFetch();
 		// If no items to be fetched, done will never be triggered.
-		// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
+		// TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
 		if (fetcher->isEverythingComplete())
 		{
 			fetcher->done();
@@ -191,7 +189,8 @@ void LLInitialWearablesFetch::processWearablesMessage()
 	}
 }
 
-LLLibraryOutfitsFetch::LLLibraryOutfitsFetch() : 
+LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const uuid_vec_t& ids) : 
+	LLInventoryFetchDescendentsObserver(ids),
 	mCurrFetchStep(LOFS_FOLDER), 
 	mOutfitsPopulated(false) 
 {
@@ -288,7 +287,8 @@ void LLLibraryOutfitsFetch::folderDone()
 	uuid_vec_t folders;
 	folders.push_back(mClothingID);
 	folders.push_back(mLibraryClothingID);
-	fetch(folders);
+	setFolders(folders);
+	startFetch();
 	if (isEverythingComplete())
 	{
 		done();
@@ -337,8 +337,8 @@ void LLLibraryOutfitsFetch::outfitsDone()
 	}
 	
 	mComplete.clear();
-	
-	fetch(folders);
+	setFolders(folders);
+	startFetch();
 	if (isEverythingComplete())
 	{
 		done();
@@ -434,8 +434,8 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
 	folders.push_back(mImportedClothingID);
 	
 	mComplete.clear();
-	
-	fetch(folders);
+	setFolders(folders);
+	startFetch();
 	if (isEverythingComplete())
 	{
 		done();
@@ -464,7 +464,8 @@ void LLLibraryOutfitsFetch::importedFolderDone()
 	}
 	
 	mComplete.clear();
-	fetch(folders);
+	setFolders(folders);
+	startFetch();
 	if (isEverythingComplete())
 	{
 		done();
diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h
index 1d0c6739ba..33368811c0 100644
--- a/indra/newview/llagentwearablesfetch.h
+++ b/indra/newview/llagentwearablesfetch.h
@@ -47,7 +47,7 @@
 class LLInitialWearablesFetch : public LLInventoryFetchDescendentsObserver
 {
 public:
-	LLInitialWearablesFetch();
+	LLInitialWearablesFetch(const uuid_vec_t& ids);
 	~LLInitialWearablesFetch();
 	virtual void done();
 
@@ -92,7 +92,7 @@ public:
 		LOFS_CONTENTS
 	};
 
-	LLLibraryOutfitsFetch();
+	LLLibraryOutfitsFetch(const uuid_vec_t& ids);
 	~LLLibraryOutfitsFetch();
 
 	virtual void done();
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 40b8844731..1cf8d584db 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -244,10 +244,12 @@ void doOnIdleRepeating(T callable)
 }
 
 template <class T>
-class CallAfterCategoryFetchStage2: public LLInventoryFetchObserver
+class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
 {
 public:
-	CallAfterCategoryFetchStage2(T callable):
+	CallAfterCategoryFetchStage2(const uuid_vec_t& ids,
+								 T callable) :
+		LLInventoryFetchItemsObserver(ids),
 		mCallable(callable)
 	{
 	}
@@ -268,7 +270,8 @@ template <class T>
 class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
 {
 public:
-	CallAfterCategoryFetchStage1(T callable):
+	CallAfterCategoryFetchStage1(const uuid_vec_t& ids, T callable) :
+		LLInventoryFetchDescendentsObserver(ids),
 		mCallable(callable)
 	{
 	}
@@ -297,7 +300,6 @@ public:
 			return;
 		}
 
-		CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable);
 		uuid_vec_t ids;
 		for(S32 i = 0; i < count; ++i)
 		{
@@ -307,7 +309,8 @@ public:
 		gInventory.removeObserver(this);
 		
 		// do the fetch
-		stage2->fetch(ids);
+		CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable);
+		stage2->startFetch();
 		if(stage2->isEverythingComplete())
 		{
 			// everything is already here - call done.
@@ -328,10 +331,10 @@ protected:
 template <class T> 
 void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
 {
-	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable);
 	uuid_vec_t folders;
 	folders.push_back(cat_id);
-	stage1->fetch(folders);
+	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(folders, callable);
+	stage1->startFetch();
 	if (stage1->isEverythingComplete())
 	{
 		stage1->done();
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 8ee8d13a9c..04fb6bca3c 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -148,7 +148,8 @@ void LLFloaterGesture::done()
 		if (!unloaded_folders.empty())
 		{
 			LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL;
-			fetch(unloaded_folders);
+			setFolders(unloaded_folders);
+			startFetch();
 		}
 		else
 		{
@@ -202,7 +203,8 @@ BOOL LLFloaterGesture::postBuild()
 	folders.push_back(mGestureFolderID);
 	//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details.
 	gInventory.addObserver(this);
-	fetch(folders);
+	setFolders(folders);
+	startFetch();
 
 	if (mGestureList)
 	{
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 6f069cca17..aaa09ba5da 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -111,8 +111,11 @@ class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
 public:
 	typedef boost::function<void()> callback_t;
 
-	LLInitialFriendCardsFetch(callback_t cb)
-		:	mCheckFolderCallback(cb)	{}
+	LLInitialFriendCardsFetch(const uuid_vec_t& ids,
+							  callback_t cb) :
+		LLInventoryFetchDescendentsObserver(ids),
+		mCheckFolderCallback(cb)	
+	{}
 
 	/* virtual */ void done();
 
@@ -407,13 +410,11 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
 
 void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id,  callback_t cb)
 {
-	// This instance will be deleted in LLInitialFriendCardsFetch::done().
-	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb);
-
 	uuid_vec_t folders;
 	folders.push_back(folder_id);
-
-	fetch->fetch(folders);
+	// This instance will be deleted in LLInitialFriendCardsFetch::done().
+	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folders, cb);
+	fetch->startFetch();
 	if(fetch->isEverythingComplete())
 	{
 		// everything is already here - call done.
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index a4342a4bc9..034806acfc 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -100,7 +100,7 @@ void LLGestureMgr::init()
 
 void LLGestureMgr::changed(U32 mask) 
 { 
-	LLInventoryFetchObserver::changed(mask);
+	LLInventoryFetchItemsObserver::changed(mask);
 
 	if (mask & LLInventoryObserver::GESTURE)
 	{
@@ -1033,7 +1033,8 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
 				// Watch this item and set gesture name when item exists in inventory
 				uuid_vec_t ids;
 				ids.push_back(item_id);
-				self.fetch(ids);
+				self.setItems(ids);
+				self.startFetch();
 			}
 			self.mActive[item_id] = gesture;
 
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 081ca983a9..5f2c3e2d61 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -54,7 +54,7 @@ public:
 	virtual void changed() = 0;
 };
 
-class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchObserver
+class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchItemsObserver
 {
 public:
 
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index b552b5ac07..82043ab523 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1933,13 +1933,17 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
 }
 
 //Used by LLFolderBridge as callback for directory recursion.
-class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver
+class LLRightClickInventoryFetchObserver : public LLInventoryFetchItemsObserver
 {
 public:
-	LLRightClickInventoryFetchObserver() :
+	LLRightClickInventoryFetchObserver(const uuid_vec_t& ids) :
+		LLInventoryFetchItemsObserver(ids),
 		mCopyItems(false)
 	{ };
-	LLRightClickInventoryFetchObserver(const LLUUID& cat_id, bool copy_items) :
+	LLRightClickInventoryFetchObserver(const uuid_vec_t& ids,
+									   const LLUUID& cat_id, 
+									   bool copy_items) :
+		LLInventoryFetchItemsObserver(ids),
 		mCatID(cat_id),
 		mCopyItems(copy_items)
 	{ };
@@ -1963,7 +1967,11 @@ protected:
 class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver
 {
 public:
-	LLRightClickInventoryFetchDescendentsObserver(bool copy_items) : mCopyItems(copy_items) {}
+	LLRightClickInventoryFetchDescendentsObserver(const uuid_vec_t& ids,
+												  bool copy_items) : 
+		LLInventoryFetchDescendentsObserver(ids),
+		mCopyItems(copy_items) 
+	{}
 	~LLRightClickInventoryFetchDescendentsObserver() {}
 	virtual void done();
 protected:
@@ -2006,14 +2014,14 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
 	}
 #endif
 
-	LLRightClickInventoryFetchObserver* outfit;
-	outfit = new LLRightClickInventoryFetchObserver(mComplete.front(), mCopyItems);
 	uuid_vec_t ids;
 	for(S32 i = 0; i < count; ++i)
 	{
 		ids.push_back(item_array.get(i)->getUUID());
 	}
 
+	LLRightClickInventoryFetchObserver* outfit = new LLRightClickInventoryFetchObserver(ids, mComplete.front(), mCopyItems);
+
 	// clean up, and remove this as an observer since the call to the
 	// outfit could notify observers and throw us into an infinite
 	// loop.
@@ -2026,7 +2034,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
 	inc_busy_count();
 
 	// do the fetch
-	outfit->fetch(ids);
+	outfit->startFetch();
 	outfit->done();				//Not interested in waiting and this will be right 99% of the time.
 //Uncomment the following code for laggy Inventory UI.
 /*	if(outfit->isEverythingComplete())
@@ -2715,7 +2723,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 
 		mMenu = &menu;
 		sSelf = this;
-		LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(FALSE);
+
 
 		uuid_vec_t folders;
 		LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
@@ -2723,7 +2731,8 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		{
 			folders.push_back(category->getUUID());
 		}
-		fetch->fetch(folders);
+		LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE);
+		fetch->startFetch();
 		inc_busy_count();
 		if(fetch->isEverythingComplete())
 		{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 83e1bbd5a0..0f8d76a4cc 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -108,12 +108,19 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
 	}
 }
 
-LLInventoryFetchObserver::LLInventoryFetchObserver(bool retry_if_missing) :
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(bool retry_if_missing) :
 	mRetryIfMissing(retry_if_missing)
 {
 }
 
-void LLInventoryFetchObserver::changed(U32 mask)
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& ids,
+															 bool retry_if_missing) :
+	mIDs(ids),
+	mRetryIfMissing(retry_if_missing)
+{
+}
+
+void LLInventoryFetchItemsObserver::changed(U32 mask)
 {
 	// scan through the incomplete items and move or erase them as
 	// appropriate.
@@ -153,11 +160,11 @@ void LLInventoryFetchObserver::changed(U32 mask)
 			done();
 		}
 	}
-	//llinfos << "LLInventoryFetchObserver::changed() mComplete size " << mComplete.size() << llendl;
-	//llinfos << "LLInventoryFetchObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
+	//llinfos << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << llendl;
+	//llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
 }
 
-bool LLInventoryFetchObserver::isEverythingComplete() const
+bool LLInventoryFetchItemsObserver::isEverythingComplete() const
 {
 	return mIncomplete.empty();
 }
@@ -223,11 +230,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
 	}
 }
 
-void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids)
+void LLInventoryFetchItemsObserver::startFetch()
 {
 	LLUUID owner_id;
 	LLSD items_llsd;
-	for(uuid_vec_t::const_iterator it = ids.begin(); it < ids.end(); ++it)
+	for(uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it)
 	{
 		LLViewerInventoryItem* item = gInventory.getItem(*it);
 		if(item)
@@ -262,6 +269,14 @@ void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids)
 	fetch_items_from_llsd(items_llsd);
 }
 
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver()
+{
+}
+
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& ids) :
+	mIDs(ids)
+{
+}
 // virtual
 void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 {
@@ -287,9 +302,9 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 	}
 }
 
-void LLInventoryFetchDescendentsObserver::fetch(const uuid_vec_t& ids)
+void LLInventoryFetchDescendentsObserver::startFetch()
 {
-	for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+	for(uuid_vec_t::const_iterator it = mIDs.begin(); it != mIDs.end(); ++it)
 	{
 		LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
 		if(!cat) continue;
@@ -400,11 +415,10 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
 	}
 }
 
-void LLInventoryFetchComboObserver::fetch(
-	const uuid_vec_t& folder_ids,
-	const uuid_vec_t& item_ids)
+void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
+											   const uuid_vec_t& item_ids)
 {
-	lldebugs << "LLInventoryFetchComboObserver::fetch()" << llendl;
+	lldebugs << "LLInventoryFetchComboObserver::startFetch()" << llendl;
 	for(uuid_vec_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit)
 	{
 		LLViewerInventoryCategory* cat = gInventory.getCategory(*fit);
@@ -544,8 +558,7 @@ void LLInventoryAddedObserver::changed(U32 mask)
 	}
 }
 
-LLInventoryTransactionObserver::LLInventoryTransactionObserver(
-	const LLTransactionID& transaction_id) :
+LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) :
 	mTransactionID(transaction_id)
 {
 }
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index ba70552ebc..03f9e9c553 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -73,68 +73,46 @@ public:
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryCompletionObserver
-//
-//   Base class for doing something when when all observed items are locally 
-//   complete.  Implements the changed() method of LLInventoryObserver 
-//   and declares a new method named done() which is called when all watched items 
-//   have complete information in the inventory model.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLInventoryCompletionObserver : public LLInventoryObserver
-{
-public:
-	LLInventoryCompletionObserver() {}
-	virtual void changed(U32 mask);
-
-	void watchItem(const LLUUID& id);
-
-protected:
-	virtual void done() = 0;
-
-	uuid_vec_t mComplete;
-	uuid_vec_t mIncomplete;
-};
-
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryFetchObserver
+// Class LLInventoryFetchItemsObserver
 //
-// This class is much like the LLInventoryCompletionObserver, except
-// that it handles all the the fetching necessary. Override the done()
-// method to do the thing you want.
+//   Fetches inventory items, calls done() when all inventory has arrived. 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLInventoryFetchObserver : public LLInventoryObserver
+class LLInventoryFetchItemsObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchObserver(bool retry_if_missing = false);
+	LLInventoryFetchItemsObserver(bool retry_if_missing = false);
+	LLInventoryFetchItemsObserver(const uuid_vec_t& ids, bool retry_if_missing = false);
 	virtual void changed(U32 mask);
 
 	bool isEverythingComplete() const;
-	void fetch(const uuid_vec_t& ids);
+	void setItems(const uuid_vec_t& ids) { mIDs = ids; }
+	void startFetch();
+
 	virtual void done() {};
 
 protected:
 	bool mRetryIfMissing;
 	uuid_vec_t mComplete;
 	uuid_vec_t mIncomplete;
+	uuid_vec_t mIDs;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryFetchDescendentsObserver
 //
-// This class is much like the LLInventoryCompletionObserver, except
-// that it handles fetching based on category. Override the done()
-// method to do the thing you want.
+//   Fetches children of a category/folder, calls done() when all 
+//   inventory has arrived. 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class LLInventoryFetchDescendentsObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchDescendentsObserver() {}
+	LLInventoryFetchDescendentsObserver();
+	LLInventoryFetchDescendentsObserver(const uuid_vec_t& ids);
 	virtual void changed(U32 mask);
 
-	void fetch(const uuid_vec_t& ids);
+	void setFolders(const uuid_vec_t& ids) { mIDs = ids; }
+	void startFetch();
 	bool isEverythingComplete() const;
 	virtual void done() = 0;
 
@@ -142,6 +120,7 @@ protected:
 	bool isComplete(LLViewerInventoryCategory* cat);
 	uuid_vec_t mIncomplete;
 	uuid_vec_t mComplete;
+	uuid_vec_t mIDs;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -158,7 +137,7 @@ public:
 	LLInventoryFetchComboObserver() : mDone(false) {}
 	virtual void changed(U32 mask);
 
-	void fetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
+	void startFetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
 
 	virtual void done() = 0;
 
@@ -237,6 +216,29 @@ protected:
 	LLTransactionID mTransactionID;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryCompletionObserver
+//
+//   Base class for doing something when when all observed items are locally 
+//   complete.  Implements the changed() method of LLInventoryObserver 
+//   and declares a new method named done() which is called when all watched items 
+//   have complete information in the inventory model.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLInventoryCompletionObserver : public LLInventoryObserver
+{
+public:
+	LLInventoryCompletionObserver() {}
+	virtual void changed(U32 mask);
+
+	void watchItem(const LLUUID& id);
+
+protected:
+	virtual void done() = 0;
+
+	uuid_vec_t mComplete;
+	uuid_vec_t mIncomplete;
+};
 
 #endif // LL_LLINVENTORYOBSERVERS_H
 
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ccd1bfe224..5701fcb582 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -484,7 +484,8 @@ void LLPanelOutfitEdit::updateLookInfo()
 		
 		uuid_vec_t folders;
 		folders.push_back(mLookID);
-		mFetchLook->fetch(folders);
+		mFetchLook->setFolders(folders);
+		mFetchLook->startFetch();
 		if (mFetchLook->isEverythingComplete())
 		{
 			mFetchLook->done();
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 511196809a..6dd4dc1ce7 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -52,10 +52,12 @@
 
 static LLRegisterPanelClassWrapper<LLSidepanelAppearance> t_appearance("sidepanel_appearance");
 
-class LLCurrentlyWornFetchObserver : public LLInventoryFetchObserver
+class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver
 {
 public:
-	LLCurrentlyWornFetchObserver(LLSidepanelAppearance *panel) :
+	LLCurrentlyWornFetchObserver(const uuid_vec_t &ids,
+								 LLSidepanelAppearance *panel) :
+		LLInventoryFetchItemsObserver(ids),
 		mPanel(panel)
 	{}
 	~LLCurrentlyWornFetchObserver() {}
@@ -390,10 +392,10 @@ void LLSidepanelAppearance::fetchInventory()
 		}
 	}
 
-	LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this);
-	fetch_worn->fetch(ids);
+	LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(ids, this);
+	fetch_worn->startFetch();
 	// If no items to be fetched, done will never be triggered.
-	// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
+	// TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
 	if (fetch_worn->isEverythingComplete())
 	{
 		fetch_worn->done();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index d7c8b5fcd4..340327a1e2 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1771,7 +1771,8 @@ bool idle_startup()
 					}
 				}
 				// no need to add gesture to inventory observer, it's already made in constructor 
-				LLGestureMgr::instance().fetch(item_ids);
+				LLGestureMgr::instance().setItems(item_ids);
+				LLGestureMgr::instance().startFetch();
 			}
 		}
 		gDisplaySwapBuffers = TRUE;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 1e81e675e6..cc90b0753f 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -244,11 +244,13 @@ public:
 	}
 };
 
-class LLCategoryDropObserver : public LLInventoryFetchObserver
+class LLCategoryDropObserver : public LLInventoryFetchItemsObserver
 {
 public:
 	LLCategoryDropObserver(
+		const uuid_vec_t& ids,
 		const LLUUID& obj_id, LLToolDragAndDrop::ESource src) :
+		LLInventoryFetchItemsObserver(ids),
 		mObjectID(obj_id),
 		mSource(src)
 	{}
@@ -331,8 +333,8 @@ void LLCategoryDropDescendentsObserver::done()
 		std::back_insert_iterator<uuid_vec_t> copier(ids);
 		std::copy(unique_ids.begin(), unique_ids.end(), copier);
 		LLCategoryDropObserver* dropper;
-		dropper = new LLCategoryDropObserver(mObjectID, mSource);
-		dropper->fetch(ids);
+		dropper = new LLCategoryDropObserver(ids, mObjectID, mSource);
+		dropper->startFetch();
 		if (dropper->isEverythingComplete())
 		{
 			dropper->done();
@@ -480,7 +482,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
 			if (!folder_ids.empty() || !item_ids.empty())
 			{
 				LLCategoryFireAndForget fetcher;
-				fetcher.fetch(folder_ids, item_ids);
+				fetcher.startFetch(folder_ids, item_ids);
 			}
 		}
 	}
@@ -550,7 +552,7 @@ void LLToolDragAndDrop::beginMultiDrag(
 			std::back_insert_iterator<uuid_vec_t> copier(folder_ids);
 			std::copy(cat_ids.begin(), cat_ids.end(), copier);
 			LLCategoryFireAndForget fetcher;
-			fetcher.fetch(folder_ids, item_ids);
+			fetcher.startFetch(folder_ids, item_ids);
 		}
 	}
 }
@@ -2576,8 +2578,8 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
 			const LLViewerInventoryItem *item = (*item_iter);
 			ids.push_back(item->getUUID());
 		}
-		LLCategoryDropObserver* dropper = new LLCategoryDropObserver(obj->getID(), mSource);
-		dropper->fetch(ids);
+		LLCategoryDropObserver* dropper = new LLCategoryDropObserver(ids, obj->getID(), mSource);
+		dropper->startFetch();
 		if (dropper->isEverythingComplete())
 		{
 			dropper->done();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index d91b6d0b1e..807595960e 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6096,10 +6096,12 @@ class LLAttachmentDetach : public view_listener_t
 
 //Adding an observer for a Jira 2422 and needs to be a fetch observer
 //for Jira 3119
-class LLWornItemFetchedObserver : public LLInventoryFetchObserver
+class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver
 {
 public:
-	LLWornItemFetchedObserver() {}
+	LLWornItemFetchedObserver(const uuid_vec_t& ids) :
+		LLInventoryFetchItemsObserver(ids)
+	{}
 	virtual ~LLWornItemFetchedObserver() {}
 
 protected:
@@ -6153,13 +6155,12 @@ class LLAttachmentEnableDrop : public view_listener_t
 						// when the item finishes fetching worst case scenario 
 						// if a fetch is already out there (being sent from a slow sim)
 						// we refetch and there are 2 fetches
-						LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver();
+
 						uuid_vec_t items; //add item to the inventory item to be fetched
-						
 						items.push_back((*attachment_iter)->getItemID());
-						
-						wornItemFetched->fetch(items);
-						gInventory.addObserver(wornItemFetched);
+						LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver(items);		
+						worn_item_fetched->startFetch();
+						gInventory.addObserver(worn_item_fetched);
 					}
 				}
 			}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a471876ce1..6f39de996e 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -700,10 +700,13 @@ static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_
 //-----------------------------------------------------------------------------
 // Instant Message
 //-----------------------------------------------------------------------------
-class LLOpenAgentOffer : public LLInventoryFetchObserver
+class LLOpenAgentOffer : public LLInventoryFetchItemsObserver
 {
 public:
-	LLOpenAgentOffer(const std::string& from_name) : mFromName(from_name) {}
+	LLOpenAgentOffer(const uuid_vec_t& ids,
+					 const std::string& from_name) : 
+		LLInventoryFetchItemsObserver(ids),
+		mFromName(from_name) {}
 	/*virtual*/ void done()
 	{
 		open_inventory_offer(mComplete, mFromName);
@@ -1206,8 +1209,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 				// so we can fetch it out of our inventory.
 				uuid_vec_t items;
 				items.push_back(mObjectID);
-				LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string);
-				open_agent_offer->fetch(items);
+				LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(items, from_string);
+				open_agent_offer->startFetch();
 				if(catp || (itemp && itemp->isComplete()))
 				{
 					open_agent_offer->done();
@@ -1270,7 +1273,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 			items.push_back(mObjectID);
 			LLDiscardAgentOffer* discard_agent_offer;
 			discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
-			discard_agent_offer->fetch(folders, items);
+			discard_agent_offer->startFetch(folders, items);
 			if(catp || (itemp && itemp->isComplete()))
 			{
 				discard_agent_offer->done();
@@ -1604,8 +1607,8 @@ void inventory_offer_handler(LLOfferInfo* info)
 		// Prefetch the item into your local inventory.
 		uuid_vec_t items;
 		items.push_back(info->mObjectID);
-		LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
-		fetch_item->fetch(items);
+		LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+		fetch_item->startFetch();
 		if(fetch_item->isEverythingComplete())
 		{
 			fetch_item->done();
@@ -2123,8 +2126,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 				// Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331)
 				uuid_vec_t items;
 				items.push_back(info->mObjectID);
-				LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
-				fetch_item->fetch(items);
+				LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+				fetch_item->startFetch();
 				delete fetch_item;
 
 				// Same as closing window
@@ -2844,7 +2847,9 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
 class LLFetchInWelcomeArea : public LLInventoryFetchDescendentsObserver
 {
 public:
-	LLFetchInWelcomeArea() {}
+	LLFetchInWelcomeArea(const uuid_vec_t &ids) :
+		LLInventoryFetchDescendentsObserver(ids)
+	{}
 	virtual void done()
 	{
 		LLIsType is_landmark(LLAssetType::AT_LANDMARK);
@@ -2926,8 +2931,8 @@ BOOL LLPostTeleportNotifiers::tick()
 			folders.push_back(folder_id);
 		if(!folders.empty())
 		{
-			LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
-			fetcher->fetch(folders);
+			LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea(folders);
+			fetcher->startFetch();
 			if(fetcher->isEverythingComplete())
 			{
 				fetcher->done();
-- 
cgit v1.2.3


From c3d9316dff568d5265d856a708e3909deae09f18 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 6 Apr 2010 17:30:23 -0400
Subject: EXT-6727 : Allow LLInventoryObservers to target a single item
 (instead of a vector of items)

Added new constructors to LLInventoryFetch types to allow passing in a single item.
---
 indra/newview/llagentwearables.cpp      |  8 ++------
 indra/newview/llagentwearablesfetch.cpp |  8 ++++----
 indra/newview/llagentwearablesfetch.h   |  4 ++--
 indra/newview/llappearancemgr.cpp       |  2 +-
 indra/newview/llappearancemgr.h         |  8 +++-----
 indra/newview/llfriendcard.cpp          |  8 +++-----
 indra/newview/llinventoryobserver.cpp   | 22 ++++++++++++++++++----
 indra/newview/llinventoryobserver.h     | 11 +++++++----
 indra/newview/llpaneloutfitedit.cpp     |  6 ++----
 indra/newview/llviewermenu.cpp          |  9 +++------
 indra/newview/llviewermessage.cpp       | 16 +++++-----------
 11 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index bc8931827e..aedea5660f 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -905,9 +905,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
 
 		// Get the UUID of the current outfit folder (will be created if it doesn't exist)
 		const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
-		uuid_vec_t folders;
-		folders.push_back(current_outfit_id);
-		LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(folders);
+		LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id);
 		
 		//lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
 		// Add wearables
@@ -2061,9 +2059,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
 	llinfos << "starting outfit population" << llendl;
 
 	const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
-	uuid_vec_t folders;
-	folders.push_back(my_outfits_id);
-	LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(folders);
+	LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id);
 	outfits->mMyOutfitsID = my_outfits_id;
 	
 	// Get the complete information on the items in the inventory and 
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 6b7edaa302..04a970b683 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -39,8 +39,8 @@
 #include "llinventoryfunctions.h"
 #include "llvoavatarself.h"
 
-LLInitialWearablesFetch::LLInitialWearablesFetch(const uuid_vec_t& ids) :
-	LLInventoryFetchDescendentsObserver(ids)
+LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) :
+	LLInventoryFetchDescendentsObserver(cof_id)
 {
 }
 
@@ -189,8 +189,8 @@ void LLInitialWearablesFetch::processWearablesMessage()
 	}
 }
 
-LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const uuid_vec_t& ids) : 
-	LLInventoryFetchDescendentsObserver(ids),
+LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : 
+	LLInventoryFetchDescendentsObserver(my_outfits_id),
 	mCurrFetchStep(LOFS_FOLDER), 
 	mOutfitsPopulated(false) 
 {
diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h
index 33368811c0..6695727d46 100644
--- a/indra/newview/llagentwearablesfetch.h
+++ b/indra/newview/llagentwearablesfetch.h
@@ -47,7 +47,7 @@
 class LLInitialWearablesFetch : public LLInventoryFetchDescendentsObserver
 {
 public:
-	LLInitialWearablesFetch(const uuid_vec_t& ids);
+	LLInitialWearablesFetch(const LLUUID& cof_id);
 	~LLInitialWearablesFetch();
 	virtual void done();
 
@@ -92,7 +92,7 @@ public:
 		LOFS_CONTENTS
 	};
 
-	LLLibraryOutfitsFetch(const uuid_vec_t& ids);
+	LLLibraryOutfitsFetch(const LLUUID& my_outfits_id);
 	~LLLibraryOutfitsFetch();
 
 	virtual void done();
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index e0f1d5348d..7700d4de7f 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -49,7 +49,7 @@
 #include "llviewerregion.h"
 #include "llwearablelist.h"
 
-LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name)
+LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name)
 {
 	LLInventoryModel::cat_array_t cat_array;
 	LLInventoryModel::item_array_t item_array;
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 1cf8d584db..27a4ffd8cb 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -270,8 +270,8 @@ template <class T>
 class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
 {
 public:
-	CallAfterCategoryFetchStage1(const uuid_vec_t& ids, T callable) :
-		LLInventoryFetchDescendentsObserver(ids),
+	CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) :
+		LLInventoryFetchDescendentsObserver(cat_id),
 		mCallable(callable)
 	{
 	}
@@ -331,9 +331,7 @@ protected:
 template <class T> 
 void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
 {
-	uuid_vec_t folders;
-	folders.push_back(cat_id);
-	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(folders, callable);
+	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable);
 	stage1->startFetch();
 	if (stage1->isEverythingComplete())
 	{
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index aaa09ba5da..945d2d26da 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -111,9 +111,9 @@ class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
 public:
 	typedef boost::function<void()> callback_t;
 
-	LLInitialFriendCardsFetch(const uuid_vec_t& ids,
+	LLInitialFriendCardsFetch(const LLUUID& folder_id,
 							  callback_t cb) :
-		LLInventoryFetchDescendentsObserver(ids),
+		LLInventoryFetchDescendentsObserver(folder_id),
 		mCheckFolderCallback(cb)	
 	{}
 
@@ -410,10 +410,8 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
 
 void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id,  callback_t cb)
 {
-	uuid_vec_t folders;
-	folders.push_back(folder_id);
 	// This instance will be deleted in LLInitialFriendCardsFetch::done().
-	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folders, cb);
+	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folder_id, cb);
 	fetch->startFetch();
 	if(fetch->isEverythingComplete())
 	{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 0f8d76a4cc..fecd18b4bb 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -113,9 +113,17 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(bool retry_if_missi
 {
 }
 
-LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& ids,
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id,
 															 bool retry_if_missing) :
-	mIDs(ids),
+	mRetryIfMissing(retry_if_missing)
+{
+	mIDs.clear();
+	mIDs.push_back(item_id);
+}
+
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids,
+															 bool retry_if_missing) :
+	mIDs(item_ids),
 	mRetryIfMissing(retry_if_missing)
 {
 }
@@ -273,8 +281,14 @@ LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver()
 {
 }
 
-LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& ids) :
-	mIDs(ids)
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const LLUUID& cat_id)
+{
+	mIDs.clear();
+	mIDs.push_back(cat_id);
+}
+
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids) :
+	mIDs(cat_ids)
 {
 }
 // virtual
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 03f9e9c553..420afdfadc 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -81,8 +81,9 @@ public:
 class LLInventoryFetchItemsObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchItemsObserver(bool retry_if_missing = false);
-	LLInventoryFetchItemsObserver(const uuid_vec_t& ids, bool retry_if_missing = false);
+	LLInventoryFetchItemsObserver(bool retry_if_missing = false); // deprecated
+	LLInventoryFetchItemsObserver(const LLUUID& item_id, bool retry_if_missing = false); // single item
+	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids, bool retry_if_missing = false); // multiple items
 	virtual void changed(U32 mask);
 
 	bool isEverythingComplete() const;
@@ -108,10 +109,12 @@ class LLInventoryFetchDescendentsObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryFetchDescendentsObserver();
-	LLInventoryFetchDescendentsObserver(const uuid_vec_t& ids);
+	LLInventoryFetchDescendentsObserver(const LLUUID& cat_id);
+	LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids);
 	virtual void changed(U32 mask);
 
-	void setFolders(const uuid_vec_t& ids) { mIDs = ids; }
+	void setFolders(const uuid_vec_t& cat_ids) { mIDs = cat_ids; }
+	void setFolders(const LLUUID& cat_id) { mIDs.clear(); mIDs.push_back(cat_id); }
 	void startFetch();
 	bool isEverythingComplete() const;
 	virtual void done() = 0;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 5701fcb582..e93293a0f0 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -481,10 +481,8 @@ void LLPanelOutfitEdit::updateLookInfo()
 	if (getVisible())
 	{
 		mLookContents->clearRows();
-		
-		uuid_vec_t folders;
-		folders.push_back(mLookID);
-		mFetchLook->setFolders(folders);
+
+		mFetchLook->setFolders(mLookID);
 		mFetchLook->startFetch();
 		if (mFetchLook->isEverythingComplete())
 		{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 807595960e..820db7e3ff 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6099,8 +6099,8 @@ class LLAttachmentDetach : public view_listener_t
 class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver
 {
 public:
-	LLWornItemFetchedObserver(const uuid_vec_t& ids) :
-		LLInventoryFetchItemsObserver(ids)
+	LLWornItemFetchedObserver(const LLUUID& worn_item_id) :
+		LLInventoryFetchItemsObserver(worn_item_id)
 	{}
 	virtual ~LLWornItemFetchedObserver() {}
 
@@ -6155,10 +6155,7 @@ class LLAttachmentEnableDrop : public view_listener_t
 						// when the item finishes fetching worst case scenario 
 						// if a fetch is already out there (being sent from a slow sim)
 						// we refetch and there are 2 fetches
-
-						uuid_vec_t items; //add item to the inventory item to be fetched
-						items.push_back((*attachment_iter)->getItemID());
-						LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver(items);		
+						LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver((*attachment_iter)->getItemID());		
 						worn_item_fetched->startFetch();
 						gInventory.addObserver(worn_item_fetched);
 					}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 6f39de996e..35eb3390a5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -703,9 +703,9 @@ static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_
 class LLOpenAgentOffer : public LLInventoryFetchItemsObserver
 {
 public:
-	LLOpenAgentOffer(const uuid_vec_t& ids,
+	LLOpenAgentOffer(const LLUUID& object_id,
 					 const std::string& from_name) : 
-		LLInventoryFetchItemsObserver(ids),
+		LLInventoryFetchItemsObserver(object_id),
 		mFromName(from_name) {}
 	/*virtual*/ void done()
 	{
@@ -1207,9 +1207,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 				// This is an offer from an agent. In this case, the back
 				// end has already copied the items into your inventory,
 				// so we can fetch it out of our inventory.
-				uuid_vec_t items;
-				items.push_back(mObjectID);
-				LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(items, from_string);
+				LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
 				open_agent_offer->startFetch();
 				if(catp || (itemp && itemp->isComplete()))
 				{
@@ -1605,9 +1603,7 @@ void inventory_offer_handler(LLOfferInfo* info)
 		p.name = "UserGiveItem";
 		
 		// Prefetch the item into your local inventory.
-		uuid_vec_t items;
-		items.push_back(info->mObjectID);
-		LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+		LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
 		fetch_item->startFetch();
 		if(fetch_item->isEverythingComplete())
 		{
@@ -2124,9 +2120,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			if (is_muted)
 			{
 				// Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331)
-				uuid_vec_t items;
-				items.push_back(info->mObjectID);
-				LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+				LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
 				fetch_item->startFetch();
 				delete fetch_item;
 
-- 
cgit v1.2.3


From f096f02278f3b8c8fdd962c85b237492defa93ec Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 6 Apr 2010 18:58:26 -0400
Subject: EXT-6728 : Have LLInventoryFetchItems/DescendentsObserver inherit
 from a base abstract LLInventoryFetchObserver class

Added a new abstract class LLInventoryFetchObserver from which LLInventoryFetchItems and LLInventoryFetchDescendents inherit.
Also changed isEverythingComplete to isFinished and made some other minor superficial changes.
---
 indra/newview/llagentwearables.cpp      |  4 +-
 indra/newview/llagentwearablesfetch.cpp | 18 +++----
 indra/newview/llappearancemgr.h         |  4 +-
 indra/newview/llfloatergesture.cpp      |  4 +-
 indra/newview/llfloaterproperties.cpp   |  6 +--
 indra/newview/llfriendcard.cpp          |  2 +-
 indra/newview/llgesturemgr.cpp          |  4 +-
 indra/newview/llinventorybridge.cpp     | 14 ++---
 indra/newview/llinventoryobserver.cpp   | 95 ++++++++++++++++++++-------------
 indra/newview/llinventoryobserver.h     | 69 ++++++++++++++----------
 indra/newview/llinventorypanel.cpp      |  2 +-
 indra/newview/llpaneloutfitedit.cpp     |  4 +-
 indra/newview/llpreview.cpp             |  2 +-
 indra/newview/llpreviewgesture.cpp      |  4 +-
 indra/newview/llpreviewscript.cpp       |  2 +-
 indra/newview/llsidepanelappearance.cpp |  2 +-
 indra/newview/llsidepaneliteminfo.cpp   |  6 +--
 indra/newview/llstartup.cpp             |  2 +-
 indra/newview/lltooldraganddrop.cpp     | 35 ++++++------
 indra/newview/llviewerinventory.h       |  2 +-
 indra/newview/llviewermessage.cpp       |  8 +--
 21 files changed, 162 insertions(+), 127 deletions(-)

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index aedea5660f..7f248eee30 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -952,7 +952,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
 		// Get the complete information on the items in the inventory and set up an observer
 		// that will trigger when the complete information is fetched.
 		outfit->startFetch();
-		if(outfit->isEverythingComplete())
+		if(outfit->isFinished())
 		{
 			// everything is already here - call done.
 			outfit->done();
@@ -2066,7 +2066,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
 	// setup an observer that will wait for that to happen.
 	gInventory.addObserver(outfits);
 	outfits->startFetch();
-	if (outfits->isEverythingComplete())
+	if (outfits->isFinished())
 	{
 		outfits->done();
 	}
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 04a970b683..aafbb0d22c 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -174,7 +174,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
 		fetcher->startFetch();
 		// If no items to be fetched, done will never be triggered.
 		// TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
-		if (fetcher->isEverythingComplete())
+		if (fetcher->isFinished())
 		{
 			fetcher->done();
 		}
@@ -287,9 +287,9 @@ void LLLibraryOutfitsFetch::folderDone()
 	uuid_vec_t folders;
 	folders.push_back(mClothingID);
 	folders.push_back(mLibraryClothingID);
-	setFolders(folders);
+	setFetchIDs(folders);
 	startFetch();
-	if (isEverythingComplete())
+	if (isFinished())
 	{
 		done();
 	}
@@ -337,9 +337,9 @@ void LLLibraryOutfitsFetch::outfitsDone()
 	}
 	
 	mComplete.clear();
-	setFolders(folders);
+	setFetchIDs(folders);
 	startFetch();
-	if (isEverythingComplete())
+	if (isFinished())
 	{
 		done();
 	}
@@ -434,9 +434,9 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
 	folders.push_back(mImportedClothingID);
 	
 	mComplete.clear();
-	setFolders(folders);
+	setFetchIDs(folders);
 	startFetch();
-	if (isEverythingComplete())
+	if (isFinished())
 	{
 		done();
 	}
@@ -464,9 +464,9 @@ void LLLibraryOutfitsFetch::importedFolderDone()
 	}
 	
 	mComplete.clear();
-	setFolders(folders);
+	setFetchIDs(folders);
 	startFetch();
-	if (isEverythingComplete())
+	if (isFinished())
 	{
 		done();
 	}
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 27a4ffd8cb..93b3cecb6f 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -311,7 +311,7 @@ public:
 		// do the fetch
 		CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable);
 		stage2->startFetch();
-		if(stage2->isEverythingComplete())
+		if(stage2->isFinished())
 		{
 			// everything is already here - call done.
 			stage2->done();
@@ -333,7 +333,7 @@ void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
 {
 	CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable);
 	stage1->startFetch();
-	if (stage1->isEverythingComplete())
+	if (stage1->isFinished())
 	{
 		stage1->done();
 	}
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 04fb6bca3c..eff7131145 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -148,7 +148,7 @@ void LLFloaterGesture::done()
 		if (!unloaded_folders.empty())
 		{
 			LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL;
-			setFolders(unloaded_folders);
+			setFetchIDs(unloaded_folders);
 			startFetch();
 		}
 		else
@@ -203,7 +203,7 @@ BOOL LLFloaterGesture::postBuild()
 	folders.push_back(mGestureFolderID);
 	//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details.
 	gInventory.addObserver(this);
-	setFolders(folders);
+	setFetchIDs(folders);
 	startFetch();
 
 	if (mGestureList)
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index bb9d151cd2..30b654de24 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -237,7 +237,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 
 	// do not enable the UI for incomplete items.
 	LLViewerInventoryItem* i = (LLViewerInventoryItem*)item;
-	BOOL is_complete = i->isComplete();
+	BOOL is_complete = i->isFinished();
 	const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType());
 	const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
 	const LLPermissions& perm = item->getPermissions();
@@ -683,7 +683,7 @@ void LLFloaterProperties::onCommitPermissions()
 							CheckNextOwnerTransfer->get(), PERM_TRANSFER);
 	}
 	if(perm != item->getPermissions()
-		&& item->isComplete())
+		&& item->isFinished())
 	{
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 		new_item->setPermissions(perm);
@@ -813,7 +813,7 @@ void LLFloaterProperties::updateSaleInfo()
 		sale_info.setSaleType(LLSaleInfo::FS_NOT);
 	}
 	if(sale_info != item->getSaleInfo()
-		&& item->isComplete())
+		&& item->isFinished())
 	{
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 945d2d26da..7f28e09933 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -413,7 +413,7 @@ void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_i
 	// This instance will be deleted in LLInitialFriendCardsFetch::done().
 	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folder_id, cb);
 	fetch->startFetch();
-	if(fetch->isEverythingComplete())
+	if(fetch->isFinished())
 	{
 		// everything is already here - call done.
 		fetch->done();
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 034806acfc..3d38ff3730 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -1031,9 +1031,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
 			else
 			{
 				// Watch this item and set gesture name when item exists in inventory
-				uuid_vec_t ids;
-				ids.push_back(item_id);
-				self.setItems(ids);
+				self.setFetchID(item_id);
 				self.startFetch();
 			}
 			self.mActive[item_id] = gesture;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 82043ab523..87b3c2e835 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1133,7 +1133,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
 void LLItemBridge::selectItem()
 {
 	LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
-	if(item && !item->isComplete())
+	if(item && !item->isFinished())
 	{
 		item->fetchFromServer();
 	}
@@ -2037,7 +2037,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
 	outfit->startFetch();
 	outfit->done();				//Not interested in waiting and this will be right 99% of the time.
 //Uncomment the following code for laggy Inventory UI.
-/*	if(outfit->isEverythingComplete())
+/*	if(outfit->isFinished())
 	{
 	// everything is already here - call done.
 	outfit->done();
@@ -2734,7 +2734,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE);
 		fetch->startFetch();
 		inc_busy_count();
-		if(fetch->isEverythingComplete())
+		if(fetch->isFinished())
 		{
 			// everything is already here - call done.
 			fetch->done();
@@ -3195,7 +3195,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 	else if(LLToolDragAndDrop::SOURCE_LIBRARY == source)
 	{
 		LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item;
-		if(item && item->isComplete())
+		if(item && item->isFinished())
 		{
 			accept = TRUE;
 			if(drop)
@@ -4054,7 +4054,7 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)
 		{
 			rez_attachment(item, NULL);
 		}
-		else if(item && item->isComplete())
+		else if(item && item->isFinished())
 		{
 			// must be in library. copy it to our inventory and put it on.
 			LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0);
@@ -4687,7 +4687,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data)
 	if(!self->isAgentInventory())
 	{
 		LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
-		if(!item || !item->isComplete()) return FALSE;
+		if(!item || !item->isFinished()) return FALSE;
 	}
 	return (!get_is_item_worn(self->mUUID));
 }
@@ -5307,7 +5307,7 @@ public:
 			// must be in the inventory library. copy it to our inventory
 			// and put it on right away.
 			LLViewerInventoryItem* item = getItem();
-			if(item && item->isComplete())
+			if(item && item->isFinished())
 			{
 				LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback();
 				copy_inventory_item(
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index fecd18b4bb..ab32db9c8e 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -71,6 +71,36 @@ LLInventoryObserver::~LLInventoryObserver()
 {
 }
 
+LLInventoryFetchObserver::LLInventoryFetchObserver(const LLUUID& id)
+{
+	mIDs.clear();
+	if (id != LLUUID::null)
+	{
+		setFetchID(id);
+	}
+}
+
+LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids)
+{
+	setFetchIDs(ids);
+}
+
+BOOL LLInventoryFetchObserver::isFinished() const
+{
+	return mIncomplete.empty();
+}
+
+void LLInventoryFetchObserver::setFetchIDs(const uuid_vec_t& ids)
+{
+	mIDs = ids;
+}
+void LLInventoryFetchObserver::setFetchID(const LLUUID& id)
+{
+	mIDs.clear();
+	mIDs.push_back(id);
+}
+
+
 void LLInventoryCompletionObserver::changed(U32 mask)
 {
 	// scan through the incomplete items and move or erase them as
@@ -79,13 +109,13 @@ void LLInventoryCompletionObserver::changed(U32 mask)
 	{
 		for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
 		{
-			LLViewerInventoryItem* item = gInventory.getItem(*it);
+			const LLViewerInventoryItem* item = gInventory.getItem(*it);
 			if(!item)
 			{
 				it = mIncomplete.erase(it);
 				continue;
 			}
-			if(item->isComplete())
+			if(item->isFinished())
 			{
 				mComplete.push_back(*it);
 				it = mIncomplete.erase(it);
@@ -108,13 +138,16 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
 	}
 }
 
-LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(bool retry_if_missing) :
+/*
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(BOOL retry_if_missing) :
 	mRetryIfMissing(retry_if_missing)
 {
 }
+*/
 
 LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id,
-															 bool retry_if_missing) :
+															 BOOL retry_if_missing) :
+	LLInventoryFetchObserver(item_id),
 	mRetryIfMissing(retry_if_missing)
 {
 	mIDs.clear();
@@ -122,8 +155,8 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_
 }
 
 LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids,
-															 bool retry_if_missing) :
-	mIDs(item_ids),
+															 BOOL retry_if_missing) :
+	LLInventoryFetchObserver(item_ids),
 	mRetryIfMissing(retry_if_missing)
 {
 }
@@ -155,7 +188,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 				}
 				continue;
 			}
-			if(item->isComplete())
+			if(item->isFinished())
 			{
 				mComplete.push_back(*it);
 				it = mIncomplete.erase(it);
@@ -172,9 +205,8 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 	//llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
 }
 
-bool LLInventoryFetchItemsObserver::isEverythingComplete() const
+void LLInventoryFetchItemsObserver::done()
 {
-	return mIncomplete.empty();
 }
 
 void fetch_items_from_llsd(const LLSD& items_llsd)
@@ -247,7 +279,7 @@ void LLInventoryFetchItemsObserver::startFetch()
 		LLViewerInventoryItem* item = gInventory.getItem(*it);
 		if(item)
 		{
-			if(item->isComplete())
+			if(item->isFinished())
 			{
 				// It's complete, so put it on the complete container.
 				mComplete.push_back(*it);
@@ -277,32 +309,28 @@ void LLInventoryFetchItemsObserver::startFetch()
 	fetch_items_from_llsd(items_llsd);
 }
 
-LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver()
-{
-}
-
-LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const LLUUID& cat_id)
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const LLUUID& cat_id) :
+	LLInventoryFetchObserver(cat_id)
 {
-	mIDs.clear();
-	mIDs.push_back(cat_id);
 }
 
 LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids) :
-	mIDs(cat_ids)
+	LLInventoryFetchObserver(cat_ids)
 {
 }
+
 // virtual
 void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 {
 	for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
 	{
-		LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
+		const LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
 		if(!cat)
 		{
 			it = mIncomplete.erase(it);
 			continue;
 		}
-		if(isComplete(cat))
+		if(isCategoryComplete(cat))
 		{
 			mComplete.push_back(*it);
 			it = mIncomplete.erase(it);
@@ -322,7 +350,7 @@ void LLInventoryFetchDescendentsObserver::startFetch()
 	{
 		LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
 		if(!cat) continue;
-		if(!isComplete(cat))
+		if(!isCategoryComplete(cat))
 		{
 			cat->fetch();		//blindly fetch it without seeing if anything else is fetching it.
 			mIncomplete.push_back(*it);	//Add to list of things being downloaded for this observer.
@@ -334,19 +362,14 @@ void LLInventoryFetchDescendentsObserver::startFetch()
 	}
 }
 
-bool LLInventoryFetchDescendentsObserver::isEverythingComplete() const
-{
-	return mIncomplete.empty();
-}
-
-bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* cat)
+BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const
 {
 	const S32 version = cat->getVersion();
 	const S32 expected_num_descendents = cat->getDescendentCount();
 	if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) ||
 		(expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN))
 	{
-		return false;
+		return FALSE;
 	}
 	// it might be complete - check known descendents against
 	// currently available.
@@ -360,14 +383,14 @@ bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory*
 		// that the cat just doesn't have any items or subfolders).
 		// Unrecoverable, so just return done so that this observer can be cleared
 		// from memory.
-		return true;
+		return TRUE;
 	}
 	const S32 current_num_known_descendents = cats->count() + items->count();
 	
 	// Got the number of descendents that we were expecting, so we're done.
 	if (current_num_known_descendents == expected_num_descendents)
 	{
-		return true;
+		return TRUE;
 	}
 
 	// Error condition, but recoverable.  This happens if something was added to the
@@ -376,10 +399,10 @@ bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory*
 	if (current_num_known_descendents >= expected_num_descendents)
 	{
 		llwarns << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << llendl;
-		cat->setDescendentCount(current_num_known_descendents);
-		return true;
+		const_cast<LLViewerInventoryCategory *>(cat)->setDescendentCount(current_num_known_descendents);
+		return TRUE;
 	}
-	return false;
+	return FALSE;
 }
 
 void LLInventoryFetchComboObserver::changed(U32 mask)
@@ -394,7 +417,7 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
 				it = mIncompleteItems.erase(it);
 				continue;
 			}
-			if(item->isComplete())
+			if(item->isFinished())
 			{	
 				mCompleteItems.push_back(*it);
 				it = mIncompleteItems.erase(it);
@@ -424,7 +447,7 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
 	}
 	if(!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty())
 	{
-		mDone = true;
+		mDone = TRUE;
 		done();
 	}
 }
@@ -464,7 +487,7 @@ void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
 			lldebugs << "uanble to find item " << *iit << llendl;
 			continue;
 		}
-		if(item->isComplete())
+		if(item->isFinished())
 		{
 			// It's complete, so put it on the complete container.
 			mCompleteItems.push_back(*iit);
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 420afdfadc..7480b7e7af 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -73,57 +73,70 @@ public:
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryFetchItemsObserver
+// Class LLInventoryFetchObserver
 //
-//   Fetches inventory items, calls done() when all inventory has arrived. 
+//   Abstract class to handle fetching items, folders, etc.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLInventoryFetchItemsObserver : public LLInventoryObserver
+class LLInventoryFetchObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchItemsObserver(bool retry_if_missing = false); // deprecated
-	LLInventoryFetchItemsObserver(const LLUUID& item_id, bool retry_if_missing = false); // single item
-	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids, bool retry_if_missing = false); // multiple items
-	virtual void changed(U32 mask);
+	LLInventoryFetchObserver(const LLUUID& id = LLUUID::null); // single item
+	LLInventoryFetchObserver(const uuid_vec_t& ids); // multiple items
+	void setFetchID(const LLUUID& id);
+	void setFetchIDs(const uuid_vec_t& ids);
 
-	bool isEverythingComplete() const;
-	void setItems(const uuid_vec_t& ids) { mIDs = ids; }
-	void startFetch();
+	BOOL isFinished() const;
 
-	virtual void done() {};
+	virtual void startFetch() = 0;
+	virtual void done() = 0;
+	virtual void changed(U32 mask) = 0;
 
 protected:
-	bool mRetryIfMissing;
 	uuid_vec_t mComplete;
 	uuid_vec_t mIncomplete;
 	uuid_vec_t mIDs;
 };
 
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryFetchItemsObserver
+//
+//   Fetches inventory items, calls done() when all inventory has arrived. 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLInventoryFetchItemsObserver : public LLInventoryFetchObserver
+{
+public:
+	// LLInventoryFetchItemsObserver(BOOL retry_if_missing = FALSE);
+	LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null, 
+								  BOOL retry_if_missing = FALSE); 
+	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids, 
+								  BOOL retry_if_missing = FALSE); 
+
+	/*virtual*/ void startFetch();
+	/*virtual*/ void changed(U32 mask);
+	/*virtual*/ void done();
+
+protected:
+	BOOL mRetryIfMissing;
+};
+
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryFetchDescendentsObserver
 //
 //   Fetches children of a category/folder, calls done() when all 
 //   inventory has arrived. 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLInventoryFetchDescendentsObserver : public LLInventoryObserver
+class LLInventoryFetchDescendentsObserver : public LLInventoryFetchObserver
 {
 public:
-	LLInventoryFetchDescendentsObserver();
-	LLInventoryFetchDescendentsObserver(const LLUUID& cat_id);
+	// LLInventoryFetchDescendentsObserver();
+	LLInventoryFetchDescendentsObserver(const LLUUID& cat_id = LLUUID::null);
 	LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids);
-	virtual void changed(U32 mask);
-
-	void setFolders(const uuid_vec_t& cat_ids) { mIDs = cat_ids; }
-	void setFolders(const LLUUID& cat_id) { mIDs.clear(); mIDs.push_back(cat_id); }
-	void startFetch();
-	bool isEverythingComplete() const;
-	virtual void done() = 0;
 
+	/*virtual*/ void startFetch();
+	/*virtual*/ void changed(U32 mask);
 protected:
-	bool isComplete(LLViewerInventoryCategory* cat);
-	uuid_vec_t mIncomplete;
-	uuid_vec_t mComplete;
-	uuid_vec_t mIDs;
+	BOOL isCategoryComplete(const LLViewerInventoryCategory* cat) const;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -137,7 +150,7 @@ protected:
 class LLInventoryFetchComboObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchComboObserver() : mDone(false) {}
+	LLInventoryFetchComboObserver() : mDone(FALSE) {}
 	virtual void changed(U32 mask);
 
 	void startFetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index c6c2d23a4b..f3ad4b6890 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -901,7 +901,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
 		{
 			rez_attachment(item, attachmentp);
 		}
-		else if(item && item->isComplete())
+		else if(item && item->isFinished())
 		{
 			// must be in library. copy it to our inventory and put it on.
 			LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp);
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index e93293a0f0..270999e560 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -482,9 +482,9 @@ void LLPanelOutfitEdit::updateLookInfo()
 	{
 		mLookContents->clearRows();
 
-		mFetchLook->setFolders(mLookID);
+		mFetchLook->setFetchID(mLookID);
 		mFetchLook->startFetch();
-		if (mFetchLook->isEverythingComplete())
+		if (mFetchLook->isFinished())
 		{
 			mFetchLook->done();
 		}
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index d0db77dcbe..dd31a62642 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -138,7 +138,7 @@ void LLPreview::onCommit()
 	const LLViewerInventoryItem *item = dynamic_cast<const LLViewerInventoryItem*>(getItem());
 	if(item)
 	{
-		if (!item->isComplete())
+		if (!item->isFinished())
 		{
 			// We are attempting to save an item that was never loaded
 			llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index fce90e4c44..2e061b235d 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -141,7 +141,7 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob
 
 	// this will call refresh when we have everything.
 	LLViewerInventoryItem* item = (LLViewerInventoryItem*)preview->getItem();
-	if (item && !item->isComplete())
+	if (item && !item->isFinished())
 	{
 		LLInventoryGestureAvailable* observer;
 		observer = new LLInventoryGestureAvailable();
@@ -648,7 +648,7 @@ void LLPreviewGesture::refresh()
 	LLPreview::refresh();
 	// If previewing or item is incomplete, all controls are disabled
 	LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
-	bool is_complete = (item && item->isComplete()) ? true : false;
+	bool is_complete = (item && item->isFinished()) ? true : false;
 	if (mPreviewGesture || !is_complete)
 	{
 		
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 6b0e524f8c..7b926f468d 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1823,7 +1823,7 @@ void LLLiveLSLEditor::saveIfNeeded()
 		return;
 	}
 
-	if(mItem.isNull() || !mItem->isComplete())
+	if(mItem.isNull() || !mItem->isFinished())
 	{
 		// $NOTE: While the error message may not be exactly correct,
 		// it's pretty close.
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 6dd4dc1ce7..88043365db 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -396,7 +396,7 @@ void LLSidepanelAppearance::fetchInventory()
 	fetch_worn->startFetch();
 	// If no items to be fetched, done will never be triggered.
 	// TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
-	if (fetch_worn->isEverythingComplete())
+	if (fetch_worn->isFinished())
 	{
 		fetch_worn->done();
 	}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 9b073943b4..0ec351965a 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -236,7 +236,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 	if (!item) return;
 
 	// do not enable the UI for incomplete items.
-	BOOL is_complete = item->isComplete();
+	BOOL is_complete = item->isFinished();
 	const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
 	const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
 	const LLPermissions& perm = item->getPermissions();
@@ -743,7 +743,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
 							CheckNextOwnerTransfer->get(), PERM_TRANSFER);
 	}
 	if(perm != item->getPermissions()
-		&& item->isComplete())
+		&& item->isFinished())
 	{
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 		new_item->setPermissions(perm);
@@ -873,7 +873,7 @@ void LLSidepanelItemInfo::updateSaleInfo()
 		sale_info.setSaleType(LLSaleInfo::FS_NOT);
 	}
 	if(sale_info != item->getSaleInfo()
-		&& item->isComplete())
+		&& item->isFinished())
 	{
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 340327a1e2..83a97c1ab1 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1771,7 +1771,7 @@ bool idle_startup()
 					}
 				}
 				// no need to add gesture to inventory observer, it's already made in constructor 
-				LLGestureMgr::instance().setItems(item_ids);
+				LLGestureMgr::instance().setFetchIDs(item_ids);
 				LLGestureMgr::instance().startFetch();
 			}
 		}
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index cc90b0753f..8f2e82914a 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -287,7 +287,7 @@ void LLCategoryDropObserver::done()
 	}
 	delete this;
 }
-
+/* Doesn't seem to be used anymore.
 class LLCategoryDropDescendentsObserver : public LLInventoryFetchDescendentsObserver
 {
 public:
@@ -335,7 +335,7 @@ void LLCategoryDropDescendentsObserver::done()
 		LLCategoryDropObserver* dropper;
 		dropper = new LLCategoryDropObserver(ids, mObjectID, mSource);
 		dropper->startFetch();
-		if (dropper->isEverythingComplete())
+		if (dropper->isDone())
 		{
 			dropper->done();
 		}
@@ -346,6 +346,7 @@ void LLCategoryDropDescendentsObserver::done()
 	}
 	delete this;
 }
+*/
 
 LLToolDragAndDrop::DragAndDropEntry::DragAndDropEntry(dragOrDrop3dImpl f_none,
 													  dragOrDrop3dImpl f_self,
@@ -1205,7 +1206,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return;
+	if (!item || !item->isFinished()) return;
 	
 	//if (regionp
 	//	&& (regionp->getRegionFlags() & REGION_FLAGS_SANDBOX))
@@ -1836,7 +1837,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
 	if (!item || !obj) return ACCEPT_NO;
 	// HACK: downcast
 	LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
-	if (!vitem->isComplete()) return ACCEPT_NO;
+	if (!vitem->isFinished()) return ACCEPT_NO;
 	if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links
 
 	// deny attempts to drop from an object onto itself. This is to
@@ -1996,7 +1997,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 
 	// must not be in the trash
 	const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
@@ -2045,7 +2046,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 
 	if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
 	{
@@ -2107,7 +2108,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
 	{
 		return ACCEPT_NO;
@@ -2186,7 +2187,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	EAcceptance rv = willObjectAcceptInventory(obj, item);
 	if (drop && (ACCEPT_YES_SINGLE <= rv))
 	{
@@ -2224,7 +2225,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	EAcceptance rv = willObjectAcceptInventory(obj, item);
 	if ((mask & MASK_CONTROL))
 	{
@@ -2289,7 +2290,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 
 	if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY)
 	{
@@ -2344,7 +2345,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 
 	if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY)
 	{
@@ -2452,7 +2453,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	LLViewerObject* root_object = obj;
 	if (obj && obj->getParent())
 	{
@@ -2580,7 +2581,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
 		}
 		LLCategoryDropObserver* dropper = new LLCategoryDropObserver(ids, obj->getID(), mSource);
 		dropper->startFetch();
-		if (dropper->isEverythingComplete())
+		if (dropper->isFinished())
 		{
 			dropper->done();
 		}
@@ -2611,7 +2612,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
 	{
 		// cannot give away no-transfer objects
@@ -2645,7 +2646,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	if (!isInventoryGiveAcceptable(item))
 	{
 		return ACCEPT_NO;
@@ -2684,7 +2685,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
 	LLViewerInventoryItem* item = NULL;
 	LLViewerInventoryCategory* cat = NULL;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 
 	if (!gAgent.allowOperation(PERM_COPY, item->getPermissions())
 		|| !item->getPermissions().allowTransferTo(LLUUID::null))
@@ -2705,7 +2706,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
 	LLViewerInventoryItem* item;
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
-	if (!item || !item->isComplete()) return ACCEPT_NO;
+	if (!item || !item->isFinished()) return ACCEPT_NO;
 	if ((mask & MASK_CONTROL))
 	{
 		// *HACK: In order to resolve SL-22177, we need to block drags
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 2db88c2ff8..9d449399e8 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -138,7 +138,7 @@ public:
 	bool importFileLocal(LLFILE* fp);
 
 	// new methods
-	BOOL isComplete() const { return mIsComplete; }
+	BOOL isFinished() const { return mIsComplete; }
 	void setComplete(BOOL complete) { mIsComplete = complete; }
 	//void updateAssetOnServer() const;
 
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 35eb3390a5..e800611914 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1209,7 +1209,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 				// so we can fetch it out of our inventory.
 				LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
 				open_agent_offer->startFetch();
-				if(catp || (itemp && itemp->isComplete()))
+				if(catp || (itemp && itemp->isFinished()))
 				{
 					open_agent_offer->done();
 				}
@@ -1272,7 +1272,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 			LLDiscardAgentOffer* discard_agent_offer;
 			discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
 			discard_agent_offer->startFetch(folders, items);
-			if(catp || (itemp && itemp->isComplete()))
+			if(catp || (itemp && itemp->isFinished()))
 			{
 				discard_agent_offer->done();
 			}
@@ -1605,7 +1605,7 @@ void inventory_offer_handler(LLOfferInfo* info)
 		// Prefetch the item into your local inventory.
 		LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
 		fetch_item->startFetch();
-		if(fetch_item->isEverythingComplete())
+		if(fetch_item->isFinished())
 		{
 			fetch_item->done();
 		}
@@ -2927,7 +2927,7 @@ BOOL LLPostTeleportNotifiers::tick()
 		{
 			LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea(folders);
 			fetcher->startFetch();
-			if(fetcher->isEverythingComplete())
+			if(fetcher->isFinished())
 			{
 				fetcher->done();
 			}
-- 
cgit v1.2.3


From e9f06764412af37023f45c4d83b2b97c48d2a13e Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Wed, 7 Apr 2010 11:15:27 -0400
Subject: EXT-6728 : Have LLInventoryFetchItems/DescendentsObserver inherit
 from a base abstract LLInventoryFetchObserver class

Minor cleanup of LLInventoryFetchComboObserver
---
 indra/newview/llinventoryobserver.cpp | 123 ++++++++++++++++++----------------
 indra/newview/llinventoryobserver.h   |  59 +++++++---------
 indra/newview/lltooldraganddrop.cpp   |  12 ++--
 indra/newview/llviewermessage.cpp     |  13 ++--
 4 files changed, 100 insertions(+), 107 deletions(-)

diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index ab32db9c8e..35bd06125f 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -105,17 +105,17 @@ void LLInventoryCompletionObserver::changed(U32 mask)
 {
 	// scan through the incomplete items and move or erase them as
 	// appropriate.
-	if(!mIncomplete.empty())
+	if (!mIncomplete.empty())
 	{
-		for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
+		for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
 		{
 			const LLViewerInventoryItem* item = gInventory.getItem(*it);
-			if(!item)
+			if (!item)
 			{
 				it = mIncomplete.erase(it);
 				continue;
 			}
-			if(item->isFinished())
+			if (item->isFinished())
 			{
 				mComplete.push_back(*it);
 				it = mIncomplete.erase(it);
@@ -123,7 +123,7 @@ void LLInventoryCompletionObserver::changed(U32 mask)
 			}
 			++it;
 		}
-		if(mIncomplete.empty())
+		if (mIncomplete.empty())
 		{
 			done();
 		}
@@ -132,7 +132,7 @@ void LLInventoryCompletionObserver::changed(U32 mask)
 
 void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
 {
-	if(id.notNull())
+	if (id.notNull())
 	{
 		mIncomplete.push_back(id);
 	}
@@ -165,12 +165,12 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 {
 	// scan through the incomplete items and move or erase them as
 	// appropriate.
-	if(!mIncomplete.empty())
+	if (!mIncomplete.empty())
 	{
-		for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
+		for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
 		{
 			LLViewerInventoryItem* item = gInventory.getItem(*it);
-			if(!item)
+			if (!item)
 			{
 				if (mRetryIfMissing)
 				{
@@ -188,7 +188,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 				}
 				continue;
 			}
-			if(item->isFinished())
+			if (item->isFinished())
 			{
 				mComplete.push_back(*it);
 				it = mIncomplete.erase(it);
@@ -196,7 +196,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 			}
 			++it;
 		}
-		if(mIncomplete.empty())
+		if (mIncomplete.empty())
 		{
 			done();
 		}
@@ -246,7 +246,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
 		for (S32 j=0; j<body[i]["items"].size(); j++)
 		{
 			LLSD item_entry = body[i]["items"][j];
-			if(start_new_message)
+			if (start_new_message)
 			{
 				start_new_message = FALSE;
 				msg->newMessageFast(_PREHASH_FetchInventory);
@@ -257,13 +257,13 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
 			msg->nextBlockFast(_PREHASH_InventoryData);
 			msg->addUUIDFast(_PREHASH_OwnerID, item_entry["owner_id"].asUUID());
 			msg->addUUIDFast(_PREHASH_ItemID, item_entry["item_id"].asUUID());
-			if(msg->isSendFull(NULL))
+			if (msg->isSendFull(NULL))
 			{
 				start_new_message = TRUE;
 				gAgent.sendReliableMessage();
 			}
 		}
-		if(!start_new_message)
+		if (!start_new_message)
 		{
 			gAgent.sendReliableMessage();
 		}
@@ -274,12 +274,12 @@ void LLInventoryFetchItemsObserver::startFetch()
 {
 	LLUUID owner_id;
 	LLSD items_llsd;
-	for(uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it)
+	for (uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it)
 	{
 		LLViewerInventoryItem* item = gInventory.getItem(*it);
-		if(item)
+		if (item)
 		{
-			if(item->isFinished())
+			if (item->isFinished())
 			{
 				// It's complete, so put it on the complete container.
 				mComplete.push_back(*it);
@@ -322,15 +322,15 @@ LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const u
 // virtual
 void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 {
-	for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
+	for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
 	{
 		const LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
-		if(!cat)
+		if (!cat)
 		{
 			it = mIncomplete.erase(it);
 			continue;
 		}
-		if(isCategoryComplete(cat))
+		if (isCategoryComplete(cat))
 		{
 			mComplete.push_back(*it);
 			it = mIncomplete.erase(it);
@@ -338,7 +338,7 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 		}
 		++it;
 	}
-	if(mIncomplete.empty())
+	if (mIncomplete.empty())
 	{
 		done();
 	}
@@ -346,11 +346,11 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask)
 
 void LLInventoryFetchDescendentsObserver::startFetch()
 {
-	for(uuid_vec_t::const_iterator it = mIDs.begin(); it != mIDs.end(); ++it)
+	for (uuid_vec_t::const_iterator it = mIDs.begin(); it != mIDs.end(); ++it)
 	{
 		LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
-		if(!cat) continue;
-		if(!isCategoryComplete(cat))
+		if (!cat) continue;
+		if (!isCategoryComplete(cat))
 		{
 			cat->fetch();		//blindly fetch it without seeing if anything else is fetching it.
 			mIncomplete.push_back(*it);	//Add to list of things being downloaded for this observer.
@@ -376,7 +376,7 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
 	LLInventoryModel::cat_array_t* cats;
 	LLInventoryModel::item_array_t* items;
 	gInventory.getDirectDescendentsOf(cat->getUUID(), cats, items);
-	if(!cats || !items)
+	if (!cats || !items)
 	{
 		llwarns << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << llendl;
 		// NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
@@ -405,19 +405,27 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
 	return FALSE;
 }
 
+LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
+															 const uuid_vec_t& item_ids) : 
+	mFolderIDs(folder_ids),
+	mItemIDs(item_ids),
+	mDone(FALSE)
+{
+}
+
 void LLInventoryFetchComboObserver::changed(U32 mask)
 {
-	if(!mIncompleteItems.empty())
+	if (!mIncompleteItems.empty())
 	{
-		for(uuid_vec_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
+		for (uuid_vec_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
 		{
 			LLViewerInventoryItem* item = gInventory.getItem(*it);
-			if(!item)
+			if (!item)
 			{
 				it = mIncompleteItems.erase(it);
 				continue;
 			}
-			if(item->isFinished())
+			if (item->isFinished())
 			{	
 				mCompleteItems.push_back(*it);
 				it = mIncompleteItems.erase(it);
@@ -426,17 +434,17 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
 			++it;
 		}
 	}
-	if(!mIncompleteFolders.empty())
+	if (!mIncompleteFolders.empty())
 	{
-		for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
+		for (uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
 		{
 			LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
-			if(!cat)
+			if (!cat)
 			{
 				it = mIncompleteFolders.erase(it);
 				continue;
 			}
-			if(gInventory.isCategoryComplete(*it))
+			if (gInventory.isCategoryComplete(*it))
 			{
 				mCompleteFolders.push_back(*it);
 				it = mIncompleteFolders.erase(it);
@@ -445,22 +453,21 @@ void LLInventoryFetchComboObserver::changed(U32 mask)
 			++it;
 		}
 	}
-	if(!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty())
+	if (!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty())
 	{
 		mDone = TRUE;
 		done();
 	}
 }
 
-void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
-											   const uuid_vec_t& item_ids)
+void LLInventoryFetchComboObserver::startFetch()
 {
 	lldebugs << "LLInventoryFetchComboObserver::startFetch()" << llendl;
-	for(uuid_vec_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit)
+	for (uuid_vec_t::const_iterator fit = mFolderIDs.begin(); fit != mFolderIDs.end(); ++fit)
 	{
 		LLViewerInventoryCategory* cat = gInventory.getCategory(*fit);
-		if(!cat) continue;
-		if(!gInventory.isCategoryComplete(*fit))
+		if (!cat) continue;
+		if (!gInventory.isCategoryComplete(*fit))
 		{
 			cat->fetch();
 			lldebugs << "fetching folder " << *fit <<llendl;
@@ -479,15 +486,15 @@ void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
 	// have to fetch it individually.
 	LLSD items_llsd;
 	LLUUID owner_id;
-	for(uuid_vec_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit)
+	for (uuid_vec_t::const_iterator iit = mItemIDs.begin(); iit != mItemIDs.end(); ++iit)
 	{
-		LLViewerInventoryItem* item = gInventory.getItem(*iit);
-		if(!item)
+		const LLViewerInventoryItem* item = gInventory.getItem(*iit);
+		if (!item)
 		{
 			lldebugs << "uanble to find item " << *iit << llendl;
 			continue;
 		}
-		if(item->isFinished())
+		if (item->isFinished())
 		{
 			// It's complete, so put it on the complete container.
 			mCompleteItems.push_back(*iit);
@@ -499,7 +506,7 @@ void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
 			mIncompleteItems.push_back(*iit);
 			owner_id = item->getPermissions().getOwner();
 		}
-		if(std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end())
+		if (std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end())
 		{
 			LLSD item_entry;
 			item_entry["owner_id"] = owner_id;
@@ -516,7 +523,7 @@ void LLInventoryFetchComboObserver::startFetch(const uuid_vec_t& folder_ids,
 
 void LLInventoryExistenceObserver::watchItem(const LLUUID& id)
 {
-	if(id.notNull())
+	if (id.notNull())
 	{
 		mMIA.push_back(id);
 	}
@@ -526,12 +533,12 @@ void LLInventoryExistenceObserver::changed(U32 mask)
 {
 	// scan through the incomplete items and move or erase them as
 	// appropriate.
-	if(!mMIA.empty())
+	if (!mMIA.empty())
 	{
-		for(uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); )
+		for (uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); )
 		{
 			LLViewerInventoryItem* item = gInventory.getItem(*it);
-			if(!item)
+			if (!item)
 			{
 				++it;
 				continue;
@@ -539,7 +546,7 @@ void LLInventoryExistenceObserver::changed(U32 mask)
 			mExist.push_back(*it);
 			it = mMIA.erase(it);
 		}
-		if(mMIA.empty())
+		if (mMIA.empty())
 		{
 			done();
 		}
@@ -548,7 +555,7 @@ void LLInventoryExistenceObserver::changed(U32 mask)
 
 void LLInventoryAddedObserver::changed(U32 mask)
 {
-	if(!(mask & LLInventoryObserver::ADD))
+	if (!(mask & LLInventoryObserver::ADD))
 	{
 		return;
 	}
@@ -580,7 +587,7 @@ void LLInventoryAddedObserver::changed(U32 mask)
 
 	LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
 	S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
-	for(S32 i = 0; i < num_blocks; ++i)
+	for (S32 i = 0; i < num_blocks; ++i)
 	{
 		titem->unpackMessage(msg, _PREHASH_InventoryData, i);
 		if (!(titem->getUUID().isNull()))
@@ -602,18 +609,18 @@ LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransacti
 
 void LLInventoryTransactionObserver::changed(U32 mask)
 {
-	if(mask & LLInventoryObserver::ADD)
+	if (mask & LLInventoryObserver::ADD)
 	{
 		// This could be it - see if we are processing a bulk update
 		LLMessageSystem* msg = gMessageSystem;
-		if(msg->getMessageName()
+		if (msg->getMessageName()
 		   && (0 == strcmp(msg->getMessageName(), "BulkUpdateInventory")))
 		{
 			// we have a match for the message - now check the
 			// transaction id.
 			LLUUID id;
 			msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, id);
-			if(id == mTransactionID)
+			if (id == mTransactionID)
 			{
 				// woo hoo, we found it
 				uuid_vec_t folders;
@@ -621,19 +628,19 @@ void LLInventoryTransactionObserver::changed(U32 mask)
 				S32 count;
 				count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
 				S32 i;
-				for(i = 0; i < count; ++i)
+				for (i = 0; i < count; ++i)
 				{
 					msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_FolderID, id, i);
-					if(id.notNull())
+					if (id.notNull())
 					{
 						folders.push_back(id);
 					}
 				}
 				count = msg->getNumberOfBlocksFast(_PREHASH_ItemData);
-				for(i = 0; i < count; ++i)
+				for (i = 0; i < count; ++i)
 				{
 					msg->getUUIDFast(_PREHASH_ItemData, _PREHASH_ItemID, id, i);
-					if(id.notNull())
+					if (id.notNull())
 					{
 						items.push_back(id);
 					}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 7480b7e7af..e4ae9097bd 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -97,7 +97,6 @@ protected:
 	uuid_vec_t mIDs;
 };
 
-
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryFetchItemsObserver
 //
@@ -106,7 +105,6 @@ protected:
 class LLInventoryFetchItemsObserver : public LLInventoryFetchObserver
 {
 public:
-	// LLInventoryFetchItemsObserver(BOOL retry_if_missing = FALSE);
 	LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null, 
 								  BOOL retry_if_missing = FALSE); 
 	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids, 
@@ -129,7 +127,6 @@ protected:
 class LLInventoryFetchDescendentsObserver : public LLInventoryFetchObserver
 {
 public:
-	// LLInventoryFetchDescendentsObserver();
 	LLInventoryFetchDescendentsObserver(const LLUUID& cat_id = LLUUID::null);
 	LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids);
 
@@ -142,46 +139,44 @@ protected:
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryFetchComboObserver
 //
-// This class does an appropriate combination of fetch descendents and
-// item fetches based on completion of categories and items. Much like
-// the fetch and fetch descendents, this will call done() when everything
-// has arrived.
+//   Does an appropriate combination of fetch descendents and
+//   item fetches based on completion of categories and items. Much like
+//   the fetch and fetch descendents, this will call done() when everything
+//   has arrived.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class LLInventoryFetchComboObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchComboObserver() : mDone(FALSE) {}
-	virtual void changed(U32 mask);
-
-	void startFetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
+	LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
+								  const uuid_vec_t& item_ids);
+	/*virtual*/ void changed(U32 mask);
+	void startFetch();
 
 	virtual void done() = 0;
-
 protected:
-	bool mDone;
+	BOOL mDone;
 	uuid_vec_t mCompleteFolders;
 	uuid_vec_t mIncompleteFolders;
 	uuid_vec_t mCompleteItems;
 	uuid_vec_t mIncompleteItems;
+
+	uuid_vec_t mItemIDs;
+	uuid_vec_t mFolderIDs;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryExistenceObserver
 //
-// This class is used as a base class for doing somethign when all the
-// observed item ids exist in the inventory somewhere. You can derive
-// a class from this class and implement the done() method to do
-// something useful.
+//   Used as a base class for doing something when all the
+//   observed item ids exist in the inventory somewhere.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 class LLInventoryExistenceObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryExistenceObserver() {}
-	virtual void changed(U32 mask);
+	/*virtual*/ void changed(U32 mask);
 
 	void watchItem(const LLUUID& id);
-
 protected:
 	virtual void done() = 0;
 	uuid_vec_t mExist;
@@ -191,18 +186,14 @@ protected:
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryAddedObserver
 //
-// This class is used as a base class for doing something when 
-// a new item arrives in inventory.
-// It does not watch for a certain UUID, rather it acts when anything is added
-// Derive a class from this class and implement the done() method to do
-// something useful.
+//   Base class for doing something when a new item arrives in inventory.
+//   It does not watch for a certain UUID, rather it acts when anything is added
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 class LLInventoryAddedObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryAddedObserver() : mAdded() {}
-	virtual void changed(U32 mask);
+	/*virtual*/ void changed(U32 mask);
 
 protected:
 	virtual void done() = 0;
@@ -213,18 +204,15 @@ protected:
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryTransactionObserver
 //
-// Class which can be used as a base class for doing something when an
-// inventory transaction completes.
-//
-// *NOTE: This class is not quite complete. Avoid using unless you fix up it's
-// functionality gaps.
+//   Base class for doing something when an inventory transaction completes.
+//   NOTE: This class is not quite complete. Avoid using unless you fix up its
+//   functionality gaps.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 class LLInventoryTransactionObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryTransactionObserver(const LLTransactionID& transaction_id);
-	virtual void changed(U32 mask);
+	/*virtual*/ void changed(U32 mask);
 
 protected:
 	virtual void done(const uuid_vec_t& folders, const uuid_vec_t& items) = 0;
@@ -240,12 +228,11 @@ protected:
 //   and declares a new method named done() which is called when all watched items 
 //   have complete information in the inventory model.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 class LLInventoryCompletionObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryCompletionObserver() {}
-	virtual void changed(U32 mask);
+	/*virtual*/ void changed(U32 mask);
 
 	void watchItem(const LLUUID& id);
 
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 8f2e82914a..a67067d29c 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -235,7 +235,10 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
 class LLCategoryFireAndForget : public LLInventoryFetchComboObserver
 {
 public:
-	LLCategoryFireAndForget() {}
+	LLCategoryFireAndForget(const uuid_vec_t& folder_ids,
+							const uuid_vec_t& item_ids) :
+		LLInventoryFetchComboObserver(folder_ids, item_ids)
+	{}
 	~LLCategoryFireAndForget() {}
 	virtual void done()
 	{
@@ -482,8 +485,8 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
 			}
 			if (!folder_ids.empty() || !item_ids.empty())
 			{
-				LLCategoryFireAndForget fetcher;
-				fetcher.startFetch(folder_ids, item_ids);
+				LLCategoryFireAndForget fetcher(folder_ids, item_ids);
+				fetcher.startFetch();
 			}
 		}
 	}
@@ -552,8 +555,7 @@ void LLToolDragAndDrop::beginMultiDrag(
 			uuid_vec_t item_ids;
 			std::back_insert_iterator<uuid_vec_t> copier(folder_ids);
 			std::copy(cat_ids.begin(), cat_ids.end(), copier);
-			LLCategoryFireAndForget fetcher;
-			fetcher.startFetch(folder_ids, item_ids);
+			LLCategoryFireAndForget fetcher(folder_ids, item_ids);
 		}
 	}
 }
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e800611914..1afbca81c3 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -757,11 +757,12 @@ void start_new_inventory_observer()
 	}
 }
 
-class LLDiscardAgentOffer : public LLInventoryFetchComboObserver
+class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
 {
 	LOG_CLASS(LLDiscardAgentOffer);
 public:
 	LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) :
+		LLInventoryFetchItemsObserver(object_id),
 		mFolderID(folder_id),
 		mObjectID(object_id) {}
 	virtual ~LLDiscardAgentOffer() {}
@@ -1266,13 +1267,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 			// Disabled logging to old chat floater to fix crash in group notices - EXT-4149
 			// LLFloaterChat::addChatHistory(chat);
 			
-			uuid_vec_t folders;
-			uuid_vec_t items;
-			items.push_back(mObjectID);
-			LLDiscardAgentOffer* discard_agent_offer;
-			discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
-			discard_agent_offer->startFetch(folders, items);
-			if(catp || (itemp && itemp->isFinished()))
+			LLDiscardAgentOffer* discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
+			discard_agent_offer->startFetch();
+			if (catp || (itemp && itemp->isFinished()))
 			{
 				discard_agent_offer->done();
 			}
-- 
cgit v1.2.3


From 5d3de2ea03ff500690acec13fd4b403dc8a72088 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Wed, 7 Apr 2010 13:30:21 -0400
Subject: EXT-6745 : Refactor LLFetchComboObserver to use LLFetchItems and
 LLFetchDescedents instead of code duplication

Took out a bunch of code duplication from the FetchComboObserver and am using the LLFetchItems/DescendentsObservers instead.  Also added some comments and made some minor superficial cleanup to LLInventoryObserver done().
---
 indra/newview/llinventoryobserver.cpp | 135 ++++++++--------------------------
 indra/newview/llinventoryobserver.h   |  23 ++----
 indra/newview/lltooldraganddrop.cpp   |   8 +-
 3 files changed, 44 insertions(+), 122 deletions(-)

diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 35bd06125f..26fe1904fb 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -205,10 +205,6 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
 	//llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
 }
 
-void LLInventoryFetchItemsObserver::done()
-{
-}
-
 void fetch_items_from_llsd(const LLSD& items_llsd)
 {
 	if (!items_llsd.size()) return;
@@ -406,119 +402,50 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven
 }
 
 LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
-															 const uuid_vec_t& item_ids) : 
-	mFolderIDs(folder_ids),
-	mItemIDs(item_ids),
-	mDone(FALSE)
+															 const uuid_vec_t& item_ids)
 {
-}
+	mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);
 
-void LLInventoryFetchComboObserver::changed(U32 mask)
-{
-	if (!mIncompleteItems.empty())
-	{
-		for (uuid_vec_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
-		{
-			LLViewerInventoryItem* item = gInventory.getItem(*it);
-			if (!item)
-			{
-				it = mIncompleteItems.erase(it);
-				continue;
-			}
-			if (item->isFinished())
-			{	
-				mCompleteItems.push_back(*it);
-				it = mIncompleteItems.erase(it);
-				continue;
-			}
-			++it;
-		}
-	}
-	if (!mIncompleteFolders.empty())
+	uuid_vec_t pruned_item_ids;
+	for (uuid_vec_t::const_iterator item_iter = item_ids.begin();
+		 item_iter != item_ids.end();
+		 ++item_iter)
 	{
-		for (uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
+		const LLUUID& item_id = (*item_iter);
+		const LLViewerInventoryItem* item = gInventory.getItem(item_id);
+		if (item && std::find(folder_ids.begin(), folder_ids.end(), item->getParentUUID()) == folder_ids.end())
 		{
-			LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
-			if (!cat)
-			{
-				it = mIncompleteFolders.erase(it);
-				continue;
-			}
-			if (gInventory.isCategoryComplete(*it))
-			{
-				mCompleteFolders.push_back(*it);
-				it = mIncompleteFolders.erase(it);
-				continue;
-			}
-			++it;
+			continue;
 		}
+		pruned_item_ids.push_back(item_id);
 	}
-	if (!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty())
+
+	mFetchItems = new LLInventoryFetchItemsObserver(pruned_item_ids);
+	mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);
+}
+
+LLInventoryFetchComboObserver::~LLInventoryFetchComboObserver()
+{
+	mFetchItems->done();
+	mFetchDescendents->done();
+	delete mFetchItems;
+	delete mFetchDescendents;
+}
+
+void LLInventoryFetchComboObserver::changed(U32 mask)
+{
+	mFetchItems->changed(mask);
+	mFetchDescendents->changed(mask);
+	if (mFetchItems->isFinished() && mFetchDescendents->isFinished())
 	{
-		mDone = TRUE;
 		done();
 	}
 }
 
 void LLInventoryFetchComboObserver::startFetch()
 {
-	lldebugs << "LLInventoryFetchComboObserver::startFetch()" << llendl;
-	for (uuid_vec_t::const_iterator fit = mFolderIDs.begin(); fit != mFolderIDs.end(); ++fit)
-	{
-		LLViewerInventoryCategory* cat = gInventory.getCategory(*fit);
-		if (!cat) continue;
-		if (!gInventory.isCategoryComplete(*fit))
-		{
-			cat->fetch();
-			lldebugs << "fetching folder " << *fit <<llendl;
-			mIncompleteFolders.push_back(*fit);
-		}
-		else
-		{
-			mCompleteFolders.push_back(*fit);
-			lldebugs << "completing folder " << *fit <<llendl;
-		}
-	}
-
-	// Now for the items - we fetch everything which is not a direct
-	// descendent of an incomplete folder because the item will show
-	// up in an inventory descendents message soon enough so we do not
-	// have to fetch it individually.
-	LLSD items_llsd;
-	LLUUID owner_id;
-	for (uuid_vec_t::const_iterator iit = mItemIDs.begin(); iit != mItemIDs.end(); ++iit)
-	{
-		const LLViewerInventoryItem* item = gInventory.getItem(*iit);
-		if (!item)
-		{
-			lldebugs << "uanble to find item " << *iit << llendl;
-			continue;
-		}
-		if (item->isFinished())
-		{
-			// It's complete, so put it on the complete container.
-			mCompleteItems.push_back(*iit);
-			lldebugs << "completing item " << *iit << llendl;
-			continue;
-		}
-		else
-		{
-			mIncompleteItems.push_back(*iit);
-			owner_id = item->getPermissions().getOwner();
-		}
-		if (std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end())
-		{
-			LLSD item_entry;
-			item_entry["owner_id"] = owner_id;
-			item_entry["item_id"] = (*iit);
-			items_llsd.append(item_entry);
-		}
-		else
-		{
-			lldebugs << "not worrying about " << *iit << llendl;
-		}
-	}
-	fetch_items_from_llsd(items_llsd);
+	mFetchItems->startFetch();
+	mFetchDescendents->startFetch();
 }
 
 void LLInventoryExistenceObserver::watchItem(const LLUUID& id)
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index e4ae9097bd..7b4d3dfe7b 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -45,7 +45,6 @@ class LLViewerInventoryCategory;
 //   A simple abstract base class that can relay messages when the inventory 
 //   changes.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 class LLInventoryObserver
 {
 public:
@@ -60,7 +59,7 @@ public:
 		ADD 			= 4,	// Something added
 		REMOVE 			= 8,	// Something deleted
 		STRUCTURE 		= 16,	// Structural change (e.g. item or folder moved)
-		CALLING_CARD 	= 32,	// Calling card change (e.g. online, grant status, cancel)
+		CALLING_CARD	= 32,	// Calling card change (e.g. online, grant status, cancel)
 		GESTURE 		= 64,
 		REBUILD 		= 128, 	// Item UI changed (e.g. item type different)
 		SORT 			= 256, 	// Folder needs to be resorted.
@@ -88,9 +87,8 @@ public:
 	BOOL isFinished() const;
 
 	virtual void startFetch() = 0;
-	virtual void done() = 0;
 	virtual void changed(U32 mask) = 0;
-
+	virtual void done() {};
 protected:
 	uuid_vec_t mComplete;
 	uuid_vec_t mIncomplete;
@@ -112,8 +110,6 @@ public:
 
 	/*virtual*/ void startFetch();
 	/*virtual*/ void changed(U32 mask);
-	/*virtual*/ void done();
-
 protected:
 	BOOL mRetryIfMissing;
 };
@@ -140,28 +136,23 @@ protected:
 // Class LLInventoryFetchComboObserver
 //
 //   Does an appropriate combination of fetch descendents and
-//   item fetches based on completion of categories and items. Much like
-//   the fetch and fetch descendents, this will call done() when everything
-//   has arrived.
+//   item fetches based on completion of categories and items. This is optimized
+//   to not fetch item_ids that are descendents of any of the folder_ids.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class LLInventoryFetchComboObserver : public LLInventoryObserver
 {
 public:
 	LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
 								  const uuid_vec_t& item_ids);
+	~LLInventoryFetchComboObserver();
 	/*virtual*/ void changed(U32 mask);
 	void startFetch();
 
 	virtual void done() = 0;
 protected:
 	BOOL mDone;
-	uuid_vec_t mCompleteFolders;
-	uuid_vec_t mIncompleteFolders;
-	uuid_vec_t mCompleteItems;
-	uuid_vec_t mIncompleteItems;
-
-	uuid_vec_t mItemIDs;
-	uuid_vec_t mFolderIDs;
+	LLInventoryFetchItemsObserver *mFetchItems;
+	LLInventoryFetchDescendentsObserver *mFetchDescendents;
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index a67067d29c..774626f19d 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -232,6 +232,9 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
 	return allowed;
 }
 
+// Starts a fetch on folders and items.  This is really not used 
+// as an observer in the traditional sense; we're just using it to
+// request a fetch and we don't care about when/if the response arrives.
 class LLCategoryFireAndForget : public LLInventoryFetchComboObserver
 {
 public:
@@ -485,8 +488,9 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
 			}
 			if (!folder_ids.empty() || !item_ids.empty())
 			{
-				LLCategoryFireAndForget fetcher(folder_ids, item_ids);
-				fetcher.startFetch();
+				LLCategoryFireAndForget *fetcher = new LLCategoryFireAndForget(folder_ids, item_ids);
+				fetcher->startFetch();
+				delete fetcher;
 			}
 		}
 	}
-- 
cgit v1.2.3


From 516ec63f52245a777725d29efe3c35e4e4e72936 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Wed, 7 Apr 2010 14:40:36 -0400
Subject: EXT-6749 : Have all observers persist/retry when items are missing
 after notifications

Added mNumTries and took out mRetryIfMissing
---
 indra/newview/llagentwearablesfetch.cpp |  2 +-
 indra/newview/llgesturemgr.cpp          |  1 -
 indra/newview/llinventoryobserver.cpp   | 51 ++++++++++++++++++---------------
 indra/newview/llinventoryobserver.h     | 10 +++----
 4 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index aafbb0d22c..08d8ccfd23 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -91,7 +91,7 @@ class LLFetchAndLinkObserver: public LLInventoryFetchItemsObserver
 {
 public:
 	LLFetchAndLinkObserver(uuid_vec_t& ids):
-		LLInventoryFetchItemsObserver(ids, true) // retry for missing items
+		LLInventoryFetchItemsObserver(ids)
 	{
 	}
 	~LLFetchAndLinkObserver()
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 3d38ff3730..0996d09e25 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -73,7 +73,6 @@ LLGestureMgr::LLGestureMgr()
 	mActive(),
 	mLoadingCount(0)
 {
-	mRetryIfMissing = true;
 	gInventory.addObserver(this);
 }
 
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 26fe1904fb..fb2ef01c8f 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -62,6 +62,14 @@
 #include "llsdutil.h"
 #include <deque>
 
+// If the viewer gets a notification, your observer assumes
+// that that notification is for itself and then tries to process
+// the results.  The notification could be for something else (e.g.
+// you're fetching an item and a notification gets triggered because
+// you renamed some other item).  This counter is to specify how many
+// notification to wait for before giving up.
+static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 20;
+
 LLInventoryObserver::LLInventoryObserver()
 {
 }
@@ -138,66 +146,63 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
 	}
 }
 
-/*
-LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(BOOL retry_if_missing) :
-	mRetryIfMissing(retry_if_missing)
-{
-}
-*/
-
-LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id,
-															 BOOL retry_if_missing) :
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) :
 	LLInventoryFetchObserver(item_id),
-	mRetryIfMissing(retry_if_missing)
+	mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS)
 {
 	mIDs.clear();
 	mIDs.push_back(item_id);
 }
 
-LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids,
-															 BOOL retry_if_missing) :
-	LLInventoryFetchObserver(item_ids),
-	mRetryIfMissing(retry_if_missing)
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) :
+	LLInventoryFetchObserver(item_ids)
 {
 }
 
 void LLInventoryFetchItemsObserver::changed(U32 mask)
 {
+	BOOL any_items_missing = FALSE;
+
 	// scan through the incomplete items and move or erase them as
 	// appropriate.
 	if (!mIncomplete.empty())
 	{
 		for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
 		{
-			LLViewerInventoryItem* item = gInventory.getItem(*it);
+			const LLUUID& item_id = (*it);
+			LLViewerInventoryItem* item = gInventory.getItem(item_id);
 			if (!item)
 			{
-				if (mRetryIfMissing)
+				any_items_missing = TRUE;
+				if (mNumTries > 0)
 				{
-					// BAP changed to skip these items, so we should keep retrying until they arrive.
-					// Did not make this the default behavior because of uncertainty about impact -
-					// could cause some observers that currently complete to wait forever.
+					// Keep trying.
 					++it;
 				}
 				else
 				{
-					// BUG: This can cause done() to get called prematurely below.
-					// This happens with the LLGestureInventoryFetchObserver that
-					// loads gestures at startup. JC
+					// Just concede that this item hasn't arrived in reasonable time and continue on.
+					llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl;
 					it = mIncomplete.erase(it);
 				}
 				continue;
 			}
 			if (item->isFinished())
 			{
-				mComplete.push_back(*it);
+				mComplete.push_back(item_id);
 				it = mIncomplete.erase(it);
 				continue;
 			}
 			++it;
 		}
+		if (any_items_missing)
+		{
+			mNumTries--;
+		}
+
 		if (mIncomplete.empty())
 		{
+			mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS;
 			done();
 		}
 	}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 7b4d3dfe7b..ac2eca3477 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -103,15 +103,13 @@ protected:
 class LLInventoryFetchItemsObserver : public LLInventoryFetchObserver
 {
 public:
-	LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null, 
-								  BOOL retry_if_missing = FALSE); 
-	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids, 
-								  BOOL retry_if_missing = FALSE); 
+	LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null); 
+	LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids); 
 
 	/*virtual*/ void startFetch();
 	/*virtual*/ void changed(U32 mask);
-protected:
-	BOOL mRetryIfMissing;
+private:
+	S8 mNumTries; // Number of times changed() was called without success
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
cgit v1.2.3


From dbe288bf8f14447f7bda5413c7886f539fec2a20 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Wed, 7 Apr 2010 16:33:44 -0400
Subject: fixes from automated merge

---
 indra/newview/llpaneloutfitedit.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index dc039486e1..c3def73753 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -376,14 +376,14 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)
 		if(wearable_to_edit)
 		{
 			bool can_modify = false;
-			bool is_complete = item_to_edit->isComplete();
+			bool is_complete = item_to_edit->isFinished();
 			// if item_to_edit is a link, its properties are not appropriate, 
 			// lets get original item with actual properties
 			LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID());
 			if(original_item)
 			{
 				can_modify = original_item->getPermissions().allowModifyBy(gAgentID);
-				is_complete = original_item->isComplete();
+				is_complete = original_item->isFinished();
 			}
 
 			if (can_modify && is_complete)
-- 
cgit v1.2.3


From 00462c243116e2720acf51ee1f777e69e8189f33 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Thu, 8 Apr 2010 12:07:58 +0300
Subject: Fixed normal bug EXT-4347 (Moving object contents to inventory opens
 files, changes menu)

Implementation details:
 * Added new LLViewerInventoryMoveFromWorldObserver to watch moved items via their Asses UUIDs. It is instantiated only once due to drop events are sent separately for each item while multi-dragging.
 * Existent LLOpenTaskOffer observer uses it to exclude watched by LLViewerInventoryMoveFromWorldObserver items from own processing.
 * Removed dependancy on LLPanelPlaces in open_inventory_offer(). Openning of offered LM via group notice moved into an appropriate section (processed by LLOpenTaskGroupOffer)

Known Issues:
 * If Script item is among the dragged items from object to inventory it will be the only selected item in the inventory panel.
    Reason: it does not have its own Asset UUID and processed via LLOpenTaskOffer when should not.

Reviewed by Leyla and Richard at https://codereview.productengine.com/secondlife/r/116/

--HG--
branch : product-engine
---
 indra/newview/llinventorybridge.cpp   |   3 +
 indra/newview/llinventoryobserver.cpp |  63 ++++++++++
 indra/newview/llinventoryobserver.h   |  30 +++++
 indra/newview/llviewermessage.cpp     | 212 ++++++++++++++++++++++++++++++----
 indra/newview/llviewermessage.h       |   2 +
 5 files changed, 285 insertions(+), 25 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index b552b5ac07..943a851c13 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3167,6 +3167,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 			}
 			else
 			{
+				// store dad inventory item to select added one later. See EXT-4347
+				set_dad_inventory_item(inv_item, mUUID);
+
 				LLNotification::Params params("MoveInventoryFromObject");
 				params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
 				LLNotifications::instance().forceResponse(params, 0);
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 83e1bbd5a0..922fcc16c0 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -495,6 +495,69 @@ void LLInventoryExistenceObserver::changed(U32 mask)
 	}
 }
 
+void LLInventoryMoveFromWorldObserver::changed(U32 mask)
+{
+	if(!(mask & LLInventoryObserver::ADD))
+	{
+		return;
+	}
+
+	// nothing is watched
+	if (mWatchedAssets.size() == 0)
+	{
+		return;
+	}
+
+	LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem;
+	LLMessageSystem* msg = gMessageSystem;
+	S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
+	for(S32 i = 0; i < num_blocks; ++i)
+	{
+		item->unpackMessage(msg, _PREHASH_InventoryData, i);
+		const LLUUID& asset_uuid = item->getAssetUUID();
+		if (item->getUUID().notNull() && asset_uuid.notNull())
+		{
+			if (isAssetWatched(asset_uuid))
+			{
+				LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL;
+				mAddedItems.push_back(item->getUUID());
+			}
+		}
+	}
+
+	if (mAddedItems.size() == mWatchedAssets.size())
+	{
+		done();
+		LL_DEBUGS("Inventory_Move") << "All watched items are added & processed." << LL_ENDL;
+		mAddedItems.clear();
+
+		// Unable to clean watched items here due to somebody can require to check them in current frame.
+		// set dirty state to clean them while next watch cycle.
+		mIsDirty = true;
+	}
+}
+
+void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id)
+{
+	if(asset_id.notNull())
+	{
+		if (mIsDirty)
+		{
+			LL_DEBUGS("Inventory_Move") << "Watched items are dirty. Clean them." << LL_ENDL;
+			mWatchedAssets.clear();
+			mIsDirty = false;
+		}
+
+		mWatchedAssets.push_back(asset_id);
+		onAssetAdded(asset_id);
+	}
+}
+
+bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id )
+{
+	return std::find(mWatchedAssets.begin(), mWatchedAssets.end(), asset_id) != mWatchedAssets.end();
+}
+
 void LLInventoryAddedObserver::changed(U32 mask)
 {
 	if(!(mask & LLInventoryObserver::ADD))
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index ba70552ebc..b710a9d326 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -193,6 +193,36 @@ protected:
 	uuid_vec_t mMIA;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryMovedObserver
+//
+// This class is used as a base class for doing something when all the
+// item for observed asset ids were added into the inventory.
+// Derive a class from this class and implement the done() method to do
+// something useful.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLInventoryMoveFromWorldObserver : public LLInventoryObserver
+{
+public:
+	LLInventoryMoveFromWorldObserver() : mIsDirty(false) {}
+	virtual void changed(U32 mask);
+
+	void watchAsset(const LLUUID& asset_id);
+	bool isAssetWatched(const LLUUID& asset_id);
+
+protected:
+	virtual void onAssetAdded(const LLUUID& asset_id) {}
+	virtual void done() = 0;
+
+	typedef std::vector<LLUUID> item_ref_t;
+	item_ref_t mAddedItems;
+	item_ref_t mWatchedAssets;
+
+private:
+	bool mIsDirty;
+};
+
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLInventoryAddedObserver
 //
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index c542459cdb..2b41a83ba5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -71,7 +71,6 @@
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
 #include "llpanelgrouplandmoney.h"
-#include "llpanelplaces.h"
 #include "llrecentpeople.h"
 #include "llscriptfloater.h"
 #include "llselectmgr.h"
@@ -692,6 +691,52 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
 
 	return false;
 }
+
+static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items, LLInventoryPanel *inventory_panel)
+{
+	if (NULL == inventory_panel) return;
+
+	for (std::vector<LLUUID>::const_iterator item_iter = items.begin();
+		item_iter != items.end();
+		++item_iter)
+	{
+		const LLUUID& item_id = (*item_iter);
+		if(!highlight_offered_item(item_id))
+		{
+			continue;
+		}
+
+		LLInventoryItem* item = gInventory.getItem(item_id);
+		llassert(item);
+		if (!item) {
+			continue;
+		}
+
+		LL_DEBUGS("Inventory_Move") << "Highlighting inventory item: " << item->getName() << ", " << item_id  << LL_ENDL;
+		LLFolderView* fv = inventory_panel->getRootFolder();
+		if (fv)
+		{
+			LLFolderViewItem* fv_item = fv->getItemByID(item_id);
+			if (fv_item)
+			{
+				LLFolderViewItem* fv_folder = fv_item->getParentFolder();
+				if (fv_folder)
+				{
+					// Parent folders can be different in case of 2 consecutive drag and drop
+					// operations when the second one is started before the first one completes.
+					LL_DEBUGS("Inventory_Move") << "Open folder: " << fv_folder->getName() << LL_ENDL;
+					fv_folder->setOpen(TRUE);
+					if (fv_folder->isSelected())
+					{
+						fv->changeSelection(fv_folder, FALSE);
+					}
+				}
+				fv->changeSelection(fv_item, TRUE);
+			}
+		}
+	}
+}
+
 static LLNotificationFunctorRegistration jgr_1("JoinGroup", join_group_response);
 static LLNotificationFunctorRegistration jgr_2("JoinedTooManyGroupsMember", join_group_response);
 static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_response);
@@ -714,6 +759,108 @@ private:
 	std::string mFromName;
 };
 
+/**
+ * Class to observe adding of new items moved from the world to user's inventory to select them in inventory.
+ *
+ * We can't create it each time items are moved because "drop" event is sent separately for each
+ * element even while multi-dragging. We have to have the only instance of the observer. See EXT-4347.
+ */
+class LLViewerInventoryMoveFromWorldObserver : public LLInventoryMoveFromWorldObserver
+{
+public:
+	LLViewerInventoryMoveFromWorldObserver()
+		: LLInventoryMoveFromWorldObserver()
+		, mActivePanel(NULL)
+	{
+
+	}
+
+	void setMoveIntoFolderID(const LLUUID& into_folder_uuid) {mMoveIntoFolderID = into_folder_uuid; }
+
+private:
+	/*virtual */void onAssetAdded(const LLUUID& asset_id)
+	{
+		// Store active Inventory panel.
+		mActivePanel = LLInventoryPanel::getActiveInventoryPanel();
+
+		// Store selected items (without destination folder)
+		mSelectedItems.clear();
+		mActivePanel->getRootFolder()->getSelectionList(mSelectedItems);
+		mSelectedItems.erase(mMoveIntoFolderID);
+	}
+
+	/**
+	 * Selects added inventory items watched by their Asset UUIDs if selection was not changed since
+	 * all items were started to watch (dropped into a folder).
+	 */
+	void done()
+	{
+		// if selection is not changed since watch started lets hightlight new items.
+		if (mActivePanel && !isSelectionChanged())
+		{
+			LL_DEBUGS("Inventory_Move") << "Selecting new items..." << LL_ENDL;
+			mActivePanel->clearSelection();
+			highlight_inventory_items_in_panel(mAddedItems, mActivePanel);
+		}
+	}
+
+	/**
+	 * Returns true if selected inventory items were changed since moved inventory items were started to watch.
+	 */
+	bool isSelectionChanged()
+	{
+		const LLInventoryPanel * const current_active_panel = LLInventoryPanel::getActiveInventoryPanel();
+
+		if (NULL == mActivePanel || current_active_panel != mActivePanel)
+		{
+			return true;
+		}
+
+		// get selected items (without destination folder)
+		selected_items_t selected_items;
+		mActivePanel->getRootFolder()->getSelectionList(selected_items);
+		selected_items.erase(mMoveIntoFolderID);
+
+		// compare stored & current sets of selected items
+		selected_items_t different_items;
+		std::set_symmetric_difference(mSelectedItems.begin(), mSelectedItems.end(),
+			selected_items.begin(), selected_items.end(), std::inserter(different_items, different_items.begin()));
+
+		LL_DEBUGS("Inventory_Move") << "Selected firstly: " << mSelectedItems.size()
+			<< ", now: " << selected_items.size() << ", difference: " << different_items.size() << LL_ENDL;
+
+		return different_items.size() > 0;
+	}
+
+	LLInventoryPanel *mActivePanel;
+	typedef std::set<LLUUID> selected_items_t;
+	selected_items_t mSelectedItems;
+
+	/**
+	 * UUID of FolderViewFolder into which watched items are moved.
+	 *
+	 * Destination FolderViewFolder becomes selected while mouse hovering (when dragged items are dropped).
+	 * 
+	 * If mouse is moved out it set unselected and number of selected items is changed 
+	 * even if selected items in Inventory stay the same.
+	 * So, it is used to update stored selection list.
+	 *
+	 * @see onAssetAdded()
+	 * @see isSelectionChanged()
+	 */
+	LLUUID mMoveIntoFolderID;
+};
+
+LLViewerInventoryMoveFromWorldObserver* gInventoryMoveObserver = NULL;
+
+void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid)
+{
+	start_new_inventory_observer();
+
+	gInventoryMoveObserver->setMoveIntoFolderID(into_folder_uuid);
+	gInventoryMoveObserver->watchAsset(inv_item->getAssetUUID());
+}
+
 //unlike the FetchObserver for AgentOffer, we only make one 
 //instance of the AddedObserver for TaskOffers
 //and it never dies.  We do this because we don't know the UUID of 
@@ -724,6 +871,33 @@ class LLOpenTaskOffer : public LLInventoryAddedObserver
 protected:
 	/*virtual*/ void done()
 	{
+		for (uuid_vec_t::iterator it = mAdded.begin(); it != mAdded.end();)
+		{
+			const LLUUID& item_uuid = *it;
+			bool was_moved = false;
+			LLInventoryObject* added_object = gInventory.getObject(item_uuid);
+			if (added_object)
+			{
+				// cast to item to get Asset UUID
+				LLInventoryItem* added_item = dynamic_cast<LLInventoryItem*>(added_object);
+				if (added_item)
+				{
+					const LLUUID& asset_uuid = added_item->getAssetUUID();
+					if (gInventoryMoveObserver->isAssetWatched(asset_uuid))
+					{
+						LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL;
+						was_moved = true;
+					}
+				}
+			}
+
+			if (was_moved)
+			{
+				it = mAdded.erase(it);
+			}
+			else ++it;
+		}
+
 		open_inventory_offer(mAdded, "");
 		mAdded.clear();
 	}
@@ -752,6 +926,13 @@ void start_new_inventory_observer()
 		gNewInventoryObserver = new LLOpenTaskOffer;
 		gInventory.addObserver(gNewInventoryObserver);
 	}
+
+	if (!gInventoryMoveObserver) //inventory move from the world observer 
+	{
+		// Observer is deleted by gInventory
+		gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver;
+		gInventory.addObserver(gInventoryMoveObserver);
+	}
 }
 
 class LLDiscardAgentOffer : public LLInventoryFetchComboObserver
@@ -916,9 +1097,12 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
 					}
 					else if("group_offer" == from_name)
 					{
-						// do not open inventory when we open group notice attachment because 
-						// we already opened landmark info panel
 						// "group_offer" is passed by LLOpenTaskGroupOffer
+						// Notification about added landmark will be generated under the "from_name.empty()" called from LLOpenTaskOffer::done().
+						LLSD args;
+						args["type"] = "landmark";
+						args["id"] = item_id;
+						LLSideTray::getInstance()->showPanel("panel_places", args);
 
 						continue;
 					}
@@ -929,28 +1113,6 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
 						args["LANDMARK_NAME"] = item->getName();
 						args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
 						LLNotificationsUtil::add("LandmarkCreated", args);
-						// Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed.
-						// If the panel is closed we don't reopen it until created landmark is loaded.
-						//TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here
-						LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->getPanel("panel_places"));
-						if (places_panel)
-						{
-							// Landmark creation handling is moved to LLPanelPlaces::showAddedLandmarkInfo()
-							// TODO* LLPanelPlaces dependency is going to be removed. See EXT-4347.
-							//if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem())
-							//{
-							//	places_panel->setItem(item);
-							//}
-							//else
-							// we are opening a group notice attachment
-							if("create_landmark" != places_panel->getPlaceInfoType())
-							{
-								LLSD args;
-								args["type"] = "landmark";
-								args["id"] = item_id;
-								LLSideTray::getInstance()->showPanel("panel_places", args);
-							}
-						}
 					}
 				}
 				break;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 4015cca77b..7c021dc05f 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -208,6 +208,8 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
 // Returns false if item is not found.
 bool highlight_offered_item(const LLUUID& item_id);
 
+void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid);
+
 struct LLOfferInfo
 {
         LLOfferInfo()
-- 
cgit v1.2.3


From 5c1563e2cbee162de52cee321edb8148016865ba Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Thu, 8 Apr 2010 11:46:40 +0300
Subject: (final part) EXT-6564(major) - Fix wearable editing panels Updated
 Parameter panel: - removed hard coded values - improved panel layout

Reviewed by Mike Antipov, Neal Orman - https://codereview.productengine.com/secondlife/r/157/

--HG--
branch : product-engine
---
 indra/newview/llscrollingpanelparam.cpp            | 30 ++++++-------
 indra/newview/llscrollingpanelparam.h              |  5 ---
 .../skins/default/xui/en/panel_scrolling_param.xml | 51 +++++++++++-----------
 3 files changed, 41 insertions(+), 45 deletions(-)

diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 7980fe1945..a5518d87d4 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -42,17 +42,14 @@
 #include "llbutton.h"
 #include "llsliderctrl.h"
 #include "llagent.h"
+#include "llviewborder.h"
 #include "llvoavatarself.h"
 
 // Constants for LLPanelVisualParam
 const F32 LLScrollingPanelParam::PARAM_STEP_TIME_THRESHOLD = 0.25f;
 
-const S32 LLScrollingPanelParam::BTN_BORDER = 2;
 const S32 LLScrollingPanelParam::PARAM_HINT_WIDTH = 128;
 const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128;
-const S32 LLScrollingPanelParam::PARAM_HINT_LABEL_HEIGHT = 16;
-const S32 LLScrollingPanelParam::PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH +  LLPANEL_BORDER_WIDTH);
-const S32 LLScrollingPanelParam::PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH; 
 
 // LLScrollingPanelParam
 //static
@@ -67,14 +64,17 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param
 {
 	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml");
 
+	// *HACK To avoid hard coding texture position, lets use border's position for texture. 
+	LLViewBorder* left_border = getChild<LLViewBorder>("left_border");
+
 	static LLUICachedControl<S32> slider_ctrl_height ("UISliderctrlHeight", 0);
-	S32 pos_x = 2 * LLPANEL_BORDER_WIDTH;
-	S32 pos_y = 3 * LLPANEL_BORDER_WIDTH + slider_ctrl_height;
+	S32 pos_x = left_border->getRect().mLeft + left_border->getBorderWidth();
+	S32 pos_y = left_border->getRect().mBottom + left_border->getBorderWidth();
 	F32 min_weight = param->getMinWeight();
 	F32 max_weight = param->getMaxWeight();
 
 	mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()),  min_weight);
-	pos_x += PARAM_HINT_WIDTH + 3 * BTN_BORDER;
+	pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth();
 	mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), max_weight );
 	
 	mHintMin->setAllowsUpdates( FALSE );
@@ -162,6 +162,10 @@ void LLScrollingPanelParam::draw()
 	childSetVisible("less", mHintMin->getVisible());
 	childSetVisible("more", mHintMax->getVisible());
 
+	// hide borders if texture has been loaded
+	childSetVisible("left_border", !mHintMin->getVisible());
+	childSetVisible("right_border", !mHintMax->getVisible());
+
 	// Draw all the children except for the labels
 	childSetVisible( "min param text", FALSE );
 	childSetVisible( "max param text", FALSE );
@@ -171,9 +175,7 @@ void LLScrollingPanelParam::draw()
 	gGL.pushUIMatrix();
 	{
 		const LLRect& r = mHintMin->getRect();
-		F32 left = (F32)(r.mLeft + BTN_BORDER);
-		F32 bot  = (F32)(r.mBottom + BTN_BORDER);
-		gGL.translateUI(left, bot, 0.f);
+		gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
 		mHintMin->draw();
 	}
 	gGL.popUIMatrix();
@@ -181,9 +183,7 @@ void LLScrollingPanelParam::draw()
 	gGL.pushUIMatrix();
 	{
 		const LLRect& r = mHintMax->getRect();
-		F32 left = (F32)(r.mLeft + BTN_BORDER);
-		F32 bot  = (F32)(r.mBottom + BTN_BORDER);
-		gGL.translateUI(left, bot, 0.f);
+		gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
 		mHintMax->draw();
 	}
 	gGL.popUIMatrix();
@@ -191,10 +191,10 @@ void LLScrollingPanelParam::draw()
 
 	// Draw labels on top of the buttons
 	childSetVisible( "min param text", TRUE );
-	drawChild(getChild<LLView>("min param text"), BTN_BORDER, BTN_BORDER);
+	drawChild(getChild<LLView>("min param text"));
 
 	childSetVisible( "max param text", TRUE );
-	drawChild(getChild<LLView>("max param text"), BTN_BORDER, BTN_BORDER);
+	drawChild(getChild<LLView>("max param text"));
 }
 
 // static
diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h
index 8c5db64816..fe4ce07166 100644
--- a/indra/newview/llscrollingpanelparam.h
+++ b/indra/newview/llscrollingpanelparam.h
@@ -75,13 +75,8 @@ public:
 	// Constants for LLPanelVisualParam
 	const static F32 PARAM_STEP_TIME_THRESHOLD;
 	
-	const static S32 BTN_BORDER;
 	const static S32 PARAM_HINT_WIDTH;
 	const static S32 PARAM_HINT_HEIGHT;
-	const static S32 PARAM_HINT_LABEL_HEIGHT;
-	const static S32 PARAM_PANEL_WIDTH;
-	const static S32 PARAM_PANEL_HEIGHT; 
-
 
 public:
 	LLViewerVisualParam* mParam;
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index f9c86fc75b..8042563900 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
- height="152"
+ height="157"
  layout="topleft"
  left="0"
  name="LLScrollingPanelParam"
@@ -10,25 +10,25 @@
      follows="left|top"
      height="16"
      layout="topleft"
-     left="4"
+     left="12"
      name="min param text"
-     top="116"
-     width="128" />
+     top="120"
+     width="120" />
     <text
      follows="left|top"
      height="16"
      layout="topleft"
-     left_pad="6"
+     left="155"
      name="max param text"
      top_delta="0"
-     width="128" />
+     width="120" />
     <text
      type="string"
      length="1"
      follows="left|top"
      height="16"
      layout="topleft"
-     left="8"
+     left="12"
      name="Loading..."
      top="11"
      width="128">
@@ -40,7 +40,7 @@
      follows="left|top"
      height="16"
      layout="topleft"
-     left_pad="6"
+     left="155"
      name="Loading...2"
      top_delta="0"
      width="128">
@@ -49,30 +49,30 @@
     <view_border 
      layout="topleft"
      follows="left|top"
-     left="2"
-     top="0"
+     left="7"
+     top="5"
      width="132"
      height="132"
      thickness="2"
-     shadow_light_color="LtGray_50"
-     highlight_light_color="LtGray_50"
-     highlight_dark_color="LtGray_50"
-     shadow_dark_color="LtGray_50"
+     shadow_light_color="0.3 0.3 0.3 1"
+     highlight_light_color="0.3 0.3 0.3 1"
+     highlight_dark_color="0.3 0.3 0.3 1"
+     shadow_dark_color="0.3 0.3 0.3 1"
      bevel_style="in"
      name="left_border"
     />
     <view_border 
      layout="topleft"
      follows="left|top"
-     left_pad="2"
+     left_pad="10"
      top_delta="0"
      width="132"
      height="132"
      thickness="2"
-     shadow_light_color="LtGray_50"
-     highlight_light_color="LtGray_50"
-     highlight_dark_color="LtGray_50"
-     shadow_dark_color="LtGray_50"
+     shadow_light_color="0.3 0.3 0.3 1"
+     highlight_light_color="0.3 0.3 0.3 1"
+     highlight_dark_color="0.3 0.3 0.3 1"
+     shadow_dark_color="0.3 0.3 0.3 1"
      bevel_style="in"
      name="right_border"
     />
@@ -84,10 +84,10 @@
      image_selected="PushButton_Selected"
      image_unselected="PushButton_Off"
      layout="topleft"
-     left="2"
+     left="7"
      name="less"
      tab_stop="false"
-     top="0"
+     top="5"
      width="132" />
     <button
      enabled="false"
@@ -97,7 +97,7 @@
      image_selected="PushButton_Selected"
      image_unselected="PushButton_Off"
      layout="topleft"
-     left_pad="2"
+     left_pad="10"
      name="more"
      tab_stop="false"
      top_delta="0"
@@ -111,10 +111,11 @@
      initial_value="0"
      label="[DESC]"
      label_width="100"
-     layout="topleft"
+     layout="bottom|left"
      left="6"
      max_val="100"
      name="param slider"
-     top="134"
-     width="258" />
+     bottom="1"
+     width="274" 
+     slider_label.font.style="BOLD" />
 </panel>
-- 
cgit v1.2.3


From ea45bc05d4a464507c37efaec1da93aba068cd90 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Thu, 8 Apr 2010 12:23:22 +0300
Subject: EXT-6733(normal) - Long title of voice popup notification is
 displayed out of window. Fixed code calculating title buttons rectangle,
 LLRect::isValid() does not indicate uninitialized rectangle, as a result
 rectangle was not properly initialized and had negative width. Fixed title
 width.

Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/194/

--HG--
branch : product-engine
---
 indra/llui/lldraghandle.cpp | 2 +-
 indra/llui/llfloater.cpp    | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 9d4e2fa495..9f83fcca35 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -249,7 +249,7 @@ void LLDragHandleTop::reshapeTitleBox()
 	}
 	const LLFontGL* font = LLFontGL::getFontSansSerif();
 	S32 title_width = getRect().getWidth();
-	title_width -= 2 * LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth();
+	title_width -= LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth();
 	S32 title_height = llround(font->getLineHeight());
 	LLRect title_rect;
 	title_rect.setLeftTopAndSize( 
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e672252a50..5fce1949a6 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1786,13 +1786,16 @@ void LLFloater::updateTitleButtons()
 					llround((F32)floater_close_box_size * mButtonScale));
 			}
 
-			if(!buttons_rect.isValid())
+			// first time here, init 'buttons_rect'
+			if(1 == button_count)
 			{
 				buttons_rect = btn_rect;
 			}
 			else
 			{
-				mDragOnLeft ? buttons_rect.mRight + btn_rect.mRight : 
+				// if mDragOnLeft=true then buttons are on top-left side vertically aligned
+				// title is not displayed in this case, calculating 'buttons_rect' for future use
+				mDragOnLeft ? buttons_rect.mBottom -= btn_rect.mBottom : 
 					buttons_rect.mLeft = btn_rect.mLeft;
 			}
 			mButtons[i]->setRect(btn_rect);
-- 
cgit v1.2.3


From dee74f53dcd65922ffe6528a305b6c00e77976bf Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Thu, 8 Apr 2010 15:06:42 +0300
Subject: Fixed normal bug EXT-6598 (Gesture pop-up menu too tall (fills height
 of screen))

- Limited height of gestures popup to 17 lines - 15 for gestures, 1 for label and 1 for separator. Used xml attribute "page_lines" to do it.

Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/199/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/panel_bottomtray.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index c34a367c32..c6ca814f58 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -127,6 +127,8 @@
              <gesture_combo_list.combo_button
               pad_right="10"
               use_ellipses="true" />
+             <gesture_combo_list.combo_list
+              page_lines="17" />
          </gesture_combo_list>
         </layout_panel>
 		 <icon
-- 
cgit v1.2.3


From 978d62e9e75d52a3443db36fd02062c3dbf4040a Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Thu, 8 Apr 2010 18:56:02 +0300
Subject: Fixed normal bug EXT-6751 (Wrong "You paid" text in notification when
 creating a classified).

- Bug was caused by absence of localizable string for "You paid..." notifications without name and reason simultaneously.
Added such string("you_paid_ldollars_no_info") to strings.xml and used it in code.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/206/

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp              | 7 ++++---
 indra/newview/skins/default/xui/en/strings.xml | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 2b41a83ba5..ef3ee32f11 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4714,11 +4714,12 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
 				if(boost::regex_match(desc, matches, expr))
 				{
 					// Name of full localizable notification string
-					// there are three types of this string- with name of receiver and reason of payment,
-					// without name and without reason (but not simultaneously)
+					// there are four types of this string- with name of receiver and reason of payment,
+					// without name and without reason (both may also be absent simultaneously).
 					// example of string without name - You paid L$100 to create a group.
 					// example of string without reason - You paid Smdby Linden L$100.
 					// example of string with reason and name - You paid Smbdy Linden L$100 for a land access pass.
+					// example of string with no info - You paid L$50.
 					std::string line = "you_paid_ldollars_no_name";
 
 					// arguments of string which will be in notification
@@ -4739,7 +4740,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
 					std::string reason = std::string(matches[3]);
 					if (reason.empty())
 					{
-						line = "you_paid_ldollars_no_reason";
+						line = name.empty() ? "you_paid_ldollars_no_info" : "you_paid_ldollars_no_reason";
 					}
 					else
 					{
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0c73b8d769..27d11ead7e 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3056,6 +3056,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
   <!-- Financial operations strings -->
   <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT]</string>
   <string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string>
+  <string name="you_paid_ldollars_no_info">You paid L$[AMOUNT].</string>
   <string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string>
   <string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string>
   <string name="for a parcel of land">for a parcel of land</string>
-- 
cgit v1.2.3


From 6d6b565cd72f076f7d1be1dcff4e737c8f66d006 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 9 Apr 2010 10:56:11 +0300
Subject: =?UTF-8?q?Fixed=20normal=20bug=20EXT-6730=20([TRUNCATION]=20Prefe?=
 =?UTF-8?q?rencias=20>=20Configurar=20>=20Otros=20dispositivos=20>=20CONFI?=
 =?UTF-8?q?GURACI=C3=93N=20DEL=20JOYSTICK.=20\"Zona=20muerta=20izq./de\")?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- Fixed truncation problem in EN locale. Increased textbox size.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/200/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/floater_joystick.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 4d67e4c343..b8156a174d 100644
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -819,7 +819,7 @@
      layout="topleft"
      left="20"
      name="ZoomDeadZone"
-     width="94">
+     width="96">
         Zoom Dead Zone
     </text>
     <spinner
-- 
cgit v1.2.3


From 6d78a90636ecd0d6bf8266c3020cc31d7f233052 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 9 Apr 2010 10:58:39 +0300
Subject: Fixed normal bug EXT-6596 (Icons not vertically centered on navbar
 buttons)

- Moved the Home button icon up 1 pxl

Reviwed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/202/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index a314cedc21..7ec1ca2e2e 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -66,6 +66,7 @@
 	    <button
 	     follows="left|top"
 	     height="23"
+	     image_bottom_pad="1"
 	     image_overlay="Home_Off"
 	     layout="topleft"
 	     left_pad="7"
-- 
cgit v1.2.3


From 5c797555b3293f0fac20ae5ba27a2bfd6c732215 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 9 Apr 2010 11:50:32 +0300
Subject: Fixed normal bug EXT-6747 ('Favorites bar' folder became blank after
 part of landmarks were deleted by DnD on Trash button)

Reason: LLFolderView::removeSelectedItems() was used to delete dropped items in Places Landmarks Panel. This led to calling this method N times where N is count of selected items. Due to removeSelectedItems() select one of non-removed items each time after removing of selected ones (2*N - 1) items were really deleted.

Fix: updated removing in Landmarks panel to remove dropped items one by one.

Reviewed by Richard at https://codereview.productengine.com/secondlife/r/204/

--HG--
branch : product-engine
---
 indra/newview/llpanellandmarks.cpp | 19 +++++++++++++++++--
 indra/newview/llpanellandmarks.h   |  2 +-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index a1cdbdad59..67d40a39b1 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -675,6 +675,7 @@ void LLLandmarksPanel::initListCommandsHandlers()
 	trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this
 			,	_4 // BOOL drop
 			,	_5 // EDragAndDropType cargo_type
+			,	_6 // void* cargo_data
 			,	_7 // EAcceptance* accept
 			));
 
@@ -1109,7 +1110,7 @@ void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* own
 	pick_panel = NULL;
 }
 
-bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
+bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept)
 {
 	*accept = ACCEPT_NO;
 
@@ -1125,7 +1126,21 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg
 
 			if (is_enabled && drop)
 			{
-				onClipboardAction("delete");
+				// don't call onClipboardAction("delete")
+				// this lead to removing (N * 2 - 1) items if drag N>1 items into trash. EXT-6757
+				// So, let remove items one by one.
+				LLInventoryItem* item = static_cast<LLInventoryItem*>(cargo_data);
+				if (item)
+				{
+					LLFolderViewItem* fv_item = (mCurrentSelectedList && mCurrentSelectedList->getRootFolder()) ?
+						mCurrentSelectedList->getRootFolder()->getItemByID(item->getUUID()) : NULL;
+
+					if (fv_item)
+					{
+						// is Item Removable checked inside of remove()
+						fv_item->remove();
+					}
+				}
 			}
 		}
 		break;
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index da5d683cfc..2d1eb0f091 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -142,7 +142,7 @@ private:
 	/**
 	 * Processes drag-n-drop of the Landmarks and folders into trash button.
 	 */
-	bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+	bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept);
 
 	/**
 	 * Landmark actions callbacks. Fire when a landmark is loaded from the list.
-- 
cgit v1.2.3


From 9eb4caf0a11116f131f25aa40d92d0ab959cbcbf Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 9 Apr 2010 11:55:25 +0300
Subject: Fixed normal bug EXT-6746 (Duplicated landmarks appear in 'Favorites
 bar' folder if DnD them from 'My Landmarks' folder)

Reason: LLFolderView::handleDragAndDrop got called twice from LLInventoryPanel::handleDragAndDrop when drag into empty Inventory folder view.
Fix: check if drag and drop is already handled before passing the event directly to LLFolderView.

Reviewed by Richard at https://codereview.productengine.com/secondlife/r/201/

--HG--
branch : product-engine
---
 indra/newview/llinventorypanel.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index c6c2d23a4b..92f795462b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -669,7 +669,8 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 
 	// If folder view is empty the (x, y) point won't be in its rect
 	// so the handler must be called explicitly.
-	if (!mFolderRoot->hasVisibleChildren())
+	// but only if was not handled before. See EXT-6746.
+	if (!handled && !mFolderRoot->hasVisibleChildren())
 	{
 		handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
 	}
-- 
cgit v1.2.3


From 9d93441b3117c59652fbb81abea2983f3cbca203 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Fri, 9 Apr 2010 12:30:33 +0300
Subject: done EXT-6687 Implement Save button functionality (Edit Outfit panel)

Implemented "Save", "Save as new" functionality. If the base outfit doesn't exist "Save as new" functionality is employed

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/179

--HG--
branch : product-engine
---
 indra/newview/llappearancemgr.cpp                  | 31 +++++++++++++++++
 indra/newview/llappearancemgr.h                    |  7 ++++
 indra/newview/llpaneloutfitedit.cpp                | 39 ++++++++++++++++++++++
 indra/newview/llpaneloutfitedit.h                  |  4 +++
 indra/newview/llpaneloutfitsinventory.cpp          | 15 +++++++--
 indra/newview/llpaneloutfitsinventory.h            |  2 ++
 indra/newview/llsidepanelappearance.cpp            | 34 ++++++++++++++-----
 indra/newview/llsidepanelappearance.h              |  6 +++-
 .../skins/default/xui/en/menu_save_outfit.xml      | 22 ++++++++++++
 .../skins/default/xui/en/panel_outfit_edit.xml     | 13 ++++++++
 10 files changed, 162 insertions(+), 11 deletions(-)
 create mode 100644 indra/newview/skins/default/xui/en/menu_save_outfit.xml

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index e0f1d5348d..40c1f89f3f 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -593,6 +593,23 @@ bool LLAppearanceMgr::getBaseOutfitName(std::string& name)
 	return false;
 }
 
+const LLUUID LLAppearanceMgr::getBaseOutfitUUID()
+{
+	const LLViewerInventoryItem* outfit_link = getBaseOutfitLink();
+	if (!outfit_link || !outfit_link->getIsLinkType()) return LLUUID::null;
+
+	const LLViewerInventoryCategory* outfit_cat = outfit_link->getLinkedCategory();
+	if (!outfit_cat) return LLUUID::null;
+
+	if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT)
+	{
+		llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl;
+		return LLUUID::null;
+	}
+
+	return outfit_cat->getUUID();
+}
+
 // Update appearance from outfit folder.
 void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool append)
 {
@@ -1516,6 +1533,20 @@ void LLAppearanceMgr::onFirstFullyVisible()
 	autopopulateOutfits();
 }
 
+bool LLAppearanceMgr::updateBaseOutfit()
+{
+	const LLUUID base_outfit_id = getBaseOutfitUUID();
+	if (base_outfit_id.isNull()) return false;
+
+	// in a Base Outfit we do not remove items, only links
+	purgeCategory(base_outfit_id, false);
+
+	//COF contains only links so we copy to the Base Outfit only links
+	shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL);
+
+	return true;
+}
+
 //#define DUMP_CAT_VERBOSE
 
 void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 423d9bde69..c7a8bc3720 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -75,6 +75,9 @@ public:
 	const LLViewerInventoryItem *getBaseOutfitLink();
 	bool getBaseOutfitName(std::string &name);
 
+	// find the UUID of the currently worn outfit (Base Outfit)
+	const LLUUID getBaseOutfitUUID();
+
 	// Update the displayed outfit name in UI.
 	void updatePanelOutfitName(const std::string& name);
 
@@ -123,6 +126,10 @@ public:
 	// Create initial outfits from library.
 	void autopopulateOutfits();
 	
+	// Overrides the base outfit with the content from COF
+	// @return false if there is no base outfit
+	bool updateBaseOutfit();
+
 protected:
 	LLAppearanceMgr();
 	~LLAppearanceMgr();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index b956004129..850a766ff4 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -45,6 +45,7 @@
 #include "llfloaterreg.h"
 #include "llinventoryfunctions.h"
 #include "llinventorypanel.h"
+#include "llviewermenu.h"
 #include "llviewerwindow.h"
 #include "llviewerinventory.h"
 #include "llbutton.h"
@@ -54,12 +55,14 @@
 #include "llinventorybridge.h"
 #include "llinventorymodel.h"
 #include "llinventorymodelbackgroundfetch.h"
+#include "llpaneloutfitsinventory.h"
 #include "lluiconstants.h"
 #include "llscrolllistctrl.h"
 #include "lltextbox.h"
 #include "lluictrlfactory.h"
 #include "llsdutil.h"
 #include "llsidepanelappearance.h"
+#include "lltoggleablemenu.h"
 #include "llwearablelist.h"
 
 static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");
@@ -228,6 +231,15 @@ BOOL LLPanelOutfitEdit::postBuild()
 
 	childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
 	
+	childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
+	childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
+	childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));
+
+	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
+	save_registar.add("Outfit.Save.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
+	save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
+	mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
 	return TRUE;
 }
 
@@ -236,6 +248,31 @@ void LLPanelOutfitEdit::showAddWearablesPanel()
 	childSetVisible("add_wearables_panel", childGetValue("add_btn"));
 }
 
+void LLPanelOutfitEdit::saveOutfit(bool as_new)
+{
+	if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
+	{
+		// we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
+		// If updateBaseOutfit fails, ask for an outfit name anyways
+		return;
+	}
+
+	LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
+	if (panel_outfits_inventory)
+	{
+		panel_outfits_inventory->onSave();
+	}
+}
+
+void LLPanelOutfitEdit::showSaveMenu()
+{
+	S32 x, y;
+	LLUI::getMousePositionLocal(this, &x, &y);
+
+	mSaveMenu->updateParent(LLMenuGL::sMenuContainer);
+	LLMenuGL::showPopup(this, mSaveMenu, x, y);
+}
+
 void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl)
 {
 	LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl);
@@ -301,6 +338,8 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
 void LLPanelOutfitEdit::onAddToLookClicked(void)
 {
 	LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();
+	if (!curr_item) return;
+
 	LLFolderViewEventListener* listenerp  = curr_item->getListener();
 	link_inventory_item(gAgent.getID(), listenerp->getUUID(), mCurrentOutfitID, listenerp->getName(),
 						LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index ba382d7320..d09795156e 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -52,6 +52,7 @@ class LLInventoryPanel;
 class LLSaveFolderState;
 class LLFolderViewItem;
 class LLScrollListCtrl;
+class LLToggleableMenu;
 class LLLookFetchObserver;
 class LLFilterEditor;
 
@@ -86,6 +87,8 @@ public:
 		// only update the location if there is none already available.
 
 	void showAddWearablesPanel();
+	void saveOutfit(bool as_new = false);
+	void showSaveMenu();
 
 	void onTypeFilterChanged(LLUICtrl* ctrl);
 	void onSearchEdit(const std::string& string);
@@ -117,6 +120,7 @@ private:
 	LLButton*			mRemoveFromLookBtn;
 	LLButton*			mUpBtn;
 	LLButton*			mEditWearableBtn;
+	LLToggleableMenu*	mSaveMenu;
 	
 	LLLookFetchObserver*		mFetchLook;
 	LLInventoryLookObserver*	mLookObserver;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 7d8b1dea0e..b78268da7b 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -217,8 +217,13 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD&
 		if( !outfit_name.empty() )
 		{
 			LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name);
-			LLSD key;
-			LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+
+			LLSidepanelAppearance* panel_appearance =
+				dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+			if (panel_appearance)
+			{
+				panel_appearance->showOutfitsInventoryPanel();
+			}
 
 			if (mAppearanceTabs)
 			{
@@ -309,6 +314,12 @@ LLFolderView *LLPanelOutfitsInventory::getRootFolder()
 	return mActivePanel->getRootFolder();
 }
 
+//static
+LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance()
+{
+	return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
+}
+
 //////////////////////////////////////////////////////////////////////////////////
 // List Commands                                                                //
 
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 41afc2f372..5d0d27ee4f 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -73,6 +73,8 @@ public:
 
 	LLFolderView* getRootFolder();
 
+	static LLPanelOutfitsInventory* findInstance();
+
 protected:
 	void updateVerbs();
 	bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index d90f36fc89..7561388990 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -135,7 +135,7 @@ BOOL LLSidepanelAppearance::postBuild()
 		LLButton* back_btn = mOutfitEdit->getChild<LLButton>("back_btn");
 		if (back_btn)
 		{
-			back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onBackButtonClicked, this));
+			back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::showOutfitsInventoryPanel, this));
 		}
 
 	}
@@ -176,7 +176,7 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
 
 	if(key.size() == 0)
 		return;
-
+	
 	toggleOutfitEditPanel(TRUE);
 	updateVerbs();
 	
@@ -258,12 +258,6 @@ void LLSidepanelAppearance::onNewOutfitButtonClicked()
 	}
 }
 
-
-void LLSidepanelAppearance::onBackButtonClicked()
-{
-	toggleOutfitEditPanel(FALSE);
-}
-
 void LLSidepanelAppearance::onEditWearBackClicked()
 {
 	mEditWearable->saveChanges();
@@ -271,6 +265,30 @@ void LLSidepanelAppearance::onEditWearBackClicked()
 	toggleOutfitEditPanel(TRUE);
 }
 
+void LLSidepanelAppearance::showOutfitsInventoryPanel()
+{
+	mOutfitEdit->setVisible(FALSE);
+
+	mPanelOutfitsInventory->setVisible(TRUE);
+
+	mFilterEditor->setVisible(TRUE);
+	mEditBtn->setVisible(TRUE);
+	mNewOutfitBtn->setVisible(TRUE);
+	mCurrOutfitPanel->setVisible(TRUE);
+}
+
+void LLSidepanelAppearance::showOutfitEditPanel()
+{
+	mOutfitEdit->setVisible(TRUE);
+	
+	mPanelOutfitsInventory->setVisible(FALSE);
+
+	mFilterEditor->setVisible(FALSE);
+	mEditBtn->setVisible(FALSE);
+	mNewOutfitBtn->setVisible(FALSE);
+	mCurrOutfitPanel->setVisible(FALSE);
+}
+
 void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible)
 {
 	if (!mOutfitEdit)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 1d78e92a84..0a609797fb 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -63,14 +63,18 @@ public:
 	void updateVerbs();
 	void onNewOutfitButtonClicked();
 
+	void showOutfitsInventoryPanel();
+	void showOutfitEditPanel();
+
 private:
 	void onFilterEdit(const std::string& search_string);
 
 	void onOpenOutfitButtonClicked();
 	void onEditAppearanceButtonClicked();
 	void onEditButtonClicked();
-	void onBackButtonClicked();
 	void onEditWearBackClicked();
+
+	//@deprecated use showXXX() methods instead
 	void toggleOutfitEditPanel(BOOL visible);
 	void toggleWearableEditPanel(BOOL visible, LLWearable* wearable);
 
diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
new file mode 100644
index 0000000000..a8778df7f6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ height="201"
+ layout="topleft"
+ mouse_opaque="false"
+ name="save_outfit_menu"
+ width="120">
+    <menu_item_call 
+     name="save_outfit" 
+     label="Save">
+        <menu_item_call.on_click 
+         function="Outfit.Save.Action"
+         userdata=""/>
+        </menu_item_call>
+    <menu_item_call 
+     name="save_as_new_outfit" 
+     label="Save As New">
+        <menu_item_call.on_click 
+         function="Outfit.SaveAsNew.Action"
+         userdata="" />
+    </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index c1800384a3..3fa3d6d039 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -337,6 +337,19 @@
          layout="topleft"
          name="save_btn"
          width="145" />
+        <button
+         follows="bottom|right"
+         height="23"
+         name="save_flyout_btn"
+         label=""
+         left_pad="-20"
+         tab_stop="false"
+         image_selected="SegmentedBtn_Right_Selected_Press"
+         image_unselected="SegmentedBtn_Right_Off"
+         image_pressed="SegmentedBtn_Right_Press"
+         image_pressed_selected="SegmentedBtn_Right_Selected_Press"
+         image_overlay="Arrow_Small_Up"
+         width="20"/>
         <button
          follows="bottom|left|right"
          height="23"
-- 
cgit v1.2.3


From 43c85b0dfb4e7e7c9fdfc02954bbb0115ec344c4 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Fri, 9 Apr 2010 15:07:42 +0300
Subject: done EXT-6716 Implement Add button functionality for adding a
 wearable to Current Outfit (Edit Outfit panel)

Added temporary PLUS button on the button bar under the top list of Edit Outfit panel

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/203/

--HG--
branch : product-engine
---
 indra/newview/llappearancemgr.cpp                  | 32 +++++++++++++++
 indra/newview/llappearancemgr.h                    |  3 ++
 indra/newview/llpaneloutfitedit.cpp                | 47 +++++++++++++++-------
 indra/newview/llpaneloutfitedit.h                  |  4 +-
 .../skins/default/xui/en/panel_outfit_edit.xml     | 15 ++++++-
 5 files changed, 84 insertions(+), 17 deletions(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 40c1f89f3f..0bd95987d7 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -610,6 +610,38 @@ const LLUUID LLAppearanceMgr::getBaseOutfitUUID()
 	return outfit_cat->getUUID();
 }
 
+bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_update)
+{
+	if (item_id_to_wear.isNull()) return false;
+
+	//only the item from a user's inventory is allowed
+	if (!gInventory.isObjectDescendentOf(item_id_to_wear, gInventory.getRootFolderID())) return false;
+
+	LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear);
+	if (!item_to_wear) return false;
+
+	switch (item_to_wear->getType())
+	{
+	case LLAssetType::AT_CLOTHING:
+	case LLAssetType::AT_BODYPART:
+		// Don't wear anything until initial wearables are loaded, can
+		// destroy clothing items.
+		if (!gAgentWearables.areWearablesLoaded())
+		{
+			LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
+			return false;
+		}
+		addCOFItemLink(item_to_wear, do_update);
+		break;
+	case LLAssetType::AT_OBJECT:
+		rez_attachment(item_to_wear, NULL);
+		break;
+	default: return false;;
+	}
+
+	return true;
+}
+
 // Update appearance from outfit folder.
 void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool append)
 {
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index f0374048c6..befad591bd 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -78,6 +78,9 @@ public:
 	// find the UUID of the currently worn outfit (Base Outfit)
 	const LLUUID getBaseOutfitUUID();
 
+	// Wear/attach an item (from a user's inventory) on the agent
+	bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true);
+
 	// Update the displayed outfit name in UI.
 	void updatePanelOutfitName(const std::string& name);
 
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 70879cedf5..2e94eabb3f 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -117,7 +117,7 @@ private:
 
 LLPanelOutfitEdit::LLPanelOutfitEdit()
 :	LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL),
-mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToLookBtn(NULL),
+mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL),
 mRemoveFromLookBtn(NULL), mLookObserver(NULL)
 {
 	mSavedFolderState = new LLSaveFolderState();
@@ -175,8 +175,8 @@ BOOL LLPanelOutfitEdit::postBuild()
 	mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");
 	mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
 	mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-	// mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
-	// mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
+	mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
+	mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
 	
 	LLComboBox* type_filter = getChild<LLComboBox>("inventory_filter");
 	type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1));
@@ -200,7 +200,8 @@ BOOL LLPanelOutfitEdit::postBuild()
 	mAddToLookBtn->setEnabled(FALSE);
 	mAddToLookBtn->setVisible(FALSE); */
 	
-	childSetAction("add_item_btn", boost::bind(&LLPanelOutfitEdit::onAddToLookClicked, this), this);
+	childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));
+	childSetEnabled("add_to_outfit_btn", false);
 
 	mUpBtn = getChild<LLButton>("up_btn");
 	mUpBtn->setEnabled(TRUE);
@@ -250,12 +251,12 @@ void LLPanelOutfitEdit::showAddWearablesPanel()
 
 void LLPanelOutfitEdit::saveOutfit(bool as_new)
 {
-	if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
-	{
-		// we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
-		// If updateBaseOutfit fails, ask for an outfit name anyways
-		return;
-	}
+	if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
+	{
+		// we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
+		// If updateBaseOutfit fails, ask for an outfit name anyways
+		return;
+	}
 
 	LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
 	if (panel_outfits_inventory)
@@ -335,15 +336,18 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
 	mInventoryItemsPanel->setFilterSubString(mSearchString);
 }
 
-void LLPanelOutfitEdit::onAddToLookClicked(void)
+void LLPanelOutfitEdit::onAddToOutfitClicked(void)
 {
 	LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();
 	if (!curr_item) return;
 
 	LLFolderViewEventListener* listenerp  = curr_item->getListener();
-	link_inventory_item(gAgent.getID(), listenerp->getUUID(), mCurrentOutfitID, listenerp->getName(),
-						LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
-	updateLookInfo();
+	if (!listenerp) return;
+
+	if (LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID()))
+	{
+		updateLookInfo();
+	}
 }
 
 
@@ -444,6 +448,21 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
 	{
 		return;
 	}
+
+	LLViewerInventoryItem* item = current_item->getInventoryItem();
+	if (!item) return;
+
+	switch (item->getType())
+	{
+	case LLAssetType::AT_CLOTHING:
+	case LLAssetType::AT_BODYPART:
+	case LLAssetType::AT_OBJECT:
+		childSetEnabled("add_to_outfit_btn", true);
+		break;
+	default:
+		childSetEnabled("add_to_outfit_btn", false);
+		break;
+	}
 	
 	/* Removing add to look inline button (not part of mvp for viewer 2)
 	LLRect btn_rect(current_item->getLocalRect().mRight - 50,
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index d09795156e..1a8d7d2bef 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -93,7 +93,7 @@ public:
 	void onTypeFilterChanged(LLUICtrl* ctrl);
 	void onSearchEdit(const std::string& string);
 	void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
-	void onAddToLookClicked(void);
+	void onAddToOutfitClicked(void);
 	void onLookItemSelectionChange(void);
 	void onRemoveFromLookClicked(void);
 	void onEditWearableClicked(void);
@@ -116,7 +116,7 @@ private:
 	LLFilterEditor*		mSearchFilter;
 	LLSaveFolderState*	mSavedFolderState;
 	std::string			mSearchString;
-	LLButton*			mAddToLookBtn;
+	LLButton*			mAddToOutfitBtn;
 	LLButton*			mRemoveFromLookBtn;
 	LLButton*			mUpBtn;
 	LLButton*			mEditWearableBtn;
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 3fa3d6d039..a5e6506463 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -257,7 +257,7 @@
              text_pad_left="25" />
 
             <inventory_panel
-             allow_multi_select="true"
+             allow_multi_select="false"
              border="false"
              follows="left|top|right|bottom"
              height="176"
@@ -317,6 +317,19 @@
                  name="list_view_btn"
                  top="1"
                  width="31" />
+                <button
+                 follows="bottom|left"
+                 height="25"
+                 image_hover_unselected="Toolbar_Middle_Over"
+                 image_overlay="AddItem_Off"
+                 image_selected="Toolbar_Middle_Selected"
+                 image_unselected="Toolbar_Middle_Off"
+                 label=""
+                 layout="topleft"
+                 left_pad="1"
+                 name="add_to_outfit_btn"
+                 top="1"
+                 width="31" />
             </panel>
         </layout_panel>
     </layout_stack>
-- 
cgit v1.2.3


From a45eefaf26ad24fdc9f2fa4f55be1a10c8e0a09f Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 9 Apr 2010 15:11:58 +0300
Subject: Replace gVoiceClient with LLVoiceClient::getInstance() due to
 gVoiceClient is being removed soon.

Trivial changes, not reviewed.

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp     | 6 +++---
 indra/newview/llparticipantlist.cpp | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index bed5c01d7a..1c6857b75c 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -189,7 +189,7 @@ void LLCallFloater::draw()
 	// Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent)
 //	onChange();
 
-	bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID);
+	bool is_moderator_muted = LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID);
 
 	if (mIsModeratorMutedVoice != is_moderator_muted)
 	{
@@ -470,7 +470,7 @@ void LLCallFloater::updateAgentModeratorState()
 static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids)
 {
 	// Get a list of participants from VoiceClient
-	LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList();
+	LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList();
 	if (voice_map)
 	{
 		for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin();
@@ -725,7 +725,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel)
 void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
 {
 	// check is voice operational and if it doesn't work hide VCP (EXT-4397)
-	if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking())
+	if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking())
 	{
 		updateState(new_state);
 	}
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index eb245453db..dbb8e962bd 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -632,7 +632,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
 	else if (item == "can_call")
 	{
 		bool not_agent = mUUIDs.front() != gAgentID;
-		bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking();
+		bool can_call = not_agent && LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking();
 		return can_call;
 	}
 
-- 
cgit v1.2.3


From cf31494b5053283b4d445b0c564b5e7d57af2a18 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Fri, 9 Apr 2010 15:19:11 +0300
Subject: done EXT-6688 Implement Revert button funtionality (Edit Outfit
 panel)

On revert the base outfit is worn

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/205/

--HG--
branch : product-engine
---
 indra/newview/llappearancemgr.cpp   | 8 ++++++++
 indra/newview/llappearancemgr.h     | 2 ++
 indra/newview/llpaneloutfitedit.cpp | 2 ++
 3 files changed, 12 insertions(+)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0bd95987d7..4a30ba3066 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1579,6 +1579,14 @@ bool LLAppearanceMgr::updateBaseOutfit()
 	return true;
 }
 
+void LLAppearanceMgr::wearBaseOutfit()
+{
+	const LLUUID& base_outfit_id = getBaseOutfitUUID();
+	if (base_outfit_id.isNull()) return;
+	
+	updateCOF(base_outfit_id);
+}
+
 //#define DUMP_CAT_VERBOSE
 
 void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index befad591bd..d67a7787d3 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -129,6 +129,8 @@ public:
 	// Create initial outfits from library.
 	void autopopulateOutfits();
 	
+	void wearBaseOutfit();
+
 	// Overrides the base outfit with the content from COF
 	// @return false if there is no base outfit
 	bool updateBaseOutfit();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 2e94eabb3f..d1e6d7de42 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -232,6 +232,8 @@ BOOL LLPanelOutfitEdit::postBuild()
 
 	childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
 	
+	childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
+
 	childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
 	childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
 	childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));
-- 
cgit v1.2.3


From a782eaf36e5cd4edc74ade855db8582213ae7c0f Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Fri, 9 Apr 2010 17:34:01 +0300
Subject: Fixed normal bug EXT-4766 - System notifications in nearby chat has
 default avatar icon and behave like sent from object Updated nearby toast to
 display system icon for system message.

Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/208/

--HG--
branch : product-engine
---
 indra/newview/llchatitemscontainerctrl.cpp | 2 ++
 indra/newview/llviewermessage.cpp          | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 81edb55f93..aef36b677c 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -324,6 +324,8 @@ void LLNearbyChatToastPanel::draw()
 			icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
 			if(mSourceType == CHAT_SOURCE_AGENT)
 				icon->setValue(mFromID);
+			else if(mSourceType == CHAT_SOURCE_SYSTEM)
+				icon->setValue(LLSD("SL_Logo"));
 			else
 				icon->setValue(LLSD("OBJECT_Icon"));
 		}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ef3ee32f11..d8a3932a22 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2392,10 +2392,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 				chat.mFromID = from_id ^ gAgent.getSessionID();
 			}
 
+			chat.mSourceType = CHAT_SOURCE_OBJECT;
+
 			if(SYSTEM_FROM == name)
 			{
 				// System's UUID is NULL (fixes EXT-4766)
 				chat.mFromID = LLUUID::null;
+				chat.mSourceType = CHAT_SOURCE_SYSTEM;
 			}
 
 			LLSD query_string;
@@ -2412,7 +2415,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 
 			chat.mURL = link.str();
 			chat.mText = message;
-			chat.mSourceType = CHAT_SOURCE_OBJECT;
 
 			// Note: lie to Nearby Chat, pretending that this is NOT an IM, because
 			// IMs from obejcts don't open IM sessions.
-- 
cgit v1.2.3


From cf9af33a1ab7062325bc45feff0335c525e44499 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Fri, 9 Apr 2010 18:29:32 +0300
Subject: Fixed normal bug  EXT-6319 (Rejected voice call says "user Joined the
 voice call").

- Removed names from strings containing info about other user joining or ending the call to make them more general. See comment to JIRA ticket for more info.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/210/

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp                                   | 3 +--
 indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 2 +-
 indra/newview/skins/default/xui/en/strings.xml               | 1 +
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index e0f155a6a9..92b994ad67 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -297,7 +297,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
 				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
 				break;
 			case LLVoiceChannel::STATE_CONNECTED :
-				message = other_avatar_name + " " + joined_call;
+				message = LLTrans::getString("answered_call");
 				LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
 			default:
 				break;
@@ -1713,7 +1713,6 @@ void LLOutgoingCallDialog::show(const LLSD& key)
 			channel_name = LLTextUtil::formatPhoneNumber(channel_name);
 		}
 		childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name);
-		childSetTextArg("nearby_P2P_by_other", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString());
 
 		// skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice,
 		// so no reconnection to nearby chat happens (EXT-4397)
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 2bafd1bdef..5ea207675b 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -100,7 +100,7 @@ No Answer.  Please try again later.
    top="27"
    width="315"
    word_wrap="true">
-    [VOICE_CHANNEL_NAME] has ended the call.  [RECONNECT_NEARBY]
+    Your call has ended.  [RECONNECT_NEARBY]
   </text>
   <text
    font="SansSerifLarge"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 27d11ead7e..b0bf51c214 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2940,6 +2940,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
 	<string name="IM_moderator_label">(Moderator)</string>
 
 	<!-- voice calls -->
+	<string name="answered_call">Your call has been answered</string>
 	<string name="started_call">Started a voice call</string>
 	<string name="joined_call">Joined the voice call</string>
 
-- 
cgit v1.2.3


From 51da51894cef9bf606d2117584e24679a1768813 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 9 Apr 2010 20:14:30 +0300
Subject: No ticket. Fixed Linux build.

--HG--
branch : product-engine
---
 indra/newview/llappearancemgr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index d67a7787d3..dffd421898 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -79,7 +79,7 @@ public:
 	const LLUUID getBaseOutfitUUID();
 
 	// Wear/attach an item (from a user's inventory) on the agent
-	bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true);
+	bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true);
 
 	// Update the displayed outfit name in UI.
 	void updatePanelOutfitName(const std::string& name);
-- 
cgit v1.2.3


From bdb437e3b0e8aaa45493304b93128e8fe76cabe5 Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Mon, 12 Apr 2010 14:21:34 +0300
Subject: fix for  Bug   	 EXT-6713   	 Normal   	 Gaps in
 nearby chat toasts queue and EXT-6714   	 Normal   	 Old chat
 toast is shown while chat log is open reviwed
 https://codereview.productengine.com/secondlife/r/212/ manttipov

--HG--
branch : product-engine
---
 indra/newview/llnearbychathandler.cpp | 59 +++++++++++++++++++++--------------
 indra/newview/lltoast.cpp             |  6 ++++
 indra/newview/lltoast.h               |  4 +++
 3 files changed, 46 insertions(+), 23 deletions(-)

diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index e199f9f180..9824517ed1 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -56,7 +56,6 @@ LLToastPanelBase* createToastPanel()
 	return item;
 }
 
-
 class LLNearbyChatScreenChannel: public LLScreenChannelBase
 {
 public:
@@ -88,11 +87,7 @@ public:
 	{
 		for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
 		{
-			LLToast* toast = (*it);
-			toast->setVisible(FALSE);
-			toast->stopTimer();
-			m_toast_pool.push_back(toast);
-
+			addToToastPool((*it));
 		}
 		m_active_toasts.clear();
 	};
@@ -105,6 +100,14 @@ public:
 	}
 
 protected:
+	void	addToToastPool(LLToast* toast)
+	{
+		toast->setVisible(FALSE);
+		toast->stopTimer();
+		toast->setIsHidden(true);
+		m_toast_pool.push_back(toast);
+	}
+
 	void	createOverflowToast(S32 bottom, F32 timer);
 
 	create_toast_panel_callback_t m_create_toast_panel_callback_t;
@@ -132,11 +135,12 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast)
 	//fade mean we put toast to toast pool
 	if(!toast)
 		return;
-	m_toast_pool.push_back(toast);
 
 	std::vector<LLToast*>::iterator pos = std::find(m_active_toasts.begin(),m_active_toasts.end(),toast);
 	if(pos!=m_active_toasts.end())
 		m_active_toasts.erase(pos);
+
+	addToToastPool(toast);
 	
 	arrangeToasts();
 }
@@ -228,7 +232,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
 	toast->reshapeToPanel();
 	toast->resetTimer();
 	
-	m_active_toasts.insert(m_active_toasts.begin(),toast);
+	m_active_toasts.push_back(toast);
 
 	arrangeToasts();
 }
@@ -240,7 +244,14 @@ void LLNearbyChatScreenChannel::arrangeToasts()
 
 	hideToastsFromScreen();
 
-	showToastsBottom();					
+	showToastsBottom();
+}
+
+int sort_toasts_predicate(LLToast* first,LLToast* second)
+{
+	F32 v1 = first->getTimer()->getEventTimer().getElapsedTimeF32();
+	F32 v2 = second->getTimer()->getEventTimer().getElapsedTimeF32();
+	return v1 < v2;
 }
 
 void LLNearbyChatScreenChannel::showToastsBottom()
@@ -252,39 +263,41 @@ void LLNearbyChatScreenChannel::showToastsBottom()
 	S32		bottom = getRect().mBottom;
 	S32		margin = gSavedSettings.getS32("ToastGap");
 
+	//sort active toasts
+	std::sort(m_active_toasts.begin(),m_active_toasts.end(),sort_toasts_predicate);
+
+	//calc max visible item and hide other toasts.
+
 	for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
 	{
-		LLToast* toast = (*it);
-		S32 toast_top = bottom + toast->getRect().getHeight() + margin;
+		S32 toast_top = bottom + (*it)->getRect().getHeight() + margin;
 
 		if(toast_top > gFloaterView->getRect().getHeight())
 		{
 			while(it!=m_active_toasts.end())
 			{
-				toast->setVisible(FALSE);
-				toast->stopTimer();
-				m_toast_pool.push_back(toast);
+				addToToastPool((*it));
 				it=m_active_toasts.erase(it);
 			}
 			break;
 		}
-		bottom = toast_top - toast->getTopPad();
-	}
-
-	// use reverse order to provide correct z-order and avoid toast blinking
-	for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
-	{
 		LLToast* toast = (*it);
-		S32 toast_top = bottom + toast->getTopPad();
 
 		toast_rect = toast->getRect();
-		toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight());
+		toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
 
 		toast->setRect(toast_rect);
+		bottom += toast_rect.getHeight() + margin;
+	}
+	
+	// use reverse order to provide correct z-order and avoid toast blinking
+	
+	for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
+	{
+		LLToast* toast = (*it);
 		toast->setIsHidden(false);
 		toast->setVisible(TRUE);
 
-		bottom = toast->getRect().mBottom - margin;
 	}
 }
 
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 60657d3fa7..911ed6ade7 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -285,6 +285,12 @@ void LLToast::setVisible(BOOL show)
 		}
 		LLModalDialog::setFrontmost(FALSE);
 	}
+	else
+	{
+		//hide "hide" button in case toast was hidden without mouse_leave
+		if(mHideBtn)
+			mHideBtn->setVisible(show);
+	}
 	LLFloater::setVisible(show);
 	if(mPanel)
 	{
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 20198a9398..bd07ff9fb1 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -63,6 +63,8 @@ public:
 	void start() { mEventTimer.start(); }
 	void restart() {mEventTimer.reset(); }
 	BOOL getStarted() { return mEventTimer.getStarted(); }
+
+	LLTimer&  getEventTimer() { return mEventTimer;}
 private :
 	LLToast* mToast;
 };
@@ -132,6 +134,8 @@ public:
 	//
 	void stopTimer() { mTimer->stop(); }
 	//
+	LLToastLifeTimer* getTimer() { return mTimer.get();}
+	//
 	virtual void draw();
 	//
 	virtual void setVisible(BOOL show);
-- 
cgit v1.2.3


From 85f1954a1708eba2e2ea1f4e9d2c70295c128e02 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Mon, 12 Apr 2010 15:14:51 +0300
Subject: Fixed major bug EXT-6606 (Set As Profile Pic uploads and charges user
 L$10 without confirmation).

Added upload confirmation dialog.

Reviewed by Mike: https://codereview.productengine.com/secondlife/r/217/

--HG--
branch : product-engine
---
 indra/newview/llfloatersnapshot.cpp                | 26 ++++++++++++++++++++--
 .../newview/skins/default/xui/en/notifications.xml | 12 ++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 03389e62d7..a6a8194685 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -168,6 +168,8 @@ public:
 	void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; }
 	void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
 	LLFloaterPostcard* savePostcard();
+	void confirmSavingTexture(bool set_as_profile_pic = false);
+	bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic);
 	void saveTexture(bool set_as_profile_pic = false);
 	BOOL saveLocal();
 	void saveWeb(std::string url);
@@ -983,6 +985,26 @@ void profile_pic_upload_callback(const LLUUID& uuid)
 	floater->setAsProfilePic(uuid);
 }
 
+void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic)
+{
+	LLSD args;
+	args["AMOUNT"] = "10"; // *TODO: there's currently no way to avoid hardcoding the upload price
+	LLNotificationsUtil::add("UploadConfirmation", args, LLSD(),
+			boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic));
+}
+
+bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic)
+{
+	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+	if (option == 0)
+	{
+		saveTexture(set_as_profile_pic);
+	}
+
+	return false;
+}
+
 
 void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic)
 {
@@ -1746,7 +1768,7 @@ void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view)
 	
 	if(previewp)
 	{
-		previewp->saveTexture(true);
+		previewp->confirmSavingTexture(true);
 	}
 }
 
@@ -1768,7 +1790,7 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh
 		}
 		else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
 		{
-			previewp->saveTexture();
+			previewp->confirmSavingTexture();
 		}
 		else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD)
 		{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e8ba8c683d..ff8de3514f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4375,6 +4375,18 @@ Uploading in-world and web site snapshots...
 (Takes about 5 minutes.)
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="UploadConfirmation"
+   type="alertmodal">
+Uploading costs L$[AMOUNT].
+Do you wish to proceed?
+    <usetemplate
+     name="okcancelbuttons"
+     notext="Cancel"
+     yestext="Upload"/>
+  </notification>
+
   <notification
    icon="notify.tga"
    name="UploadPayment"
-- 
cgit v1.2.3


From f98f79be8fdec2cf4d234abe9c6837deef0a81e0 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Mon, 12 Apr 2010 15:20:27 +0300
Subject: Fixed major bug EXT-6590 (Preference> Maturity rating changes without
 direct user input).

Now we're notifying user that his/her maturity preference has been changed.

Reviewed by Mike: https://codereview.productengine.com/secondlife/r/216/

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp                    | 4 ++++
 indra/newview/skins/default/xui/en/notifications.xml | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d8a3932a22..32df7d8410 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4786,6 +4786,10 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD&
 		gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
 		gAgent.sendMaturityPreferenceToServer(preferredMaturity);
 
+		// notify user that the maturity preference has been changed
+		LLSD args;
+		args["RATING"] = LLViewerRegion::accessToString(preferredMaturity);
+		LLNotificationsUtil::add("PreferredMaturityChanged", args);
 	}
 	
 	return false;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ff8de3514f..7f0e8891d7 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3379,6 +3379,13 @@ You can click &apos;Change Preference&apos; to raise your maturity Rating prefer
     </form>
   </notification>
 
+  <notification
+   icon="notifytip.tga"
+   name="PreferredMaturityChanged"
+   type="notifytip">
+Your maturity rating preference is now [RATING].
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="LandClaimAccessBlocked"
-- 
cgit v1.2.3


From 7e76f26407c6760464b5928b7c6cb8c800a5883f Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Mon, 12 Apr 2010 15:38:01 +0300
Subject: Fixed normal bug EXT-6660 (Just logged on resident is displayed as
 connected to group voice chat in the VCP)

Reason.
 VCP floater stores voice states of its participants. If invited in group voice chat avatar goes offline and then online LLAvatarListItem representing it will display it as JOINED.

Fix: added force setting of voice state in VCP for added participants.

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/218/

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 1c6857b75c..0b58c8f476 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -601,10 +601,13 @@ void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item)
 			}
 		}
 		break;
-	case STATE_INVITED:
 	case STATE_LEFT:
 		// nothing to do. These states should not be changed.
 		break;
+	case STATE_INVITED:
+		// If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap
+		// If it goes online it will be rendered as JOINED via LAvatarListItem.
+		// Lets update its visual representation. See EXT-6660
 	case STATE_UNKNOWN:
 		// If an avatarID is not found in a speakers list from VoiceClient and
 		// a panel with this ID has an UNKNOWN status this means that this person
-- 
cgit v1.2.3


From 27b457f2ce860f7fc36d15e8792bfa89bca5b93f Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Mon, 12 Apr 2010 17:02:16 +0300
Subject: Implemented major task EXT-6710(Feature request: Allow drag and drop
 from Inventory panel to Resident Picker)  - added handling the drag add drop
 inventory items to resident picker  - added "Share" verb button to the
 inventory panel which opens resident picker  - added "Share" menu item to the
 individual inventory context menu which acts as verb button Reviewed by Mike
 Antipov at https://codereview.productengine.com/secondlife/r/215/

--HG--
branch : product-engine
---
 indra/newview/llavataractions.cpp                  | 14 ++++
 indra/newview/llavataractions.h                    |  5 ++
 indra/newview/llfloateravatarpicker.cpp            | 64 ++++++++++++++++
 indra/newview/llfloateravatarpicker.h              |  8 ++
 indra/newview/llinventorybridge.cpp                | 86 +++++++++++++++++++++-
 indra/newview/llinventorybridge.h                  |  2 +
 indra/newview/llinventorypanel.cpp                 |  2 +
 indra/newview/llpanelmaininventory.cpp             |  2 +
 indra/newview/llpanelobjectinventory.cpp           |  2 +
 indra/newview/llsidepanelinventory.cpp             | 26 ++++++-
 indra/newview/llsidepanelinventory.h               |  1 +
 .../skins/default/xui/en/menu_inventory.xml        |  8 ++
 .../newview/skins/default/xui/en/notifications.xml |  7 ++
 .../skins/default/xui/en/sidepanel_inventory.xml   | 24 ++++--
 14 files changed, 241 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index c85c72837c..764d54a987 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -35,6 +35,8 @@
 
 #include "llavataractions.h"
 
+#include "boost/lambda/lambda.hpp"	// for lambda::constant
+
 #include "llsd.h"
 #include "lldarray.h"
 #include "llnotifications.h"
@@ -46,6 +48,7 @@
 #include "llappviewer.h"		// for gLastVersionChannel
 #include "llcachename.h"
 #include "llcallingcard.h"		// for LLAvatarTracker
+#include "llfloateravatarpicker.h"	// for LLFloaterAvatarPicker
 #include "llfloatergroupinvite.h"
 #include "llfloatergroups.h"
 #include "llfloaterreg.h"
@@ -54,6 +57,7 @@
 #include "llinventorymodel.h"	// for gInventory.findCategoryUUIDForType
 #include "llimview.h"			// for gIMMgr
 #include "llmutelist.h"
+#include "llnotificationsutil.h"	// for LLNotificationsUtil
 #include "llrecentpeople.h"
 #include "llsidetray.h"
 #include "lltrans.h"
@@ -425,6 +429,16 @@ void LLAvatarActions::share(const LLUUID& id)
 	}
 }
 
+//static
+void LLAvatarActions::shareWithAvatars()
+{
+	LLFloaterAvatarPicker* picker =
+		LLFloaterAvatarPicker::show(NULL, FALSE, TRUE);
+	picker->setOkBtnEnableCb(boost::lambda::constant(false));
+
+	LLNotificationsUtil::add("ShareNotification");
+}
+
 // static
 void LLAvatarActions::toggleBlock(const LLUUID& id)
 {
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 9d8b4b4e23..d106a83eea 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -113,6 +113,11 @@ public:
 	 */
 	static void share(const LLUUID& id);
 
+	/**
+	 * Share items with the picked avatars.
+	 */
+	static void shareWithAvatars();
+
 	/**
 	 * Block/unblock the avatar.
 	 */
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 2cb0cdf368..01a699506e 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -38,6 +38,8 @@
 #include "llcallingcard.h"
 #include "llfocusmgr.h"
 #include "llfloaterreg.h"
+#include "llimview.h"			// for gIMMgr
+#include "lltooldraganddrop.h"	// for LLToolDragAndDrop
 #include "llviewercontrol.h"
 #include "llworld.h"
 
@@ -370,6 +372,68 @@ void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple)
 	getChild<LLScrollListCtrl>("Friends")->setAllowMultipleSelection(allow_multiple);
 }
 
+LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList()
+{
+	std::string acvtive_panel_name;
+	LLScrollListCtrl* list = NULL;
+	LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+	if(active_panel)
+	{
+		acvtive_panel_name = active_panel->getName();
+	}
+	if(acvtive_panel_name == "SearchPanel")
+	{
+		list = getChild<LLScrollListCtrl>("SearchResults");
+	}
+	else if(acvtive_panel_name == "NearMePanel")
+	{
+		list = getChild<LLScrollListCtrl>("NearMe");
+	}
+	else if (acvtive_panel_name == "FriendsPanel")
+	{
+		list = getChild<LLScrollListCtrl>("Friends");
+	}
+	return list;
+}
+
+BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
+											  BOOL drop, EDragAndDropType cargo_type,
+											  void *cargo_data, EAcceptance *accept,
+											  std::string& tooltip_msg)
+{
+	LLScrollListCtrl* list = getActiveList();
+	if(list)
+	{
+		LLRect rc_list;
+		LLRect rc_point(x,y,x,y);
+		if (localRectToOtherView(rc_point, &rc_list, list))
+		{
+			// Keep selected only one item
+			list->deselectAllItems(TRUE);
+			list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask);
+			LLScrollListItem* selection = list->getFirstSelected();
+			if (selection)
+			{
+				LLUUID session_id = LLUUID::null;
+				LLUUID dest_agent_id = selection->getUUID();
+				std::string avatar_name = selection->getColumn(0)->getValue().asString();
+				if (dest_agent_id.notNull() && dest_agent_id != gAgentID)
+				{
+					if (drop)
+					{
+						// Start up IM before give the item
+						session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id);
+					}
+					return LLToolDragAndDrop::handleGiveDragAndDrop(dest_agent_id, session_id, drop,
+																	cargo_type, cargo_data, accept);
+				}
+			}
+		}
+	}
+	*accept = ACCEPT_NO;
+	return TRUE;
+}
+
 // static 
 void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**)
 {
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 860f3930ef..e69b814f9f 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -37,6 +37,8 @@
 
 #include <vector>
 
+class LLScrollListCtrl;
+
 class LLFloaterAvatarPicker : public LLFloater
 {
 public:
@@ -59,6 +61,11 @@ public:
 
 	static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
 
+	BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
+						   BOOL drop, EDragAndDropType cargo_type,
+						   void *cargo_data, EAcceptance *accept,
+						   std::string& tooltip_msg);
+
 private:
 	void editKeystroke(class LLLineEditor* caller, void* user_data);
 
@@ -77,6 +84,7 @@ private:
 
 	void find();
 	void setAllowMultiple(BOOL allow_multiple);
+	LLScrollListCtrl* getActiveList();
 
 	virtual void draw();
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 943a851c13..76c0d69dda 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -672,6 +672,11 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		items.push_back(std::string("Open"));
 		items.push_back(std::string("Properties"));
 
@@ -1031,6 +1036,38 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const
 	return outfit_panel->isTabPanel(my_panel);
 }
 
+bool LLInvFVBridge::canShare()
+{
+	const LLInventoryModel* model = getInventoryModel();
+	if(!model)
+	{
+		return false;
+	}
+
+	LLViewerInventoryItem *item = model->getItem(mUUID);
+	if (item)
+	{
+		bool allowed = false;
+		allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item);
+		if (allowed &&
+			!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+		{
+			allowed = false;
+		}
+		if (allowed &&
+			!item->getPermissions().allowCopyBy(gAgent.getID()))
+		{
+			allowed = false;
+		}
+		return allowed;
+	}
+
+	LLViewerInventoryCategory* cat = model->getCategory(mUUID);
+
+	// All categories can be given.
+	return cat != NULL;
+}
+
 // +=================================================+
 // |        InventoryFVBridgeBuilder                 |
 // +=================================================+
@@ -2748,7 +2785,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	{
 		mDisabledItems.push_back(std::string("Delete System Folder"));
 	}
-	
+
+	mItems.push_back(std::string("Share"));
+	if (!canShare())
+	{
+		mDisabledItems.push_back(std::string("Share"));
+	}
+
 	hide_context_entries(menu, mItems, mDisabledItems);
 }
 
@@ -3266,6 +3309,12 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
+
 		items.push_back(std::string("Open"));
 		items.push_back(std::string("Properties"));
 
@@ -3354,6 +3403,11 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		items.push_back(std::string("Sound Open"));
 		items.push_back(std::string("Properties"));
 
@@ -3400,6 +3454,11 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		items.push_back(std::string("Landmark Open"));
 		items.push_back(std::string("Properties"));
 
@@ -3617,6 +3676,11 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		items.push_back(std::string("Open"));
 		items.push_back(std::string("Properties"));
 
@@ -3887,6 +3951,11 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		bool is_sidepanel = isInOutfitsSidePanel();
 
 		if (!is_sidepanel)
@@ -3945,6 +4014,11 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		items.push_back(std::string("Animation Open"));
 		items.push_back(std::string("Properties"));
 
@@ -4221,6 +4295,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		bool is_sidepanel = isInOutfitsSidePanel();
 
 		if (!is_sidepanel)
@@ -4610,6 +4689,11 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 			can_open = FALSE;
 		}
 
+		items.push_back(std::string("Share"));
+		if (!canShare())
+		{
+			disabled_items.push_back(std::string("Share"));
+		}
 		bool is_sidepanel = isInOutfitsSidePanel();
 		
 		if (can_open && !is_sidepanel)
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index e7b3785a48..f378d219f6 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -125,6 +125,8 @@ public:
 	// Allow context menus to be customized for side panel.
 	bool isInOutfitsSidePanel() const;
 
+	bool canShare();
+
 	//--------------------------------------------------------------------
 	// Convenience functions for adding various common menu options.
 	//--------------------------------------------------------------------
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 92f795462b..6ed7723aff 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -38,6 +38,7 @@
 #include "llagent.h"
 #include "llagentwearables.h"
 #include "llappearancemgr.h"
+#include "llavataractions.h"
 #include "llfloaterinventory.h"
 #include "llfloaterreg.h"
 #include "llimfloater.h"
@@ -99,6 +100,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2));
 	mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
 	mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
+	mCommitCallbackRegistrar.add("Inventory.Share",  boost::bind(&LLAvatarActions::shareWithAvatars));
 	
 	if (mStartFolderString != "")
 	{
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 8be4c8402c..0ba373c51b 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -34,6 +34,7 @@
 #include "llpanelmaininventory.h"
 
 #include "llagent.h"
+#include "llavataractions.h"
 #include "lldndbutton.h"
 #include "lleconomy.h"
 #include "llfilepicker.h"
@@ -116,6 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory()
 	mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
 	mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this));
 	mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2));
+	mCommitCallbackRegistrar.add("Inventory.Share",  boost::bind(&LLAvatarActions::shareWithAvatars));
 
 	// Controls
 	// *TODO: Just use persistant settings for each of these
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index df74c5dd47..3a82cf6f8b 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -46,6 +46,7 @@
 #include "roles_constants.h"
 
 #include "llagent.h"
+#include "llavataractions.h"
 #include "llcallbacklist.h"
 #include "llfloaterbuycurrency.h"
 #include "llfloaterreg.h"
@@ -1528,6 +1529,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing));
 	mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing));
 	mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing));
+	mCommitCallbackRegistrar.add("Inventory.Share",  boost::bind(&LLAvatarActions::shareWithAvatars));
 }
 
 // Destroys the object
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 18e56a9c01..fa543f1371 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -33,6 +33,7 @@
 #include "llsidepanelinventory.h"
 
 #include "llagent.h"
+#include "llavataractions.h"
 #include "llbutton.h"
 #include "llinventorybridge.h"
 #include "llinventorypanel.h"
@@ -151,6 +152,7 @@ void LLSidepanelInventory::onInfoButtonClicked()
 
 void LLSidepanelInventory::onShareButtonClicked()
 {
+	LLAvatarActions::shareWithAvatars();
 }
 
 void LLSidepanelInventory::performActionOnSelection(const std::string &action)
@@ -252,7 +254,9 @@ void LLSidepanelInventory::updateVerbs()
 	mPlayBtn->setEnabled(FALSE);
  	mTeleportBtn->setVisible(FALSE);
  	mTeleportBtn->setEnabled(FALSE);
-	
+
+	mShareBtn->setEnabled(canShare());
+
 	const LLInventoryItem *item = getSelectedItem();
 	if (!item)
 		return;
@@ -260,7 +264,6 @@ void LLSidepanelInventory::updateVerbs()
 	bool is_single_selection = getSelectedCount() == 1;
 
 	mInfoBtn->setEnabled(is_single_selection);
-	mShareBtn->setEnabled(is_single_selection);
 
 	switch(item->getInventoryType())
 	{
@@ -285,6 +288,25 @@ void LLSidepanelInventory::updateVerbs()
 	}
 }
 
+bool LLSidepanelInventory::canShare()
+{
+	LLPanelMainInventory* panel_main_inventory =
+		mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
+
+	LLFolderView* root_folder =
+		panel_main_inventory->getActivePanel()->getRootFolder();
+
+	LLFolderViewItem* current_item = root_folder->hasVisibleChildren()
+		? root_folder->getCurSelectedItem()
+		: NULL;
+
+	LLInvFVBridge* bridge = current_item
+		? dynamic_cast <LLInvFVBridge*> (current_item->getListener())
+		: NULL;
+
+	return bridge ? bridge->canShare() : false;
+}
+
 LLInventoryItem *LLSidepanelInventory::getSelectedItem()
 {
 	LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index ee11fb6b54..95eab3571c 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -60,6 +60,7 @@ protected:
 	void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
 	// "wear", "teleport", etc.
 	void performActionOnSelection(const std::string &action);
+	bool canShare();
 
 	void showItemInfoPanel();
 	void showTaskInfoPanel();
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 2874151df5..5e1f6b58e8 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -4,6 +4,14 @@
  layout="topleft"
  name="Popup"
  visible="false">
+    <menu_item_call
+     label="Share"
+     layout="topleft"
+     name="Share"
+     visible="true">
+        <menu_item_call.on_click
+         function="Inventory.Share" />
+    </menu_item_call>
     <menu_item_call
      label="Buy"
      layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 7f0e8891d7..9ee4e13f3c 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5961,6 +5961,13 @@ Selected button can not be shown right now.
 The button will be shown when there is enough space for it.
   </notification>
 
+  <notification
+   icon="notifytip.tga"
+   name="ShareNotification"
+   type="notifytip">
+Drag items from inventory onto a person in the resident picker
+  </notification>
+
 
   <global name="UnsupportedCPU">
 - Your CPU speed does not meet the minimum requirements.
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index a233d42568..812d94c55f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -46,17 +46,27 @@
 				 left="0"
 				 name="info_btn"
 				 top="0"
-				 width="153" />
+				 width="102" />
+			<button
+				 enabled="true"
+				 follows="bottom|left"
+				 height="23"
+				 label="Share"
+				 layout="topleft"
+				 left="105"
+				 name="share_btn"
+				 top="0"
+				 width="102" />
 			<button
 				 enabled="false"
 				 follows="bottom|left"
 				 height="23"
 				 label="Wear"
 				 layout="topleft"
-				 left="156"
+				 left="210"
 				 name="wear_btn"
 				 top="0"
-				 width="152" />
+				 width="102" />
 			<button
 				 enabled="false"
 				 follows="bottom|left"
@@ -64,19 +74,19 @@
 				 label="Play"
 				 layout="topleft"
 				 name="play_btn"
-				 left="156"
+				 left="210"
 				 top="0"
-				 width="152" />
+				 width="102" />
 			<button
 				 enabled="false"
 				 follows="bottom|left"
 				 height="23"
 				 label="Teleport"
 				 layout="topleft"
-				 left="156"
+				 left="210"
 				 name="teleport_btn"
 				 top="0"
-				 width="152" />
+				 width="102" />
 		</panel>
 	</panel>
 
-- 
cgit v1.2.3


From 73d07c93255a24f0ea23453f8ed180ce1d63a78a Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Mon, 12 Apr 2010 17:09:50 +0300
Subject: fixed major EXT-6593 "New notifications arrived while you were away"
 is bold and doesn't fit on toast * Unbolded startup toast message text; *
 Avoided increasing complexity of LLToastNotifyPanel class that in future
 should be decoupled on separate independent toast panel implementations and
 added LLPanelGenericTip class to represent generic notifytip panels.

reviewed by Vadim Savchuk and Mike Antipov at
https://codereview.productengine.com/secondlife/r/214/

--HG--
branch : product-engine
---
 indra/newview/CMakeLists.txt                       |  2 +
 indra/newview/llnotificationtiphandler.cpp         |  9 ++++
 indra/newview/llpanelgenerictip.cpp                | 56 ++++++++++++++++++++++
 indra/newview/llpanelgenerictip.h                  | 47 ++++++++++++++++++
 indra/newview/lltoastnotifypanel.h                 |  5 ++
 indra/newview/lltoastpanel.cpp                     | 23 +++++++--
 indra/newview/lltoastpanel.h                       | 10 +++-
 .../skins/default/xui/en/panel_generic_tip.xml     | 23 +++++++++
 indra/newview/skins/default/xui/en/panel_toast.xml |  2 +-
 9 files changed, 172 insertions(+), 5 deletions(-)
 create mode 100644 indra/newview/llpanelgenerictip.cpp
 create mode 100644 indra/newview/llpanelgenerictip.h
 create mode 100644 indra/newview/skins/default/xui/en/panel_generic_tip.xml

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 47fde08a9d..b3f7a64efb 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -438,6 +438,7 @@ set(viewer_SOURCE_FILES
     lltracker.cpp
     lltransientdockablefloater.cpp
     lltransientfloatermgr.cpp
+    llpanelgenerictip.cpp
     lluilistener.cpp
     lluploaddialog.cpp
     llurl.cpp
@@ -940,6 +941,7 @@ set(viewer_HEADER_FILES
     lltracker.h
     lltransientdockablefloater.h
     lltransientfloatermgr.h
+    llpanelgenerictip.h
     lluiconstants.h
     lluilistener.h
     lluploaddialog.h
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index afc00bf7ef..407de79c89 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -157,6 +157,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
 		}
 
 		LLToastPanel* notify_box = NULL;
+		// TODO: this should be implemented in LLToastPanel::buidPanelFromNotification
 		if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName())
 		{
 			LLOnlineStatusToast::Params p;
@@ -166,6 +167,14 @@ bool LLTipHandler::processNotification(const LLSD& notify)
 			notify_box = new LLOnlineStatusToast(p);
 		}
 		else
+		{
+			notify_box = LLToastPanel::buidPanelFromNotification(notification);
+		}
+
+		// TODO: this if statement should be removed  after modification of
+		// LLToastPanel::buidPanelFromNotification() to allow create generic tip panel
+		// for all tip notifications except FriendOnline and FriendOffline
+		if (notify_box == NULL)
 		{
 			notify_box = new LLToastNotifyPanel(notification);
 		}
diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp
new file mode 100644
index 0000000000..2e977faf09
--- /dev/null
+++ b/indra/newview/llpanelgenerictip.cpp
@@ -0,0 +1,56 @@
+/** 
+ * @file llpanelgenerictip.cpp
+ * @brief Represents a generic panel for a notifytip notifications. As example:
+ * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone".
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ * 
+ * Copyright (c) 2010, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelgenerictip.h"
+#include "llnotifications.h"
+
+/**
+ * Generic toast tip panel.
+ * This is particular case of toast panel that decoupled from LLToastNotifyPanel.
+ * From now LLToastNotifyPanel is deprecated and will be removed after all  panel
+ * types are represented in separate classes.
+ */
+LLPanelGenericTip::LLPanelGenericTip(
+		const LLNotificationPtr& notification) :
+	LLToastPanel(notification)
+{
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_generic_tip.xml");
+
+	childSetValue("message", notification->getMessage());
+
+	// set line max count to 3 in case of a very long name
+	snapToMessageHeight(getChild<LLTextBox> ("message"), 3);
+}
+
diff --git a/indra/newview/llpanelgenerictip.h b/indra/newview/llpanelgenerictip.h
new file mode 100644
index 0000000000..0eb502498a
--- /dev/null
+++ b/indra/newview/llpanelgenerictip.h
@@ -0,0 +1,47 @@
+/** 
+ * @file llpanelgenerictip.h
+ * @brief Represents a generic panel for a notifytip notifications. As example:
+ * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone".
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ * 
+ * Copyright (c) 2010, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_PANELGENERICTIP_H
+#define LL_PANELGENERICTIP_H
+
+#include "lltoastpanel.h"
+
+class LLPanelGenericTip: public LLToastPanel
+{
+	// disallow instantiation of this class
+private:
+	// grant privileges to instantiate this class to LLToastPanel
+	friend class LLToastPanel;
+	LLPanelGenericTip(const LLNotificationPtr& notification);
+};
+#endif /* LL_PANELGENERICTIP_H */
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
index 1c68e4c6b3..a6644c0a7a 100644
--- a/indra/newview/lltoastnotifypanel.h
+++ b/indra/newview/lltoastnotifypanel.h
@@ -49,6 +49,9 @@ class LLNotificationForm;
  * Notification panel should be used for notifications that require a response from the user.
  *
  * Replaces class LLNotifyBox.
+ *
+ * @deprecated this class will be removed after all toast panel types are
+ *  implemented in separate classes.
  */
 class LLToastNotifyPanel: public LLToastPanel 
 {
@@ -60,6 +63,8 @@ public:
 	 * @param rect an initial rectangle of the toast panel. 
 	 * If it is null then a loaded from xml rectangle will be used. 
 	 * @see LLNotification
+	 * @deprecated if you intend to instantiate LLToastNotifyPanel - it's point to
+	 * implement right class for desired toast panel. @see LLGenericTipPanel as example.
 	 */
 	LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null);
 	virtual ~LLToastNotifyPanel();
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index 755e647777..d142a0665b 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -32,14 +32,14 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#include "lltoastpanel.h"
-
+#include "llpanelgenerictip.h"
 #include "llnotifications.h"
+#include "lltoastpanel.h"
 
 //static
 const S32 LLToastPanel::MIN_PANEL_HEIGHT = 40; // VPAD(4)*2 + ICON_HEIGHT(32)
 
-LLToastPanel::LLToastPanel(LLNotificationPtr& notification) 
+LLToastPanel::LLToastPanel(const LLNotificationPtr& notification)
 {
 	mNotification = notification;
 }
@@ -91,3 +91,20 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount)
 	}
 }
 
+// static
+LLToastPanel* LLToastPanel::buidPanelFromNotification(
+		const LLNotificationPtr& notification)
+{
+	LLToastPanel* res = NULL;
+
+	if (notification->getName() == "SystemMessageTip")
+	{
+		res = new LLPanelGenericTip(notification);
+	}
+	/*
+	 else if(...)
+	 create all other specific non-public toast panel
+	 */
+
+	return res;
+}
diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h
index f1dd7d7a86..54243e52fa 100644
--- a/indra/newview/lltoastpanel.h
+++ b/indra/newview/lltoastpanel.h
@@ -53,13 +53,21 @@ public:
  */
 class LLToastPanel: public LLPanel {
 public:
-	LLToastPanel(LLNotificationPtr&);
+	LLToastPanel(const LLNotificationPtr&);
 	virtual ~LLToastPanel() = 0;
 
 	virtual std::string getTitle();
 	virtual const LLUUID& getID();
 
 	static const S32 MIN_PANEL_HEIGHT;
+
+	/**
+	 * Builder method for constructing notification specific panels.
+	 * Normally type of created panels shouldn't be publicated and should be hidden
+	 * from other functionality.
+	 */
+	static LLToastPanel* buidPanelFromNotification(
+			const LLNotificationPtr& notification);
 protected:
 	LLNotificationPtr mNotification;
 	void snapToMessageHeight(LLTextBase* message, S32 maxLineCount);
diff --git a/indra/newview/skins/default/xui/en/panel_generic_tip.xml b/indra/newview/skins/default/xui/en/panel_generic_tip.xml
new file mode 100644
index 0000000000..453ed7c7a6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_generic_tip.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ height="40"
+ layout="topleft"
+ left="0"
+ name="panel_system_tip"
+ top="0"
+ width="305">
+    <text
+     follows="all"
+     font="SansSerif"
+     height="20"
+     layout="topleft"
+     left="10"
+     max_length="350"
+     name="message"
+     text_color="white"
+     top="10"
+     use_ellipses="true"
+     value=""
+     width="285"
+     wrap="true" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index e7384fa77f..92b4c17247 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -55,7 +55,7 @@
     clip_partial="true" 
    visible="false"
    follows="left|top|right|bottom"
-   font="SansSerifBold"
+   font="SansSerif"
    height="20"
    layout="topleft"
    left="20"
-- 
cgit v1.2.3


From a813ec6ecbee8b5cd5e474892ff2f2eb838e6d27 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Mon, 12 Apr 2010 14:11:13 -0700
Subject: VWR-17833 en_xui_change to cover PT (logest translation)

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

diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 8131b75b70..233137a76b 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -477,7 +477,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t
          label="Share"
          layout="topleft"
          name="share_btn"
-         width="62" />
+         width="85" />
         <button
          follows="bottom|left"
          left_pad="3"
-- 
cgit v1.2.3


From bb617018fbc18f5f506b4aa71ac01778406613c9 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Mon, 12 Apr 2010 14:28:01 -0700
Subject: VWR-17849 en_xui_change to cover ES (longest translation)

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

diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml
index 6f2b0fc3ea..32460e937d 100644
--- a/indra/newview/skins/default/xui/en/floater_customize.xml
+++ b/indra/newview/skins/default/xui/en/floater_customize.xml
@@ -3365,7 +3365,7 @@
      layout="topleft"
      name="make_outfit_btn"
      right="-218"
-     width="100" />
+     width="120" />
     <button
      bottom="574"
      follows="right|bottom"
-- 
cgit v1.2.3


From 95343d8085d98cf0927747298cd4af7a9ea90766 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Mon, 12 Apr 2010 16:05:08 -0700
Subject: EXT-6817 en_xui_change and remove old overrides

---
 indra/newview/skins/default/xui/en/panel_region_estate.xml | 12 ++++++------
 indra/newview/skins/default/xui/it/panel_region_estate.xml |  2 +-
 indra/newview/skins/default/xui/nl/panel_region_estate.xml |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml
index c5b2512fba..9186efc431 100644
--- a/indra/newview/skins/default/xui/en/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml
@@ -33,7 +33,7 @@
      left_delta="0"
      name="estate_text"
      top_pad="2"
-     width="80">
+     width="140">
         Estate:
     </text>
     <text
@@ -59,7 +59,7 @@
      left_delta="0"
      name="owner_text"
      top_pad="2"
-     width="80">
+     width="150">
         Estate owner:
     </text>
     <text
@@ -191,19 +191,19 @@
      height="23"
      label="Send Message To Estate..."
      layout="topleft"
-     left="50"
+     left="20"
      name="message_estate_btn"
      top_pad="20"
-     width="160" />
+     width="220" />
     <button
      follows="left|top"
      height="23"
      label="Kick Resident from Estate..."
      layout="topleft"
-     left="50"
+     left="20"
      name="kick_user_from_estate_btn"
      top_pad="5"
-     width="160" />
+     width="220" />
 
     <text
      type="string"
diff --git a/indra/newview/skins/default/xui/it/panel_region_estate.xml b/indra/newview/skins/default/xui/it/panel_region_estate.xml
index 8d3f096c4b..61e3f31024 100644
--- a/indra/newview/skins/default/xui/it/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/it/panel_region_estate.xml
@@ -3,7 +3,7 @@
 	<text name="estate_help_text">
 		Le modifiche apportate in questa scheda saranno valide per tutte le regioni in questa proprietà.
 	</text>
-	<text name="estate_text" width="140">
+	<text name="estate_text">
 		Proprietà immobiliari:
 	</text>
 	<text name="estate_name">
diff --git a/indra/newview/skins/default/xui/nl/panel_region_estate.xml b/indra/newview/skins/default/xui/nl/panel_region_estate.xml
index 7a5fa801d9..08b68c8d30 100644
--- a/indra/newview/skins/default/xui/nl/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/nl/panel_region_estate.xml
@@ -26,7 +26,7 @@ zullen alle regio&apos;s in de estate beïnvloeden.
 	<text name="Only Allow">
 		Beperk toegang tot:
 	</text>
-	<check_box label="Inwoners met betalingsinformatie &#10;opgeslagen" name="limit_payment" tool_tip="Verban ongeïdentificeerde inwoners."/>
+	<check_box label="Inwoners met betalingsinformatie opgeslagen" name="limit_payment" tool_tip="Verban ongeïdentificeerde inwoners."/>
 	<check_box label="Leeftijdgeverifieerde volwassenen" name="limit_age_verified" tool_tip="Verban inwoners die hun leeftijd niet geverifieerd hebben. Zie support.secondlife.com voor meer informatie." bottom_delta="-30"/>
 	<check_box label="Voice chat toestaan" name="voice_chat_check"/>
 	<button label="?" name="voice_chat_help"/>
-- 
cgit v1.2.3


From aade7752202d321eb3cf6ed6a9e004ad200689b7 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Tue, 13 Apr 2010 08:44:34 +0300
Subject: Fixed normal bug EXT-6624 ('Land for sale' icon isn't showed in
 Navigation bar after teleport from another land for sale with 'Moderate'
 rating)

-       Reason: after teleport, Agent's content rate compares with just teleported Region's content rate, to check whether Agent can buy a Parcel in this Region. But it compares with old Region ones. Because In method 'LLViewerParcelMgr::canAgentBuyParcel' the call of 'LLViewerParcelMgr::getInstance()->getSelectionRegion()' returns last selected parcel. So after teleport this method call will always return old Region.
        Solution: In 'LLViewerParcelMgr::canAgentBuyParcel' determine current Parcel Agent is in, then determine Region using Agent's Parcel information and use actual Region.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/222/

--HG--
branch : product-engine
---
 indra/newview/llviewerparcelmgr.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 1f6bbcbae8..a591cc1e14 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -2185,7 +2185,8 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
 		return true;	// change this if want to make it gods only
 	}
 	
-	LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
+	LLVector3 parcel_coord = parcel->getCenterpoint();
+	LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosAgent(parcel_coord);
 	if (regionp)
 	{
 		U8 sim_access = regionp->getSimAccess();
-- 
cgit v1.2.3


From 4f20b91acdddc06b7e033afa42e19f993f7efb30 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 13 Apr 2010 10:55:00 +0300
Subject: Fixed normal bug EXT-5973 (converstations button flash count and rate
 needs to be controllable)

Made flashing count and period for IM Well and Notification Well icons configurable via viewer settings: WellIconFlashCount, WellIconFlashPeriod.
Due to Flash Timer is implemented as derived class from EventTimer it is impossible to change period in runtime. So, both settings are made as required restart.

Also removed deprecated "flash_to_lit_count" & "flash_period" widget params.

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/220/

--HG--
branch : product-engine
---
 indra/newview/app_settings/settings.xml            | 22 ++++++++++++++++++++++
 indra/newview/llchiclet.cpp                        | 10 +++++++---
 indra/newview/llchiclet.h                          | 10 ----------
 .../skins/default/xui/en/panel_bottomtray.xml      |  2 --
 4 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8b66cce8a3..00c29477ce 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10646,6 +10646,28 @@
       <key>Value</key>
       <real>50.0</real>
     </map>
+    <key>WellIconFlashCount</key>
+    <map>
+      <key>Comment</key>
+      <string>Number of flashes of IM Well and Notification Well icons after which flashing buttons stay lit up. Requires restart.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <integer>3</integer>
+    </map>
+    <key>WellIconFlashPeriod</key>
+    <map>
+      <key>Comment</key>
+      <string>Period at which IM Well and Notification Well icons flash (seconds). Requires restart.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+      <real>0.25</real>
+    </map>
     <key>WindLightUseAtmosShaders</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index e39384b7b2..05d3d70c74 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -131,8 +131,6 @@ LLSysWellChiclet::Params::Params()
 : button("button")
 , unread_notifications("unread_notifications")
 , max_displayed_count("max_displayed_count", 99)
-, flash_to_lit_count("flash_to_lit_count", 3)
-, flash_period("flash_period", 0.5F)
 {
 	button.name("button");
 	button.tab_stop(FALSE);
@@ -152,7 +150,13 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p)
 	mButton = LLUICtrlFactory::create<LLButton>(button_params);
 	addChild(mButton);
 
-	mFlashToLitTimer = new FlashToLitTimer(p.flash_to_lit_count, p.flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this));
+	// use settings from settings.xml to be able change them via Debug settings. See EXT-5973.
+	// Due to Timer is implemented as derived class from EventTimer it is impossible to change period
+	// in runtime. So, both settings are made as required restart.
+	static S32 flash_to_lit_count = gSavedSettings.getS32("WellIconFlashCount");
+	static F32 flash_period = gSavedSettings.getF32("WellIconFlashPeriod");
+
+	mFlashToLitTimer = new FlashToLitTimer(flash_to_lit_count, flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this));
 }
 
 LLSysWellChiclet::~LLSysWellChiclet()
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index ba17c5970e..97f494b817 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -800,16 +800,6 @@ public:
 		 */
 		Optional<S32> max_displayed_count;
 
-		/**
-		 * How many time chiclet should flash before set "Lit" state. Default value is 3.
-		 */
-		Optional<S32> flash_to_lit_count;
-
-		/**
-		 * Period of flashing while setting "Lit" state, in seconds. Default value is 0.5.
-		 */
-		Optional<F32> flash_period;
-
 		Params();
 	};
 
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index c6ca814f58..e412c491fd 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -346,7 +346,6 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
          user_resize="false">
             <chiclet_im_well
              max_displayed_count="99"
-             flash_period="0.3"
              follows="right"
              height="28"
              layout="topleft"
@@ -395,7 +394,6 @@ image_pressed_selected  "Lit" + "Selected" - there are new messages and the Well
          min_width="37"
          user_resize="false">
             <chiclet_notification
-             flash_period="0.25"
              follows="right"
              height="23"
              layout="topleft"
-- 
cgit v1.2.3


From ab246784b069913363e544ab3c9a9fb615e0c71d Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Tue, 13 Apr 2010 13:32:39 +0300
Subject: Fixed normal bug EXT-6034 (Need "View People Icons" option for group
 IM window) - added new menu item to participant list menu for group and
 ad-hoc chats. Reviewed by Mike Antipov at
 https://codereview.productengine.com/secondlife/r/225/.

--HG--
branch : product-engine
---
 indra/newview/app_settings/settings.xml                 | 11 +++++++++++
 indra/newview/llcallfloater.cpp                         |  2 +-
 indra/newview/llparticipantlist.cpp                     | 12 +++++++++++-
 indra/newview/llparticipantlist.h                       |  3 ++-
 .../skins/default/xui/en/menu_participant_list.xml      | 17 +++++++++++++++--
 5 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 00c29477ce..2dda853f73 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5395,6 +5395,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>ParticipantListShowIcons</key>
+    <map>
+      <key>Comment</key>
+      <string>Show/hide people icons in participant list</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
     <key>PerAccountSettingsFile</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 0b58c8f476..d15c5f9bf4 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -334,7 +334,7 @@ void LLCallFloater::refreshParticipantList()
 
 	if (!non_avatar_caller)
 	{
-		mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT);
+		mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false);
 		mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1));
 		mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS);
 
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index dbb8e962bd..026be882ed 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -39,6 +39,7 @@
 
 #include "llparticipantlist.h"
 #include "llspeakers.h"
+#include "llviewercontrol.h"
 #include "llviewermenu.h"
 #include "llvoiceclient.h"
 
@@ -50,7 +51,7 @@
 static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR;
 
 LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list,  bool use_context_menu/* = true*/,
-		bool exclude_agent /*= true*/):
+		bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/):
 	mSpeakerMgr(data_source),
 	mAvatarList(avatar_list),
 	mSortOrder(E_SORT_BY_NAME)
@@ -87,6 +88,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
 		mAvatarList->setContextMenu(NULL);
 	}
 
+	if (use_context_menu && can_toggle_icons)
+	{
+		mAvatarList->setShowIcons("ParticipantListShowIcons");
+		mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList));
+	}
+
 	//Lets fill avatarList with existing speakers
 	LLSpeakerMgr::speaker_list_t speaker_list;
 	mSpeakerMgr->getSpeakerList(&speaker_list, true);
@@ -113,6 +120,7 @@ LLParticipantList::~LLParticipantList()
 	mAvatarListDoubleClickConnection.disconnect();
 	mAvatarListRefreshConnection.disconnect();
 	mAvatarListReturnConnection.disconnect();
+	mAvatarListToggleIconsConnection.disconnect();
 
 	// It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged()
 	// See ticket EXT-3427
@@ -440,6 +448,8 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
 	main_menu->setItemVisible("SortByName", is_sort_visible);
 	main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible);
 	main_menu->setItemVisible("Moderator Options", isGroupModerator());
+	main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected());
+	main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected());
 	main_menu->arrangeAndClear();
 
 	return main_menu;
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index d9ca4230a9..953dff4551 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -46,7 +46,7 @@ class LLParticipantList
 
 		typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
 
-		LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true);
+		LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true);
 		~LLParticipantList();
 		void setSpeakingIndicatorsVisible(BOOL visible);
 
@@ -268,6 +268,7 @@ class LLParticipantList
 		boost::signals2::connection mAvatarListDoubleClickConnection;
 		boost::signals2::connection mAvatarListRefreshConnection;
 		boost::signals2::connection mAvatarListReturnConnection;
+		boost::signals2::connection mAvatarListToggleIconsConnection;
 
 		LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers;
 		validate_speaker_callback_t mValidateSpeakerCallback;
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index d03a7e3d41..59c7f4ed85 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -82,8 +82,21 @@
          function="ParticipantList.EnableItem"
          parameter="can_pay" />
     </menu_item_call>
-        <menu_item_separator
-         layout="topleft" />
+    <menu_item_separator
+        layout="topleft"
+        name="View Icons Separator" />
+    <menu_item_check
+        label="View People Icons"
+        name="View Icons">
+      <on_click
+          function="ToggleControl"
+          parameter="ParticipantListShowIcons"/>
+      <on_check
+          function="CheckControl"
+          parameter="ParticipantListShowIcons" />
+    </menu_item_check>
+    <menu_item_separator
+        layout="topleft" />
     <menu_item_check
      label="Block Voice"
      layout="topleft"
-- 
cgit v1.2.3


From 613b4e9361df55da3863a546c806493d48f848f3 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Tue, 13 Apr 2010 13:37:14 +0300
Subject: done EXT-6675 Fix TRASH btn on Edit Outfit panel to remove an item
 from avatar (from COF)

Trash button removes from avatar a selected item only of "clothing" and "object" types

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/209/

--HG--
branch : product-engine
---
 indra/newview/llappearancemgr.cpp                  | 35 ++++++++++
 indra/newview/llappearancemgr.h                    |  3 +
 indra/newview/llpaneloutfitedit.cpp                | 80 +++++++++-------------
 indra/newview/llpaneloutfitedit.h                  |  6 +-
 .../skins/default/xui/en/panel_outfit_edit.xml     |  2 +-
 5 files changed, 76 insertions(+), 50 deletions(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4a30ba3066..b6fc33e9a2 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -42,8 +42,10 @@
 #include "llinventoryfunctions.h"
 #include "llinventoryobserver.h"
 #include "llnotificationsutil.h"
+#include "llselectmgr.h"
 #include "llsidepanelappearance.h"
 #include "llsidetray.h"
+#include "llviewerobjectlist.h"
 #include "llvoavatar.h"
 #include "llvoavatarself.h"
 #include "llviewerregion.h"
@@ -1587,6 +1589,39 @@ void LLAppearanceMgr::wearBaseOutfit()
 	updateCOF(base_outfit_id);
 }
 
+void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
+{
+	LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove);
+	if (!item_to_remove) return;
+
+	switch (item_to_remove->getType())
+	{
+	case LLAssetType::AT_CLOTHING:
+		if (get_is_item_worn(id_to_remove))
+		{
+			//*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
+			LLWearableBridge::removeItemFromAvatar(item_to_remove);
+		}
+		break;
+	case LLAssetType::AT_OBJECT:
+		gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
+		gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+		gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+		gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_to_remove->getLinkedUUID());
+		gMessageSystem->sendReliable( gAgent.getRegion()->getHost());
+
+		{
+			// this object might have been selected, so let the selection manager know it's gone now
+			LLViewerObject *found_obj = gObjectList.findObject(item_to_remove->getLinkedUUID());
+			if (found_obj)
+			{
+				LLSelectMgr::getInstance()->remove(found_obj);
+			};
+		}
+	default: break;
+	}
+}
+
 //#define DUMP_CAT_VERBOSE
 
 void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index dffd421898..83261bbbd0 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -135,6 +135,9 @@ public:
 	// @return false if there is no base outfit
 	bool updateBaseOutfit();
 
+	//Remove clothing or detach an object from the agent (a bodypart cannot be removed)
+	void removeItemFromAvatar(const LLUUID& item_id);
+
 protected:
 	LLAppearanceMgr();
 	~LLAppearanceMgr();
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index d1e6d7de42..75a2080f74 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -118,7 +118,7 @@ private:
 LLPanelOutfitEdit::LLPanelOutfitEdit()
 :	LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL),
 mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL),
-mRemoveFromLookBtn(NULL), mLookObserver(NULL)
+mRemoveFromOutfitBtn(NULL), mLookObserver(NULL)
 {
 	mSavedFolderState = new LLSaveFolderState();
 	mSavedFolderState->setApply(FALSE);
@@ -164,14 +164,10 @@ BOOL LLPanelOutfitEdit::postBuild()
 
 	childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL);
 
-	/*
-	mLookContents->setDoubleClickCallback(onDoubleClickSpeaker, this);
-	mLookContents->setCommitOnSelectionChange(TRUE);
-	mLookContents->setCommitCallback(boost::bind(&LLPanelActiveSpeakers::handleSpeakerSelect, this, _2));
-	mLookContents->setSortChangedCallback(boost::bind(&LLPanelActiveSpeakers::onSortChanged, this));
-	mLookContents->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
-	*/
-	
+	mLookContents = getChild<LLScrollListCtrl>("look_items_list");
+	mLookContents->sortByColumn("look_item_sort", TRUE);
+	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+
 	mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");
 	mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
 	mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
@@ -207,31 +203,20 @@ BOOL LLPanelOutfitEdit::postBuild()
 	mUpBtn->setEnabled(TRUE);
 	mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this));
 	
+	//*TODO rename mLookContents to mOutfitContents
 	mLookContents = getChild<LLScrollListCtrl>("look_items_list");
 	mLookContents->sortByColumn("look_item_sort", TRUE);
-	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onLookItemSelectionChange, this));
+	mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+
+	mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn");
+	mRemoveFromOutfitBtn->setEnabled(FALSE);
+	mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this));
 
-	/*
-	LLButton::Params remove_params;
-	remove_params.name("remove_from_look");
-	remove_params.click_callback.function(boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this));
-	remove_params.label("-"); */
-	
-	//mRemoveFromLookBtn = LLUICtrlFactory::create<LLButton>(remove_params);
-	mRemoveFromLookBtn = getChild<LLButton>("remove_from_look_btn");
-	mRemoveFromLookBtn->setEnabled(FALSE);
-	mRemoveFromLookBtn->setVisible(FALSE);
-	//childSetAction("remove_from_look_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
-	mRemoveFromLookBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this));
-	//getChild<LLPanel>("look_info_group_bar")->addChild(mRemoveFromLookBtn); remove_item_btn
-	
 	mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
 	mEditWearableBtn->setEnabled(FALSE);
 	mEditWearableBtn->setVisible(FALSE);
 	mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this));
 
-	childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
-	
 	childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
 
 	childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
@@ -353,27 +338,15 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)
 }
 
 
-void LLPanelOutfitEdit::onRemoveFromLookClicked(void)
+void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
 {
 	LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID();
 	
-	LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove);
-	
-	if (item_to_remove)
-	{
-		// returns null if not a wearable (attachment, etc).
-		const LLWearable* wearable_to_remove = gAgentWearables.getWearableFromAssetID(item_to_remove->getAssetUUID());
-		if (!wearable_to_remove || gAgentWearables.canWearableBeRemoved( wearable_to_remove ))
-		{											 
-			gInventory.purgeObject( id_to_remove );
-			updateLookInfo();
-			mRemoveFromLookBtn->setEnabled(FALSE);
-			if (mRemoveFromLookBtn->getVisible())
-			{
-				mRemoveFromLookBtn->setVisible(FALSE);
-			}
-		}
-	}
+	LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove);
+
+	updateLookInfo();
+
+	mRemoveFromOutfitBtn->setEnabled(FALSE);
 }
 
 
@@ -482,7 +455,7 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
 	current_item->addChild(mAddToLookBtn); */
 }
 
-void LLPanelOutfitEdit::onLookItemSelectionChange(void)
+void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)
 {	
 	S32 left_offset = -4;
 	S32 top_offset = -10;
@@ -504,7 +477,22 @@ void LLPanelOutfitEdit::onLookItemSelectionChange(void)
 	{
 		mEditWearableBtn->setVisible(TRUE);
 	}
-	//mLookContents->addChild(mRemoveFromLookBtn);
+
+
+	const LLUUID& id_item_to_remove = item->getUUID();
+	LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove);
+	if (!item_to_remove) return;
+
+	switch (item_to_remove->getType())
+	{
+	case LLAssetType::AT_CLOTHING:
+	case LLAssetType::AT_OBJECT:
+		mRemoveFromOutfitBtn->setEnabled(TRUE);
+		break;
+	default:
+		mRemoveFromOutfitBtn->setEnabled(FALSE);
+		break;
+	}
 }
 
 void LLPanelOutfitEdit::changed(U32 mask)
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 1a8d7d2bef..fa92d4c314 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -94,8 +94,8 @@ public:
 	void onSearchEdit(const std::string& string);
 	void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
 	void onAddToOutfitClicked(void);
-	void onLookItemSelectionChange(void);
-	void onRemoveFromLookClicked(void);
+	void onOutfitItemSelectionChange(void);
+	void onRemoveFromOutfitClicked(void);
 	void onEditWearableClicked(void);
 	void onUpClicked(void);
 
@@ -117,7 +117,7 @@ private:
 	LLSaveFolderState*	mSavedFolderState;
 	std::string			mSearchString;
 	LLButton*			mAddToOutfitBtn;
-	LLButton*			mRemoveFromLookBtn;
+	LLButton*			mRemoveFromOutfitBtn;
 	LLButton*			mUpBtn;
 	LLButton*			mEditWearableBtn;
 	LLToggleableMenu*	mSaveMenu;
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index a5e6506463..9ece4aead8 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -211,7 +211,7 @@
                  image_selected="Toolbar_Middle_Selected"
                  image_unselected="Toolbar_Middle_Off"
                  layout="topleft"
-                 name="trash_btn"
+                 name="remove_from_outfit_btn"
                  right="-1"
                  top="1"
                  width="31" />
-- 
cgit v1.2.3


From e2d32b9e9d48d0efde92c54c9aaa62fa56671002 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Tue, 13 Apr 2010 16:29:33 +0300
Subject: Fixed bug EXT-5415 (Edit floater and object profile show group as
 "loading..." when set to "none").

Made LLCacheName getGroupName() and getName() methods return TRUE if the given group/avatar name is NULL, so that LLNameBox doesn't display "Loading..." indefinitely.
There's nothing to wait for in case of NULL id: the name cache returns a predefined name that won't change (i.e. it's the final result).

Reviewed by Mike: https://codereview.productengine.com/secondlife/r/223/

--HG--
branch : product-engine
---
 indra/llmessage/llcachename.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 9363b3a8d5..9871c922f1 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -486,7 +486,7 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
 	{
 		first = sCacheName["nobody"];
 		last.clear();
-		return FALSE;
+		return TRUE;
 	}
 
 	LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
@@ -530,7 +530,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 	if(id.isNull())
 	{
 		group = sCacheName["none"];
-		return FALSE;
+		return TRUE;
 	}
 
 	LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache,id);
-- 
cgit v1.2.3


From 3a5ae14b85d0ba8d562cddaa06f6c0bc0dccde33 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 13 Apr 2010 18:26:36 +0300
Subject: Completed normal subtask EXT-6621 (Code cleanup: Remove unused
 LLFloaterActiveSpeakers and related classes from viewer)

* Removed llfloateractivespeacker.h/cpp from CMakeLists.txt and from the repo.
* Removed llmediaremotectrl.h/cpp, llvoiceremotectrl.h/cpp from the repo (were not in CMakeLists.txt).
* Unused in 2.0 setings ("ShowVoiceChannelPopup" & "ShowVolumeSettingsPopup") are moved to the end of settings.xml (to not affect 1.23 if remove).
* Removed xml files related to Active Speakers floater and old Communication floater (related cpp files have been already removed). Also removed their localized versions.
* Also removed old textures related to removed xml and unused in 2.0 anymore.

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/226/

--HG--
branch : product-engine
---
 indra/newview/CMakeLists.txt                      |  2 -
 indra/newview/app_settings/settings.xml           | 52 +++++++++++++----------
 indra/newview/llbottomtray.cpp                    | 19 ---------
 indra/newview/llbottomtray.h                      |  2 -
 indra/newview/llviewerfloaterreg.cpp              |  3 --
 indra/newview/llvoiceclient.cpp                   |  2 +-
 indra/newview/skins/default/textures/textures.xml | 20 ---------
 7 files changed, 31 insertions(+), 69 deletions(-)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index b3f7a64efb..73e83b9793 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -145,7 +145,6 @@ set(viewer_SOURCE_FILES
     llfirstuse.cpp
     llflexibleobject.cpp
     llfloaterabout.cpp
-    llfloateractivespeakers.cpp
     llfloateranimpreview.cpp
     llfloaterauction.cpp
     llfloateravatarpicker.cpp
@@ -650,7 +649,6 @@ set(viewer_HEADER_FILES
     llfirstuse.h
     llflexibleobject.h
     llfloaterabout.h
-    llfloateractivespeakers.h
     llfloateranimpreview.h
     llfloaterauction.h
     llfloateravatarpicker.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b26077eec9..f76b471c9c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8546,17 +8546,6 @@
 		<key>Value</key>
 		<integer>0</integer>
 	</map>
-	<key>ShowVoiceChannelPopup</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls visibility of the current voice channel popup above the voice tab</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
     <key>ShowVoiceVisualizersInCalls</key>
     <map>
       <key>Comment</key>
@@ -8568,17 +8557,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>ShowVolumeSettingsPopup</key>
-    <map>
-      <key>Comment</key>
-      <string>Show individual volume slider for voice, sound effects, etc</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
     <key>SkinCurrent</key>
     <map>
       <key>Comment</key>
@@ -10965,5 +10943,35 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+
+    <!-- Settings below are for back compatibility only.
+    They are not used in current viewer anymore. But they can't be removed to avoid
+    influence on previous versions of the viewer in case of settings are not used or default value
+    should be changed. See also EXT-6661. -->
+    <!-- 1.23 settings -->
+    <key>ShowVoiceChannelPopup</key>
+    <map>
+      <key>Comment</key>
+      <string>Controls visibility of the current voice channel popup above the voice tab</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>ShowVolumeSettingsPopup</key>
+    <map>
+      <key>Comment</key>
+      <string>Show individual volume slider for voice, sound effects, etc</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+  
+    <!-- End of back compatibility settings -->
 </map>
 </llsd>
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 41bee540fc..4ebccbe731 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -185,24 +185,6 @@ LLBottomTray::~LLBottomTray()
 	}
 }
 
-void LLBottomTray::onChicletClick(LLUICtrl* ctrl)
-{
-	LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl);
-	if (chiclet)
-	{
-		// Until you can type into an IM Window and have a conversation,
-		// still show the old communicate window
-		//LLFloaterReg::showInstance("communicate", chiclet->getSessionId());
-
-		// Show after comm window so it is frontmost (and hence will not
-		// auto-hide)
-
-// this logic has been moved to LLIMChiclet::handleMouseDown
-//		LLIMFloater::show(chiclet->getSessionId());
-//		chiclet->setCounter(0);
-	}
-}
-
 // *TODO Vadim: why void* ?
 void* LLBottomTray::createNearbyChatBar(void* userdata)
 {
@@ -499,7 +481,6 @@ BOOL LLBottomTray::postBuild()
 	mNearbyChatBar->getChatBox()->setContextMenu(NULL);
 
 	mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
-	mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
 
 	initStateProcessedObjectMap();
 
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 3c45777645..8395b484cf 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -212,8 +212,6 @@ protected:
 
 	LLBottomTray(const LLSD& key = LLSD());
 
-	void onChicletClick(LLUICtrl* ctrl);
-
 	static void* createNearbyChatBar(void* userdata);
 
 	void updateContextMenu(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 65e9d8971a..506cebfe73 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -40,7 +40,6 @@
 #include "llcompilequeue.h"
 #include "llcallfloater.h"
 #include "llfloaterabout.h"
-#include "llfloateractivespeakers.h"
 #include "llfloateranimpreview.h"
 #include "llfloaterauction.h"
 #include "llfloateravatarpicker.h"
@@ -135,7 +134,6 @@ void LLViewerFloaterReg::registerFloaters()
 
 	LLFloaterAboutUtil::registerFloater();
 	LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
-	LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterActiveSpeakers>);
 	LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
 	LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
 	LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
@@ -151,7 +149,6 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
 
 	LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
-	//LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
 	LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
 
 	LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 2238acd643..298ce3fcec 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5150,7 +5150,7 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con
 			else
 			{
 				// Create a UUID by hashing the URI, but do NOT set mAvatarIDValid.
-				// This tells both code in LLVoiceClient and code in llfloateractivespeakers.cpp that the ID will not be in the name cache.
+				// This tells code in LLVoiceClient that the ID will not be in the name cache.
 				setUUIDFromStringHash(result->mAvatarID, uri);
 			}
 		}
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 41bcc62220..84a99ba92a 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -522,8 +522,6 @@ with the same filename but different name
   <!--WARNING OLD ART BELOW *do not use*-->
   <texture name="icn_media_web.tga" preload="true" />
   <texture name="icn_media_movie.tga" preload="true" />
-  <texture name="icn_speaker-muted_dark.tga" />
-  <texture name="icn_speaker_dark.tga" />
   <texture name="icn_voice-localchat.tga" />
   <texture name="icn_voice-groupfocus.tga" />
   <texture name="icn_voice-pvtfocus.tga" />
@@ -545,10 +543,6 @@ with the same filename but different name
   <texture name="tearoffbox.tga" />
   <texture name="tearoff_pressed.tga" />
 
-  <texture name="icn_label_music.tga" />
-  <texture name="icn_label_media.tga" />
-  <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114" />
-
   <texture name="color_swatch_alpha.tga" preload="true" />
 
   <texture name="button_anim_pause.tga" />
@@ -582,20 +576,6 @@ with the same filename but different name
 
   <texture name="notify_caution_icon.tga" />
 
-  <texture name="icn_active-speakers-dot-lvl0.tga" />
-  <texture name="icn_active-speakers-dot-lvl1.tga" />
-  <texture name="icn_active-speakers-dot-lvl2.tga" />
-
-  <texture name="icn_voice_ptt-off.tga" />
-  <texture name="icn_voice_ptt-on.tga" />
-  <texture name="icn_voice_ptt-on-lvl1.tga" />
-  <texture name="icn_voice_ptt-on-lvl2.tga" />
-  <texture name="icn_voice_ptt-on-lvl3.tga" />
-  <texture name="icn_voice-call-end.tga" />
-  <texture name="icn_voice-call-start.tga" />
-
-  <texture name="mute_icon.tga" />
-
   <texture name="default_land_picture.j2c" />
   <texture name="default_profile_picture.j2c" />
   <texture name="locked_image.j2c" />
-- 
cgit v1.2.3


From 157bc3071da89b15f1393475e906e7301698cc8a Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Tue, 13 Apr 2010 10:10:58 -0700
Subject: Initial implementation of mac_volume_catcher.cpp.

---
 indra/media_plugins/webkit/CMakeLists.txt         |   8 +
 indra/media_plugins/webkit/mac_volume_catcher.cpp | 275 ++++++++++++++++++++++
 2 files changed, 283 insertions(+)
 create mode 100644 indra/media_plugins/webkit/mac_volume_catcher.cpp

diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index c3a3f8e2b2..4f183cddeb 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -51,6 +51,14 @@ if (LINUX AND PULSEAUDIO)
   list(APPEND media_plugin_webkit_LINK_LIBRARIES
        ${UI_LIBRARIES}     # for glib/GTK
        )
+elseif (DARWIN)
+  list(APPEND media_plugin_webkit_SOURCE_FILES mac_volume_catcher.cpp)
+  find_library(CORESERVICES_LIBRARY CoreServices)
+  find_library(AUDIOUNIT_LIBRARY AudioUnit)
+  list(APPEND media_plugin_webkit_LINK_LIBRARIES
+       ${CORESERVICES_LIBRARY}     # for Component Manager calls
+       ${AUDIOUNIT_LIBRARY}        # for AudioUnit calls
+       )
 else (LINUX AND PULSEAUDIO)
   # All other platforms use the dummy volume catcher for now.
   list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp)
diff --git a/indra/media_plugins/webkit/mac_volume_catcher.cpp b/indra/media_plugins/webkit/mac_volume_catcher.cpp
new file mode 100644
index 0000000000..03249f9e83
--- /dev/null
+++ b/indra/media_plugins/webkit/mac_volume_catcher.cpp
@@ -0,0 +1,275 @@
+/** 
+ * @file dummy_volume_catcher.cpp
+ * @brief A Mac OS X specific hack to control the volume level of all audio channels opened by a process.
+ *
+ * @cond
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ * @endcond
+ */
+
+/**************************************************************************************************************
+	This code works by using CaptureComponent to capture the "Default Output" audio component
+	(kAudioUnitType_Output/kAudioUnitSubType_DefaultOutput) and delegating all calls to the original component.
+	It does this just to keep track of all instances of the default output component, so that it can set the
+	kHALOutputParam_Volume parameter on all of them to adjust the output volume.
+**************************************************************************************************************/
+
+#include "volume_catcher.h"
+
+#include <Carbon/Carbon.h>
+#include <QuickTime/QuickTime.h>
+#include <AudioUnit/AudioUnit.h>
+
+struct VolumeCatcherStorage;
+
+class VolumeCatcherImpl
+{
+public:
+
+	void setVolume(F32 volume);
+	void setPan(F32 pan);
+	void pump(void);
+	
+	void setDelegateVolume(ComponentInstance delegate);
+	
+	std::list<VolumeCatcherStorage*> mComponentInstances;
+	Component mOriginalDefaultOutput;
+	Component mVolumeAdjuster;
+	
+	static VolumeCatcherImpl *getInstance();
+private:
+	VolumeCatcherImpl();
+	~VolumeCatcherImpl();
+
+	// The component entry point needs to be able to find the instance.
+	static VolumeCatcherImpl *sInstance;
+	
+	F32 mVolume;
+	F32 mPan;
+};
+
+VolumeCatcherImpl *VolumeCatcherImpl::sInstance = NULL;;
+
+struct VolumeCatcherStorage
+{
+	ComponentInstance self;
+	ComponentInstance delegate;
+};
+
+static ComponentResult volume_catcher_component_entry(ComponentParameters *cp, Handle componentStorage);
+static ComponentResult volume_catcher_component_open(VolumeCatcherStorage *storage, ComponentInstance self);
+static ComponentResult volume_catcher_component_close(VolumeCatcherStorage *storage, ComponentInstance self);
+
+VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
+{
+	if(!sInstance)
+	{
+		// The constructor will set up the instance pointer.
+		new VolumeCatcherImpl;
+	}
+	
+	return sInstance;
+}
+
+VolumeCatcherImpl::VolumeCatcherImpl()
+{
+	sInstance = this;
+	
+	mVolume = 1.0;	// default to full volume
+	mPan = 0.5;		// and center pan
+	
+	// Register a component which can delegate 
+	
+	// Capture the default audio output component.
+	ComponentDescription desc;
+	desc.componentType = kAudioUnitType_Output;
+	desc.componentSubType = kAudioUnitSubType_DefaultOutput;
+	desc.componentManufacturer = kAudioUnitManufacturer_Apple;
+	desc.componentFlags = 0;
+	desc.componentFlagsMask = 0;
+	
+	// Find the original default output component
+	mOriginalDefaultOutput = FindNextComponent(NULL, &desc);
+
+	// Register our own output component with the same parameters
+	mVolumeAdjuster = RegisterComponent(&desc, NewComponentRoutineUPP(volume_catcher_component_entry), 0, NULL, NULL, NULL);
+
+	// Capture the original component, so we always get found instead.
+	CaptureComponent(mOriginalDefaultOutput, mVolumeAdjuster);
+
+}
+
+static ComponentResult volume_catcher_component_entry(ComponentParameters *cp, Handle componentStorage)
+{
+	ComponentResult result = badComponentSelector;
+	VolumeCatcherStorage *storage = (VolumeCatcherStorage*)componentStorage;
+	
+	switch(cp->what)
+	{
+		case kComponentOpenSelect:
+//			std::cerr << "kComponentOpenSelect" << std::endl;
+			result = CallComponentFunctionWithStorageProcInfo((Handle)storage, cp, (ProcPtr)volume_catcher_component_open, uppCallComponentOpenProcInfo);
+		break;
+
+		case kComponentCloseSelect:
+//			std::cerr << "kComponentCloseSelect" << std::endl;
+			result = CallComponentFunctionWithStorageProcInfo((Handle)storage, cp, (ProcPtr)volume_catcher_component_close, uppCallComponentCloseProcInfo);
+			// CallComponentFunctionWithStorageProcInfo
+		break;
+		
+		default:
+//			std::cerr << "Delegating selector: " << cp->what << " to component instance " << storage->delegate << std::endl;
+			result = DelegateComponentCall(cp, storage->delegate);
+		break;
+	}
+	
+	return result;
+}
+
+static ComponentResult volume_catcher_component_open(VolumeCatcherStorage *storage, ComponentInstance self)
+{
+	ComponentResult result = noErr;
+	
+	storage = new VolumeCatcherStorage;
+	SetComponentInstanceStorage(self, (Handle)storage);
+
+	
+	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
+
+	impl->mComponentInstances.push_back(storage);
+	
+	storage->self = self;
+	storage->delegate = NULL;
+
+	result = OpenAComponent(impl->mOriginalDefaultOutput, &(storage->delegate));
+	
+//	std::cerr << "OpenAComponent result = " << result << ", component ref = " << storage->delegate << std::endl;
+
+	impl->setDelegateVolume(storage->delegate);
+
+	return result;
+}
+
+static ComponentResult volume_catcher_component_close(VolumeCatcherStorage *storage, ComponentInstance self)
+{
+	ComponentResult result = noErr;
+	
+	if(storage)
+	{
+		if(storage->delegate)
+		{
+			CloseComponent(storage->delegate);
+			storage->delegate = NULL;
+		}
+		
+		VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
+		impl->mComponentInstances.remove(storage);
+		delete[] storage;
+	}
+		
+	return result;
+}
+
+VolumeCatcherImpl::~VolumeCatcherImpl()
+{
+	// We expect to persist until the process exits.  This should never be called.
+	abort();
+}
+
+void VolumeCatcherImpl::setVolume(F32 volume)
+{
+	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
+	impl->mVolume = volume;
+
+	std::list<VolumeCatcherStorage*>::iterator iter;
+		
+	for(iter = mComponentInstances.begin(); iter != mComponentInstances.end(); ++iter)
+	{
+		impl->setDelegateVolume((*iter)->delegate);
+	}
+}
+
+void VolumeCatcherImpl::setPan(F32 pan)
+{
+	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
+	impl->mPan = pan;
+	
+	// TODO: implement this.
+	// This will probably require adding a "panner" audio unit to the chain somehow.
+	// There's also a "3d mixer" component that we might be able to use...
+}
+
+void VolumeCatcherImpl::pump(void)
+{
+}
+
+void VolumeCatcherImpl::setDelegateVolume(ComponentInstance delegate)
+{
+//	std::cerr << "Setting volume on component instance: " << (delegate) << " to " << mVolume << std::endl;
+		
+	OSStatus err;
+	err = AudioUnitSetParameter(
+			delegate, 
+			kHALOutputParam_Volume, 
+			kAudioUnitScope_Global,
+			0, 
+			mVolume, 
+			0);
+
+	if(err)
+	{
+//		std::cerr << "    AudioUnitSetParameter returned " << err << std::endl;
+	}
+}
+
+/////////////////////////////////////////////////////
+
+VolumeCatcher::VolumeCatcher()
+{
+	pimpl = VolumeCatcherImpl::getInstance();
+}
+
+VolumeCatcher::~VolumeCatcher()
+{
+	// Let the instance persist until exit.
+}
+
+void VolumeCatcher::setVolume(F32 volume)
+{
+	VolumeCatcherImpl::getInstance()->setVolume(volume);
+}
+
+void VolumeCatcher::setPan(F32 pan)
+{
+	VolumeCatcherImpl::getInstance()->setPan(pan);
+}
+
+void VolumeCatcher::pump()
+{
+	VolumeCatcherImpl::getInstance()->pump();
+}
+
-- 
cgit v1.2.3


From c4a7006f027d68a90640ce8dfb72d7dda3de9059 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 11:18:18 -0700
Subject: DA missing translation for Panel_login.xml (already committed to
 viewer-2-0 branch)

---
 indra/newview/skins/default/xui/da/panel_login.xml | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml
index 9276ff3a09..1e60174909 100644
--- a/indra/newview/skins/default/xui/da/panel_login.xml
+++ b/indra/newview/skins/default/xui/da/panel_login.xml
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel name="panel_login">
+	<panel.string name="create_account_url">
+		http://join.secondlife.com/
+	</panel.string>
 	<panel.string name="real_url">
 		http://secondlife.com/app/login/
 	</panel.string>
@@ -12,20 +15,31 @@
 				Fornavn:
 			</text>
 			<line_editor label="Fornavn" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/>
+			<text name="last_name_text">
+				Efternavn:
+			</text>
 			<line_editor label="Efternavn" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/>
+			<text name="password_text">
+				Password:
+			</text>
 			<check_box label="Husk password" name="remember_check"/>
+			<button label="Log på" name="connect_btn"/>
 			<text name="start_location_text">
 				Start ved:
 			</text>
 			<combo_box name="start_location_combo">
+				<combo_box.item label="Min sidste lokation" name="MyLastLocation"/>
 				<combo_box.item label="Hjem" name="MyHome"/>
+				<combo_box.item label="&lt;Indtast regionnavn&gt;" name="Typeregionname"/>
 			</combo_box>
-			<button label="Log på" name="connect_btn"/>
 		</layout_panel>
 		<layout_panel name="links">
 			<text name="create_new_account_text">
 				Opret bruger
 			</text>
+			<text name="forgot_password_text">
+				Glemt navn eller password?
+			</text>
 			<text name="login_help">
 				Hjælp til login
 			</text>
-- 
cgit v1.2.3


From 91e00620d8ac1f57c8e22ca568ba2d0fcd7cbdfc Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Tue, 13 Apr 2010 21:39:13 +0300
Subject: Fixed normal bug  EXT-4915 (Duplicated "Buy" item in object context
 menu).

- Bug was caused by making "Take" menu item from object context menu consistent with the one from Build->Object menu where it was replaced by "Buy" when it was needed. But in object menu we already have "Buy" option at the bottom of the list so we don't need to hide "Take" and show "Buy" instead. Removed appearance of "Buy" instead of "Take" and made "Take" item's behaviour consistent with "Take" from object inspector gear menu.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/227/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/menu_object.xml | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 2c97112e38..8b10c7b049 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -137,27 +137,14 @@
     </menu_item_call>
     </context_menu>
    <menu_item_separator layout="topleft" />
-   <menu_item_call
-    label="Buy"
-    layout="topleft"
-    name="Pie Object Bye">
-      <menu_item_call.on_click
-       function="Tools.BuyOrTake"/>
-      <menu_item_call.on_visible
-       function="Tools.VisibleBuyObject"/>
-      <menu_item_call.on_enable
-       function="Tools.EnableBuyOrTake"/>
-   </menu_item_call>
    <menu_item_call
      label="Take"
      layout="topleft"
      name="Pie Object Take">
       <menu_item_call.on_click
-       function="Tools.BuyOrTake"/>
-      <menu_item_call.on_visible
-       function="Tools.VisibleTakeObject"/>
+       function="Object.Take"/>
       <menu_item_call.on_enable
-       function="Tools.EnableBuyOrTake"/>
+       function="Object.VisibleTake"/>
    </menu_item_call>
    <menu_item_call
    enabled="false"
-- 
cgit v1.2.3


From df39e34a35a2764eafad362ebf73915420fd01e2 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 11:39:24 -0700
Subject: VWR-17950 en_xui_change and remove 'es' override

---
 indra/newview/skins/default/xui/en/floater_windlight_options.xml | 4 ++--
 indra/newview/skins/default/xui/es/floater_windlight_options.xml | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

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 d09a41978d..85a5be369c 100644
--- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
@@ -1132,7 +1132,7 @@
              layout="topleft"
              left_delta="0"
              name="BHText8"
-             top_pad="5"
+             top_pad="8"
              width="10">
                 X
             </text>
@@ -1145,7 +1145,7 @@
              initial_value="0.5"
              layout="topleft"
              left_pad="3"
-             top_pad="6"
+             top_pad="8"
              name="WLCloudDetailX"
              width="200" />
             <text
diff --git a/indra/newview/skins/default/xui/es/floater_windlight_options.xml b/indra/newview/skins/default/xui/es/floater_windlight_options.xml
index 9bc3750951..585a42e429 100644
--- a/indra/newview/skins/default/xui/es/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/es/floater_windlight_options.xml
@@ -157,8 +157,7 @@
 			</text>
 			<button label="?" name="WLCloudScaleHelp"/>
 			<text font="SansSerifSmall" name="WLCloudDetailText">
-				Detalle de las nubes
-(Posición/Densidad)
+				Detalle de las nubes (Posición/Densidad)
 			</text>
 			<button label="?" name="WLCloudDetailHelp"/>
 			<text bottom="-113" name="BHText8">
-- 
cgit v1.2.3


From 93317037ee4ed4aa7155ae9253800f8977224f73 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Tue, 13 Apr 2010 21:51:18 +0300
Subject: Fixed low bug EXT-5844 (Group chat invite appears when voice is
 disabled because connection problem).

- Added additional check for client's voice working properly before inviting to session.

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/228/

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 92b994ad67..10146ee9d3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3077,7 +3077,7 @@ public:
 				return;
 			}
 			
-			if(!LLVoiceClient::voiceEnabled())
+			if(!LLVoiceClient::voiceEnabled() || !LLVoiceClient::getInstance()->voiceWorking())
 			{
 				// Don't display voice invites unless the user has voice enabled.
 				return;
-- 
cgit v1.2.3


From 4c0a3a3e9d601089c3213ad9ccbe6b4c1f66398d Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 11:55:47 -0700
Subject: EXT-6837 en_xui_change partial fix to widen text label width to show
 text, but still need PE fix to redesign/widen border to fit translation in;
 removing old overrides

---
 indra/newview/skins/default/xui/en/floater_day_cycle_options.xml | 2 +-
 indra/newview/skins/default/xui/es/floater_day_cycle_options.xml | 2 +-
 indra/newview/skins/default/xui/it/floater_day_cycle_options.xml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
index 8c5af2283d..c684a1ee77 100644
--- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
@@ -334,7 +334,7 @@
              left="20"
              name="WLCurKeyFrameText"
              top="104"
-             width="150">
+             width="235">
                 Key Frame Settings:
             </text>
             <text
diff --git a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml
index fc2b12d1e4..47ad16b277 100644
--- a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml
@@ -59,7 +59,7 @@
 			</text>
 			<button font="SansSerifSmall" width="96" left="546" label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/>
 			<button font="SansSerifSmall" width="96" left="546" label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/>
-			<text font="SansSerifSmall" name="WLCurKeyFrameText" width="190">
+			<text name="WLCurKeyFrameText">
 				Configuración del fotograma clave:
 			</text>
 			<text name="WLCurKeyTimeText">
diff --git a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml
index 7d50e322c0..808c758bb6 100644
--- a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml
@@ -59,7 +59,7 @@
 			</text>
 			<button font="SansSerifSmall" width="96" left="546" label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/>
 			<button font="SansSerifSmall" width="96" left="546" label="Cancella voce" label_selected="Cancella voce" name="WLDeleteKey"/>
-			<text name="WLCurKeyFrameText" width="210" left="17">
+			<text name="WLCurKeyFrameText">
 				Impostazioni del fotogramma chiave:
 			</text>
 			<text name="WLCurKeyTimeText">
-- 
cgit v1.2.3


From cdd806db4a535a36b7c486b91cc4c70a66e1b27d Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 11:59:37 -0700
Subject: VWR-17953 en_xui_change

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

diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
index c684a1ee77..2c0c8d45b3 100644
--- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
@@ -392,7 +392,7 @@
              left="30"
              name="WLCurKeyTimeText2"
              top="169"
-             width="120">
+             width="185">
                 Key Preset:
             </text>
             <combo_box
-- 
cgit v1.2.3


From d05353fc3997f29bcf55a2fa49936e690b0725de Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 12:28:56 -0700
Subject: remove old overrides; pending proper en_xui_change

---
 indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
index a381f64cd9..e8122108a8 100644
--- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml
@@ -57,8 +57,8 @@
 			<text name="WL12amHash2">
 				|
 			</text>
-			<button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey" width="89" bottom="-45" />
-			<button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89" bottom="-70" />
+			<button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey"/>
+			<button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89"/>
 			<text name="WLCurKeyFrameText" width="170">
 				Réglages des images-clés :
 			</text>
@@ -81,10 +81,10 @@
 			<spinner label="Heure" name="WLLengthOfDayHour" label_width="80" width="74" />
 			<spinner label="Min" name="WLLengthOfDayMin" />
 			<spinner label="S" name="WLLengthOfDaySec" label_width="10" width="50" left_delta="95"/>
-			<text name="DayCycleText3" left="280" width="200">
+			<text name="DayCycleText3">
 				Prévisualiser :
 			</text>
-			<button label="Lire" label_selected="Lire" name="WLAnimSky" left_delta="90"/>
+			<button label="Lire" label_selected="Lire" name="WLAnimSky"/>
 			<button label="Stop !" label_selected="Stop" name="WLStopAnimSky" />
 			<button label="Utiliser heure domaine" label_selected="Aller heure domaine"
 			     name="WLUseLindenTime" />
-- 
cgit v1.2.3


From 8fa23739a1409d8e93252985d7f5951f518cdb21 Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Tue, 13 Apr 2010 13:18:54 -0700
Subject: Fix for EXT-6750 (disabled attachment media still plays).

LLViewerMediaImpl::shouldShowBasedOnClass() was always returning true for focused media.  This was incorrect, since it made click-focusing on media override the class-based disable preferences.

Reviewed by Callum at http://codereview.lindenlab.com/1178023
---
 indra/newview/llviewermedia.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 0f5a984188..6ff46222ff 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2985,8 +2985,9 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
 	//	" outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << llendl;
 	
 	// If it has focus, we should show it
-	if (hasFocus())
-		return true;
+	// This is incorrect, and causes EXT-6750 (disabled attachment media still plays)
+//	if (hasFocus())
+//		return true;
 	
 	// If it is attached to an avatar and the pref is off, we shouldn't show it
 	if (attached_to_another_avatar)
-- 
cgit v1.2.3


From 88782e75462ac3a959a59be97ff50b5fc34aabb9 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 13 Apr 2010 16:36:48 -0400
Subject: EXT-6840 : Miscellaneous Avatar Debug Textures Floater improvements

Changed "Debug" into "Debug Textures" on right-click menu.
Added "Debug Textures" to right-click menu for self (so you don't need to CTRL+SHIFT+ALT+A).
Prettied up the dump textures console output.
Fixed a bug where component textures for yourself were showing up when viewing others (you shouldn't see any component textures when viewing others).
Enlarged debug textures floater a bit.
---
 indra/newview/llfloateravatartextures.cpp          | 45 +++++++++++++---------
 indra/newview/lltexlayer.cpp                       |  8 ++--
 .../default/xui/en/floater_avatar_textures.xml     |  4 +-
 .../skins/default/xui/en/menu_attachment_other.xml |  2 +-
 .../skins/default/xui/en/menu_attachment_self.xml  |  9 ++++-
 .../skins/default/xui/en/menu_avatar_other.xml     |  2 +-
 .../skins/default/xui/en/menu_avatar_self.xml      |  8 ++++
 .../default/xui/en/menu_inspect_avatar_gear.xml    |  2 +-
 .../default/xui/en/menu_inspect_self_gear.xml      |  8 ++++
 9 files changed, 60 insertions(+), 28 deletions(-)

diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 18db60705b..deef85cc6c 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -38,7 +38,7 @@
 #include "lltexturectrl.h"
 #include "lluictrlfactory.h"
 #include "llviewerobjectlist.h"
-#include "llvoavatar.h"
+#include "llvoavatarself.h"
 
 using namespace LLVOAvatarDefines;
 
@@ -82,14 +82,17 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
 	const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture(te);
 	if (tex_entry->mIsLocalTexture)
 	{
-		const EWearableType wearable_type = tex_entry->mWearableType;
-		LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
-		if (wearable)
+		if (avatarp->isSelf())
 		{
-			LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
-			if (lto)
+			const EWearableType wearable_type = tex_entry->mWearableType;
+			LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+			if (wearable)
 			{
-				id = lto->getID();
+				LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
+				if (lto)
+				{
+					id = lto->getID();
+				}
 			}
 		}
 	}
@@ -101,12 +104,12 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
 	if (id == IMG_DEFAULT_AVATAR)
 	{
 		ctrl->setImageAssetID(LLUUID::null);
-		ctrl->setToolTip(std::string("IMG_DEFAULT_AVATAR"));
+		ctrl->setToolTip(tex_entry->mName + " : " + std::string("IMG_DEFAULT_AVATAR"));
 	}
 	else
 	{
 		ctrl->setImageAssetID(id);
-		ctrl->setToolTip(id.asString());
+		ctrl->setToolTip(tex_entry->mName + " : " + id.asString());
 	}
 }
 
@@ -160,37 +163,43 @@ void LLFloaterAvatarTextures::onClickDump(void* data)
 		LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data;
 		LLVOAvatar* avatarp = find_avatar(self->mID);
 		if (!avatarp) return;
-
 		for (S32 i = 0; i < avatarp->getNumTEs(); i++)
 		{
 			const LLTextureEntry* te = avatarp->getTE(i);
 			if (!te) continue;
 
+			const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)(i));
+			if (!tex_entry)
+				continue;
+
 			if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i))
 			{
 				LLUUID id = IMG_DEFAULT_AVATAR;
 				EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i);
-				LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
-				if (wearable)
+				if (avatarp->isSelf())
 				{
-					LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
-					if (lto)
+					LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+					if (wearable)
 					{
-						id = lto->getID();
+						LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
+						if (lto)
+						{
+							id = lto->getID();
+						}
 					}
 				}
 				if (id != IMG_DEFAULT_AVATAR)
 				{
-					llinfos << "Avatar TE " << i << " id " << id << llendl;
+					llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl;
 				}
 				else
 				{
-					llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl;
+					llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << llendl;
 				}
 			}
 			else
 			{
-				llinfos << "Avatar TE " << i << " id " << te->getID() << llendl;
+				llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl;
 			}
 		}
 	}
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 3f4dab4fea..e489a12513 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -166,12 +166,13 @@ void LLTexLayerSetBuffer::popProjection() const
 
 BOOL LLTexLayerSetBuffer::needsRender()
 {
-	const LLVOAvatarSelf* avatar = mTexLayerSet->getAvatar();
+	llassert(mTexLayerSet->getAvatar() == gAgentAvatarp);
+	if (!isAgentAvatarValid()) return FALSE;
 	BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries();
-	BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
+	BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating;
 	if (needs_update)
 	{
-		BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT);
+		BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT);
 		if (invalid_skirt)
 		{
 			// we were trying to create a skirt texture
@@ -181,7 +182,6 @@ BOOL LLTexLayerSetBuffer::needsRender()
 		}
 		else
 		{
-			needs_update &= (avatar->isSelf() || (avatar->isVisible() && !avatar->isCulled()));
 			needs_update &= mTexLayerSet->isLocalTextureDataAvailable();
 		}
 	}
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
index 54b6edb0ec..e30e958543 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
  legacy_header_height="18"
- height="650"
+ height="660"
  layout="topleft"
  name="avatar_texture_debug"
  help_topic="avatar_texture_debug"
  title="AVATAR TEXTURES"
- width="1250">
+ width="1253">
     <floater.string
      name="InvalidAvatar">
         INVALID AVATAR
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index c5b31c7f63..b46b62ec4d 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -72,7 +72,7 @@
              function="Avatar.EnableFreezeEject"/>
         </menu_item_call>
         <menu_item_call
-         label="Debug"
+         label="Debug Textures"
          name="Debug...">
             <menu_item_call.on_click
              function="Avatar.Debug" />
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 281ec5a7c3..5c30b9ee94 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -99,5 +99,12 @@
          function="ShowAgentProfile"
          parameter="agent" />
     </menu_item_call>
-    
+  <menu_item_call
+ label="Debug Textures"
+     name="Debug...">
+    <menu_item_call.on_click
+     function="Avatar.Debug" />
+    <menu_item_call.on_visible
+     function="IsGodCustomerService"/>
+  </menu_item_call>
 </context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index ac9101cfd9..276b5f106f 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -72,7 +72,7 @@
              function="Avatar.EnableFreezeEject"/>
         </menu_item_call>
         <menu_item_call
-         label="Debug"
+         label="Debug Textures"
          name="Debug...">
             <menu_item_call.on_click
              function="Avatar.Debug" />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index 1e32cfd9df..a21c1ac44b 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -215,4 +215,12 @@
          function="ShowAgentProfile"
          parameter="agent" />
     </menu_item_call>
+    <menu_item_call
+		 label="Debug Textures"
+         name="Debug...">
+            <menu_item_call.on_click
+             function="Avatar.Debug" />
+            <menu_item_call.on_visible
+             function="IsGodCustomerService"/>
+    </menu_item_call>
 </context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index a5ac5f76e1..334decdf58 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -89,7 +89,7 @@
      function="InspectAvatar.VisibleFreezeEject"/>
   </menu_item_call>
   <menu_item_call
-   label="Debug"
+   label="Debug Textures"
    name="debug">
     <menu_item_call.on_click
      function="Avatar.Debug"/>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index 9dc2611663..03bd93e271 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -45,4 +45,12 @@
      function="SideTray.PanelPeopleTab"
      parameter="groups_panel" />
   </menu_item_call>
+  <menu_item_call
+ label="Debug Textures"
+     name="Debug...">
+    <menu_item_call.on_click
+     function="Avatar.Debug" />
+    <menu_item_call.on_visible
+     function="IsGodCustomerService"/>
+  </menu_item_call>
 </menu>
-- 
cgit v1.2.3


From 52913616ffb1bc16e1f095098d8d70defe99f955 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 14:16:09 -0700
Subject: VWR-17955 en_xui_change; remove old override

---
 indra/newview/skins/default/xui/en/floater_perm_prefs.xml | 2 +-
 indra/newview/skins/default/xui/fr/floater_perm_prefs.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
index 4909b8988f..ff454e3ebf 100644
--- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
+++ b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
@@ -44,7 +44,7 @@
          left_delta="0"
          name="NextOwnerLabel"
          top_pad="5"
-         width="150">
+         width="200">
             Next owner can:
         </text>
         <check_box
diff --git a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml
index fd569a7f95..36bec80561 100644
--- a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml
+++ b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml
@@ -4,7 +4,7 @@
 		<button label="?" label_selected="?" name="help"/>
 		<check_box label="Partager avec le groupe" name="share_with_group"/>
 		<check_box label="Autoriser tout le monde à copier" name="everyone_copy"/>
-		<text name="NextOwnerLabel" width="260">
+		<text name="NextOwnerLabel">
 			Le prochain propriétaire pourra :
 		</text>
 		<check_box label="Modifier" name="next_owner_modify"/>
-- 
cgit v1.2.3


From 3a1a43bfa685285e017d74a5156fd23e883aee8d Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Tue, 13 Apr 2010 14:33:01 -0700
Subject: VWR-18599 en_xui_change

---
 indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index eb2112c586..3ef16d2dec 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -342,7 +342,7 @@
      layout="topleft"
      left="30"
      height="20"
-     width="120"
+     width="170"
      top_pad="20">
      Show IMs in:
     </text>
@@ -351,9 +351,9 @@
      follows="left|top"
      layout="topleft"
      top_delta="0" 
-     left="120" 
+     left="170" 
   	 height="20"
-	   width="100"
+	   width="130"
      text_color="White_25"
 	  >
       (requires restart)
-- 
cgit v1.2.3


From d7e4fa17e80072d609aaadaf060ee8f51f1069eb Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Tue, 13 Apr 2010 15:16:03 -0700
Subject: Minor cleanup in mac_volume_catcher.cpp.

---
 indra/media_plugins/webkit/mac_volume_catcher.cpp | 100 +++++++++++-----------
 1 file changed, 49 insertions(+), 51 deletions(-)

diff --git a/indra/media_plugins/webkit/mac_volume_catcher.cpp b/indra/media_plugins/webkit/mac_volume_catcher.cpp
index 03249f9e83..9788f10a58 100644
--- a/indra/media_plugins/webkit/mac_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/mac_volume_catcher.cpp
@@ -52,9 +52,8 @@ public:
 
 	void setVolume(F32 volume);
 	void setPan(F32 pan);
-	void pump(void);
 	
-	void setDelegateVolume(ComponentInstance delegate);
+	void setInstanceVolume(VolumeCatcherStorage *instance);
 	
 	std::list<VolumeCatcherStorage*> mComponentInstances;
 	Component mOriginalDefaultOutput;
@@ -62,12 +61,14 @@ public:
 	
 	static VolumeCatcherImpl *getInstance();
 private:
+	// This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance.
 	VolumeCatcherImpl();
-	~VolumeCatcherImpl();
-
-	// The component entry point needs to be able to find the instance.
 	static VolumeCatcherImpl *sInstance;
 	
+	// The singlar instance of this class is expected to last until the process exits.
+	// To ensure this, we declare the destructor here but never define it, so any code which attempts to destroy the instance will not link.
+	~VolumeCatcherImpl();	
+	
 	F32 mVolume;
 	F32 mPan;
 };
@@ -88,8 +89,7 @@ VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
 {
 	if(!sInstance)
 	{
-		// The constructor will set up the instance pointer.
-		new VolumeCatcherImpl;
+		sInstance = new VolumeCatcherImpl;
 	}
 	
 	return sInstance;
@@ -97,14 +97,9 @@ VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
 
 VolumeCatcherImpl::VolumeCatcherImpl()
 {
-	sInstance = this;
-	
 	mVolume = 1.0;	// default to full volume
 	mPan = 0.5;		// and center pan
-	
-	// Register a component which can delegate 
-	
-	// Capture the default audio output component.
+		
 	ComponentDescription desc;
 	desc.componentType = kAudioUnitType_Output;
 	desc.componentSubType = kAudioUnitSubType_DefaultOutput;
@@ -153,23 +148,33 @@ static ComponentResult volume_catcher_component_entry(ComponentParameters *cp, H
 static ComponentResult volume_catcher_component_open(VolumeCatcherStorage *storage, ComponentInstance self)
 {
 	ComponentResult result = noErr;
+	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
 	
 	storage = new VolumeCatcherStorage;
-	SetComponentInstanceStorage(self, (Handle)storage);
 
-	
-	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
-
-	impl->mComponentInstances.push_back(storage);
-	
 	storage->self = self;
 	storage->delegate = NULL;
 
 	result = OpenAComponent(impl->mOriginalDefaultOutput, &(storage->delegate));
 	
-//	std::cerr << "OpenAComponent result = " << result << ", component ref = " << storage->delegate << std::endl;
+	if(result != noErr)
+	{
+//		std::cerr << "OpenAComponent result = " << result << ", component ref = " << storage->delegate << std::endl;
+		
+		// If we failed to open the delagate component, our open is going to fail.  Clean things up.
+		delete storage;
+	}
+	else
+	{
+		// Success -- set up this component's storage
+		SetComponentInstanceStorage(self, (Handle)storage);
 
-	impl->setDelegateVolume(storage->delegate);
+		// add this instance to the global list
+		impl->mComponentInstances.push_back(storage);	
+		
+		// and set up the initial volume
+		impl->setInstanceVolume(storage);
+	}
 
 	return result;
 }
@@ -194,22 +199,15 @@ static ComponentResult volume_catcher_component_close(VolumeCatcherStorage *stor
 	return result;
 }
 
-VolumeCatcherImpl::~VolumeCatcherImpl()
-{
-	// We expect to persist until the process exits.  This should never be called.
-	abort();
-}
-
 void VolumeCatcherImpl::setVolume(F32 volume)
 {
 	VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();	
 	impl->mVolume = volume;
-
-	std::list<VolumeCatcherStorage*>::iterator iter;
-		
-	for(iter = mComponentInstances.begin(); iter != mComponentInstances.end(); ++iter)
+	
+	// Iterate through all known instances, setting the volume on each.
+	for(std::list<VolumeCatcherStorage*>::iterator iter = mComponentInstances.begin(); iter != mComponentInstances.end(); ++iter)
 	{
-		impl->setDelegateVolume((*iter)->delegate);
+		impl->setInstanceVolume(*iter);
 	}
 }
 
@@ -223,23 +221,23 @@ void VolumeCatcherImpl::setPan(F32 pan)
 	// There's also a "3d mixer" component that we might be able to use...
 }
 
-void VolumeCatcherImpl::pump(void)
-{
-}
-
-void VolumeCatcherImpl::setDelegateVolume(ComponentInstance delegate)
+void VolumeCatcherImpl::setInstanceVolume(VolumeCatcherStorage *instance)
 {
-//	std::cerr << "Setting volume on component instance: " << (delegate) << " to " << mVolume << std::endl;
-		
-	OSStatus err;
-	err = AudioUnitSetParameter(
-			delegate, 
-			kHALOutputParam_Volume, 
-			kAudioUnitScope_Global,
-			0, 
-			mVolume, 
-			0);
-
+//	std::cerr << "Setting volume on component instance: " << (instance->delegate) << " to " << mVolume << std::endl;
+	
+	OSStatus err = noErr;
+	
+	if(instance && instance->delegate)
+	{
+		err = AudioUnitSetParameter(
+				instance->delegate, 
+				kHALOutputParam_Volume, 
+				kAudioUnitScope_Global,
+				0, 
+				mVolume, 
+				0);
+	}
+	
 	if(err)
 	{
 //		std::cerr << "    AudioUnitSetParameter returned " << err << std::endl;
@@ -260,16 +258,16 @@ VolumeCatcher::~VolumeCatcher()
 
 void VolumeCatcher::setVolume(F32 volume)
 {
-	VolumeCatcherImpl::getInstance()->setVolume(volume);
+	pimpl->setVolume(volume);
 }
 
 void VolumeCatcher::setPan(F32 pan)
 {
-	VolumeCatcherImpl::getInstance()->setPan(pan);
+	pimpl->setPan(pan);
 }
 
 void VolumeCatcher::pump()
 {
-	VolumeCatcherImpl::getInstance()->pump();
+	// No periodic tasks are necessary for this implementation.
 }
 
-- 
cgit v1.2.3


From 7e210d185f9b5bccdeb108e79b97a7a1a44b4374 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Tue, 13 Apr 2010 18:07:24 -0700
Subject: fix for	EXT-6317 and EXT-2418 regressions in installed viewers
 new 32-bit mouse cursors were not getting packaged by installer for windows
 builds

reviewed by Monroe
---
 indra/llwindow/llwindowwin32.cpp |   6 +++---
 indra/newview/res/toolbuy.cur    | Bin 4286 -> 0 bytes
 indra/newview/res/toolopen.cur   | Bin 4286 -> 0 bytes
 indra/newview/res/toolsit.cur    | Bin 4286 -> 0 bytes
 indra/newview/res/viewerRes.rc   |   3 ---
 5 files changed, 3 insertions(+), 6 deletions(-)
 delete mode 100644 indra/newview/res/toolbuy.cur
 delete mode 100644 indra/newview/res/toolopen.cur
 delete mode 100644 indra/newview/res/toolsit.cur

diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 8df9dad581..13e71ed936 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1548,9 +1548,9 @@ void LLWindowWin32::initCursors()
 	// Color cursors
 	gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "res", "toolbuy.cur");
 
-	mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolsit.cur").c_str());
-	mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolbuy.cur").c_str());
-	mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolopen.cur").c_str());
+	mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolsit.cur")).c_str());
+	mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolbuy.cur")).c_str());
+	mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolopen.cur")).c_str());
 	mCursor[UI_CURSOR_TOOLPLAY] = loadColorCursor(TEXT("TOOLPLAY"));
 	mCursor[UI_CURSOR_TOOLPAUSE] = loadColorCursor(TEXT("TOOLPAUSE"));
 	mCursor[UI_CURSOR_TOOLMEDIAOPEN] = loadColorCursor(TEXT("TOOLMEDIAOPEN"));
diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur
deleted file mode 100644
index 7fd552a78e..0000000000
Binary files a/indra/newview/res/toolbuy.cur and /dev/null differ
diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur
deleted file mode 100644
index 1562f5bc95..0000000000
Binary files a/indra/newview/res/toolopen.cur and /dev/null differ
diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur
deleted file mode 100644
index a1f99cfe6d..0000000000
Binary files a/indra/newview/res/toolsit.cur and /dev/null differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 7a965cf57e..3a20d91129 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -119,9 +119,6 @@ TOOLPIPETTE             CURSOR                  "toolpipette.cur"
 TOOLPLAY                CURSOR                  "toolplay.cur"
 TOOLPAUSE               CURSOR                  "toolpause.cur"
 TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
-TOOLOPEN                CURSOR                  "toolopen.cur"
-TOOLSIT                 CURSOR                  "toolsit.cur"
-TOOLBUY                 CURSOR                  "toolbuy.cur"
 
 /////////////////////////////////////////////////////////////////////////////
 //
-- 
cgit v1.2.3


From 5e34a91ce65bbd74834ae012552b3ebe8592fe9a Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Wed, 14 Apr 2010 12:17:47 +0300
Subject: Fixed  normal bug EXT-4301 (PDD: Dial-in to a PSTN bridge shows
 "(???) (???)" for the name.)

* Implementation notes:
** special item is cloned from VCP to be used in LLAvatarList to reflect an Avaline caller.
** LLAvatarList extended to create instances of Avaline Caller
** Participant list now determines type of adding session participant (Avatar/Avaline Caller) and selects a way item will be created in avatar list

* Implementation behavior:
** The problem is when Avaline caller ends a call it is removed from Voice Client session but
   still exists in LLSpeakerMgr. Server does not send such information.
   HUCK was implemented to notify subscribers that Avaline callers are not anymore in the voice call.
** For now Avaline Caller is removed from the LLSpeakerMgr List when it is removed from the Voice Client session.
   This happens in two cases: if Avaline Caller ends call itself or if Resident ends group call.

** If Resident joins group call where Avaline caller already exists that caller will appear in Resident's viewer (VCP & Group IM window)
** The callers are displayed as "AvaLine Caller 1", "AvaLine Caller 2" etc.

* Known issues:
** LLNonAvatarCaller should be removed from VCP (for avaline p2p calls). Updated Avatar & Participant Lists can be used instead of it.
    Separate ticket will be opened to refactor this code.

--HG--
branch : product-engine
---
 indra/newview/llavatarlist.cpp                 |  75 +++++++++
 indra/newview/llavatarlist.h                   |  25 +++
 indra/newview/llavatarlistitem.cpp             |  12 +-
 indra/newview/llavatarlistitem.h               |   2 +-
 indra/newview/llparticipantlist.cpp            | 210 ++++++++++++++++++++++++-
 indra/newview/llparticipantlist.h              |   5 +
 indra/newview/llspeakers.h                     |   8 +
 indra/newview/skins/default/xui/en/strings.xml |   2 +
 8 files changed, 332 insertions(+), 7 deletions(-)

diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 407c5b6153..c7a5691d70 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -32,13 +32,18 @@
 
 #include "llviewerprecompiledheaders.h"
 
+// common
+#include "lltrans.h"
+
 #include "llavatarlist.h"
 #include "llagentdata.h" // for comparator
 
 // newview
+#include "llavatariconctrl.h"
 #include "llcallingcard.h" // for LLAvatarTracker
 #include "llcachename.h"
 #include "llrecentpeople.h"
+#include "lltextutil.h"
 #include "lluuid.h"
 #include "llvoiceclient.h"
 #include "llviewercontrol.h"	// for gSavedSettings
@@ -193,6 +198,18 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/)
 	}
 }
 
+void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name)
+{
+	LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL;
+	LLAvalineListItem* item = new LLAvalineListItem;
+	item->setAvatarId(item_id, session_id, true, false);
+	item->setName(item_name);
+
+	addItem(item, item_id);
+	mIDs.push_back(item_id);
+	sort();
+}
+
 //////////////////////////////////////////////////////////////////////////
 // PROTECTED SECTION
 //////////////////////////////////////////////////////////////////////////
@@ -471,3 +488,61 @@ bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_
 	}
 	return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2);
 }
+
+/************************************************************************/
+/*             class LLAvalineListItem                                  */
+/************************************************************************/
+LLAvalineListItem::LLAvalineListItem(bool hide_number/* = true*/) : LLAvatarListItem(false)
+, mIsHideNumber(hide_number)
+{
+	// should not use buildPanel from the base class to ensure LLAvalineListItem::postBuild is called.
+	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml");
+}
+
+BOOL LLAvalineListItem::postBuild()
+{
+	BOOL rv = LLAvatarListItem::postBuild();
+
+	if (rv)
+	{
+		setOnline(true);
+		showLastInteractionTime(false);
+		setShowProfileBtn(false);
+		setShowInfoBtn(false);
+		mAvatarIcon->setValue("Avaline_Icon");
+		mAvatarIcon->setToolTip(std::string(""));
+	}
+	return rv;
+}
+
+// to work correctly this method should be called AFTER setAvatarId for avaline callers with hidden phone number
+void LLAvalineListItem::setName(const std::string& name)
+{
+	if (mIsHideNumber)
+	{
+		static U32 order = 0;
+		typedef std::map<LLUUID, U32> avaline_callers_nums_t;
+		static avaline_callers_nums_t mAvalineCallersNums;
+
+		llassert(getAvatarId() != LLUUID::null);
+
+		const LLUUID &uuid = getAvatarId();
+
+		if (mAvalineCallersNums.find(uuid) == mAvalineCallersNums.end())
+		{
+			mAvalineCallersNums[uuid] = ++order;
+			LL_DEBUGS("Avaline") << "Set name for new avaline caller: " << uuid << ", order: " << order << LL_ENDL;
+		}
+		LLStringUtil::format_map_t args;
+		args["[ORDER]"] = llformat("%u", mAvalineCallersNums[uuid]);
+		std::string hidden_name = LLTrans::getString("AvalineCaller", args);
+
+		LL_DEBUGS("Avaline") << "Avaline caller: " << uuid << ", name: " << hidden_name << LL_ENDL;
+		LLAvatarListItem::setName(hidden_name);
+	}
+	else
+	{
+		const std::string& formatted_phone = LLTextUtil::formatPhoneNumber(name);
+		LLAvatarListItem::setName(formatted_phone);
+	}
+}
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 0203617867..528f796b8b 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -96,6 +96,8 @@ public:
 
 	virtual S32 notifyParent(const LLSD& info);
 
+	void addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name);
+
 protected:
 	void refresh();
 
@@ -175,4 +177,27 @@ protected:
 	virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const;
 };
 
+/**
+ * Represents Avaline caller in Avatar list in Voice Control Panel and group chats.
+ */
+class LLAvalineListItem : public LLAvatarListItem
+{
+public:
+
+	/**
+	 * Constructor
+	 *
+	 * @param hide_number - flag indicating if number should be hidden.
+	 *		In this case It will be shown as "Avaline Caller 1", "Avaline Caller 1", etc.
+	 */
+	LLAvalineListItem(bool hide_number = true);
+
+	/*virtual*/ BOOL postBuild();
+
+	/*virtual*/ void setName(const std::string& name);
+
+private:
+	bool mIsHideNumber;
+};
+
 #endif // LL_LLAVATARLIST_H
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 44f88cce29..2a51eeacfc 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -212,21 +212,25 @@ void LLAvatarListItem::setState(EItemState item_style)
 	mAvatarIcon->setColor(item_icon_color_map[item_style]);
 }
 
-void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes)
+void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes/* = false*/, bool is_resident/* = true*/)
 {
 	if (mAvatarId.notNull())
 		LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this);
 
 	mAvatarId = id;
-	mAvatarIcon->setValue(id);
 	mSpeakingIndicator->setSpeakerId(id, session_id);
 
 	// We'll be notified on avatar online status changes
 	if (!ignore_status_changes && mAvatarId.notNull())
 		LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this);
 
-	// Set avatar name.
-	gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3));
+	if (is_resident)
+	{
+		mAvatarIcon->setValue(id);
+
+		// Set avatar name.
+		gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3));
+	}
 }
 
 void LLAvatarListItem::showLastInteractionTime(bool show)
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 2db6484a30..3ba2c7a3e3 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -100,7 +100,7 @@ public:
 	void setName(const std::string& name);
 	void setHighlight(const std::string& highlight);
 	void setState(EItemState item_style);
-	void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false);
+	void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false, bool is_resident = true);
 	void setLastInteractionTime(U32 secs_since);
 	//Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly
 	void setShowProfileBtn(bool show);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 026be882ed..53f92f7ad1 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -50,6 +50,145 @@
 
 static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR;
 
+// See EXT-4301.
+/**
+ * class LLAvalineUpdater - observe the list of voice participants in session and check
+ *  presence of Avaline Callers among them.
+ *
+ * LLAvalineUpdater is a LLVoiceClientParticipantObserver. It provides two kinds of validation:
+ *	- whether Avaline caller presence among participants;
+ *	- whether watched Avaline caller still exists in voice channel.
+ * Both validations have callbacks which will notify subscriber if any of event occur.
+ *
+ * @see findAvalineCaller()
+ * @see checkIfAvalineCallersExist()
+ */
+class LLAvalineUpdater : public LLVoiceClientParticipantObserver
+{
+public:
+	typedef boost::function<void(const LLUUID& speaker_id)> process_avaline_callback_t;
+
+	LLAvalineUpdater(process_avaline_callback_t found_cb, process_avaline_callback_t removed_cb)
+		: mAvalineFoundCallback(found_cb)
+		, mAvalineRemovedCallback(removed_cb)
+	{
+		LLVoiceClient::getInstance()->addObserver(this);
+	}
+	~LLAvalineUpdater()
+	{
+		if (LLVoiceClient::instanceExists())
+		{
+			LLVoiceClient::getInstance()->removeObserver(this);
+		}
+	}
+
+	/**
+	 * Adds UUID of Avaline caller to watch.
+	 *
+	 * @see checkIfAvalineCallersExist().
+	 */
+	void watchAvalineCaller(const LLUUID& avaline_caller_id)
+	{
+		mAvalineCallers.insert(avaline_caller_id);
+	}
+
+	void onChange()
+	{
+		uuid_set_t participant_uuids;
+		LLVoiceClient::getInstance()->getParticipantsUUIDSet(participant_uuids);
+
+
+		// check whether Avaline caller exists among voice participants
+		// and notify Participant List
+		findAvalineCaller(participant_uuids);
+
+		// check whether watched Avaline callers still present among voice participant
+		// and remove if absents.
+		checkIfAvalineCallersExist(participant_uuids);
+	}
+
+private:
+	typedef std::set<LLUUID> uuid_set_t;
+
+	/**
+	 * Finds Avaline callers among voice participants and calls mAvalineFoundCallback.
+	 *
+	 * When Avatar is in group call with Avaline caller and then ends call Avaline caller stays
+	 * in Group Chat floater (exists in LLSpeakerMgr). If Avatar starts call with that group again
+	 * Avaline caller is added to voice channel AFTER Avatar is connected to group call.
+	 * But Voice Control Panel (VCP) is filled from session LLSpeakerMgr and there is no information
+	 * if a speaker is Avaline caller.
+	 *
+	 * In this case this speaker is created as avatar and will be recreated when it appears in
+	 * Avatar's Voice session.
+	 *
+	 * @see LLParticipantList::onAvalineCallerFound()
+	 */
+	void findAvalineCaller(const uuid_set_t& participant_uuids)
+	{
+		uuid_set_t::const_iterator it = participant_uuids.begin(), it_end = participant_uuids.end();
+
+		for(; it != it_end; ++it)
+		{
+			const LLUUID& participant_id = *it;
+			if (!LLVoiceClient::getInstance()->isParticipantAvatar(participant_id))
+			{
+				LL_DEBUGS("Avaline") << "Avaline caller found among voice participants: " << participant_id << LL_ENDL;
+
+				if (mAvalineFoundCallback)
+				{
+					mAvalineFoundCallback(participant_id);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Finds Avaline callers which are not anymore among voice participants and calls mAvalineRemovedCallback.
+	 *
+	 * The problem is when Avaline caller ends a call it is removed from Voice Client session but
+	 * still exists in LLSpeakerMgr. Server does not send such information.
+	 * This method implements a HUCK to notify subscribers that watched Avaline callers by class
+	 * are not anymore in the call.
+	 *
+	 * @see LLParticipantList::onAvalineCallerRemoved()
+	 */
+	void checkIfAvalineCallersExist(const uuid_set_t& participant_uuids)
+	{
+		uuid_set_t::iterator it = mAvalineCallers.begin();
+		uuid_set_t::const_iterator participants_it_end = participant_uuids.end();
+
+		while (it != mAvalineCallers.end())
+		{
+			const LLUUID participant_id = *it;
+			LL_DEBUGS("Avaline") << "Check avaline caller: " << participant_id << LL_ENDL;
+			bool not_found = participant_uuids.find(participant_id) == participants_it_end;
+			if (not_found)
+			{
+				LL_DEBUGS("Avaline") << "Watched Avaline caller is not found among voice participants: " << participant_id << LL_ENDL;
+
+				// notify Participant List
+				if (mAvalineRemovedCallback)
+				{
+					mAvalineRemovedCallback(participant_id);
+				}
+
+				// remove from the watch list
+				mAvalineCallers.erase(it++);
+			}
+			else
+			{
+				++it;
+			}
+		}
+	}
+
+	process_avaline_callback_t mAvalineFoundCallback;
+	process_avaline_callback_t mAvalineRemovedCallback;
+
+	uuid_set_t mAvalineCallers;
+};
+
 LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list,  bool use_context_menu/* = true*/,
 		bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/):
 	mSpeakerMgr(data_source),
@@ -59,6 +198,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
 ,	mExcludeAgent(exclude_agent)
 ,	mValidateSpeakerCallback(NULL)
 {
+	mAvalineUpdater = new LLAvalineUpdater(boost::bind(&LLParticipantList::onAvalineCallerFound, this, _1),
+		boost::bind(&LLParticipantList::onAvalineCallerRemoved, this, _1));
+
 	mSpeakerAddListener = new SpeakerAddListener(*this);
 	mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
 	mSpeakerClearListener = new SpeakerClearListener(*this);
@@ -137,6 +279,9 @@ LLParticipantList::~LLParticipantList()
 	}
 
 	mAvatarList->setContextMenu(NULL);
+	mAvatarList->setComparator(NULL);
+
+	delete mAvalineUpdater;
 }
 
 void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
@@ -210,6 +355,55 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
 	}
 }
 
+/*
+Seems this method is not necessary after onAvalineCallerRemoved was implemented;
+
+It does nothing because list item is always created with correct class type for Avaline caller.
+For now Avaline Caller is removed from the LLSpeakerMgr List when it is removed from the Voice Client
+session.
+This happens in two cases: if Avaline Caller ends call itself or if Resident ends group call.
+
+Probably Avaline caller should be removed from the LLSpeakerMgr list ONLY if it ends call itself.
+Asked in EXT-4301.
+*/
+void LLParticipantList::onAvalineCallerFound(const LLUUID& participant_id)
+{
+	LLPanel* item = mAvatarList->getItemByValue(participant_id);
+
+	if (NULL == item)
+	{
+		LL_WARNS("Avaline") << "Something wrong. Unable to find item for: " << participant_id << LL_ENDL;
+		return;
+	}
+
+	if (typeid(*item) == typeid(LLAvalineListItem))
+	{
+		LL_DEBUGS("Avaline") << "Avaline caller has already correct class type for: " << participant_id << LL_ENDL;
+		// item representing an Avaline caller has a correct type already.
+		return;
+	}
+
+	LL_DEBUGS("Avaline") << "remove item from the list and re-add it: " << participant_id << LL_ENDL;
+
+	// remove UUID from LLAvatarList::mIDs to be able add it again.
+	uuid_vec_t& ids = mAvatarList->getIDs();
+	uuid_vec_t::iterator pos = std::find(ids.begin(), ids.end(), participant_id);
+	ids.erase(pos);
+
+	// remove item directly
+	mAvatarList->removeItem(item);
+
+	// re-add avaline caller with a correct class instance.
+	addAvatarIDExceptAgent(participant_id);
+}
+
+void LLParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id)
+{
+	LL_DEBUGS("Avaline") << "Removing avaline caller from the list: " << participant_id << LL_ENDL;
+
+	mSpeakerMgr->removeAvalineSpeaker(participant_id);
+}
+
 void LLParticipantList::setSortOrder(EParticipantSortOrder order)
 {
 	if ( mSortOrder != order )
@@ -355,8 +549,20 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id)
 	if (mExcludeAgent && gAgent.getID() == avatar_id) return;
 	if (mAvatarList->contains(avatar_id)) return;
 
-	mAvatarList->getIDs().push_back(avatar_id);
-	mAvatarList->setDirty();
+	bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(avatar_id);
+
+	if (is_avatar)
+	{
+		mAvatarList->getIDs().push_back(avatar_id);
+		mAvatarList->setDirty();
+	}
+	else
+	{
+		LLVoiceClient::participantState *participant = LLVoiceClient::getInstance()->findParticipantByID(avatar_id);
+
+		mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), participant ? participant->mAccountName : LLTrans::getString("AvatarNameWaiting"));
+		mAvalineUpdater->watchAvalineCaller(avatar_id);
+	}
 	adjustParticipant(avatar_id);
 }
 
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 953dff4551..9e5a2cbc1f 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -38,6 +38,7 @@
 class LLSpeakerMgr;
 class LLAvatarList;
 class LLUICtrl;
+class LLAvalineUpdater;
 
 class LLParticipantList
 {
@@ -235,6 +236,9 @@ class LLParticipantList
 		void onAvatarListDoubleClicked(LLUICtrl* ctrl);
 		void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param);
 
+		void onAvalineCallerFound(const LLUUID& participant_id);
+		void onAvalineCallerRemoved(const LLUUID& participant_id);
+
 		/**
 		 * Adjusts passed participant to work properly.
 		 *
@@ -272,4 +276,5 @@ class LLParticipantList
 
 		LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers;
 		validate_speaker_callback_t mValidateSpeakerCallback;
+		LLAvalineUpdater* mAvalineUpdater;
 };
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index b924fb2f2c..2bb160b7ce 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -234,6 +234,14 @@ public:
 	LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; }
 	const LLUUID getSessionID();
 
+	/**
+	 * Removes avaline speaker.
+	 *
+	 * This is a HACK due to server does not send information that Avaline caller ends call.
+	 * It can be removed when server is updated. See EXT-4301 for details
+	 */
+	bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); }
+
 protected:
 	virtual void updateSpeakerList();
 	void setSpeakerNotInChannel(LLSpeaker* speackerp);
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index b0bf51c214..813f59ff89 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -148,6 +148,8 @@
 	<!-- Group name: text shown for LLUUID::null -->
 	<string name="GroupNameNone">(none)</string>
 
+	<string name="AvalineCaller">Avaline Caller [ORDER]</string>
+
 	<!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. -->
 	<string name="AssetErrorNone">No error</string>
 	<string name="AssetErrorRequestFailed">Asset request: failed</string>
-- 
cgit v1.2.3


From f4a03a397575b1b4a54bfe289a155acd6c831441 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Wed, 14 Apr 2010 12:56:11 +0300
Subject: =?UTF-8?q?Fixed=20normal=20bug=20EXT-6730=20([TRUNCATION]=20Prefe?=
 =?UTF-8?q?rencias=20>=20Configurar=20>=20Otros=20dispositivos=20>=20CONFI?=
 =?UTF-8?q?GURACI=C3=93N=20DEL=20JOYSTICK.=20\"Zona=20muerta=20izq./de\")?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

1. In EN locale increased size of all TextBoxes where string was truncated. Made these TextBoxes large enough to contain strings of all locales. Moved controls next to these TextBoxes to the right and increased floater width to accommodate its content.

2. Deleted in ES, IT, NL, PL, FR explicitly overriden 'left' and 'width' attributes that was changed in EN locale.

Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/200/

--HG--
branch : product-engine
---
 .../skins/default/xui/en/floater_joystick.xml      | 154 ++++++++++-----------
 .../skins/default/xui/es/floater_joystick.xml      |  10 +-
 .../skins/default/xui/fr/floater_joystick.xml      |  10 +-
 .../skins/default/xui/it/floater_joystick.xml      |  18 +--
 .../skins/default/xui/nl/floater_joystick.xml      |   2 +-
 .../skins/default/xui/pl/floater_joystick.xml      | 124 ++++++++---------
 .../skins/default/xui/pt/floater_joystick.xml      |  16 +--
 7 files changed, 167 insertions(+), 167 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index b8156a174d..6e1bb8fcd0 100644
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -6,7 +6,7 @@
  name="Joystick"
  help_topic="joystick"
  title="JOYSTICK CONFIGURATION"
- width="550">
+ width="569">
     <floater.string
      name="NoDevice">
         no device detected
@@ -148,7 +148,7 @@
      halign="right"
      height="10"
      layout="topleft"
-     left="12"
+     left="37"
      mouse_opaque="false"
      name="Control Modes:"
      top="110"
@@ -161,7 +161,7 @@
      halign="center"
      label="Avatar"
      layout="topleft"
-     left="125"
+     left="150"
      name="JoystickAvatarEnabled"
      width="60" />
     <check_box
@@ -170,7 +170,7 @@
      halign="center"
      label="Build"
      layout="topleft"
-     left="194"
+     left="219"
      name="JoystickBuildEnabled"
      width="60" />
     <check_box
@@ -179,14 +179,14 @@
      halign="center"
      label="Flycam"
      layout="topleft"
-     left="262"
+     left="289"
      name="JoystickFlycamEnabled"
      width="60" />
     <stat_view
      height="250"
      label="Joystick Monitor"
      layout="topleft"
-     left="340"
+     left="359"
      name="axis_view"
      show_label="true"
      top="142"
@@ -250,9 +250,9 @@
      bottom="144"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="XScale"
-     width="94">
+     width="140">
         X Scale
     </text>
     <spinner
@@ -261,7 +261,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      max_val="50"
      min_val="-50"
      name="AvatarAxisScale1"
@@ -272,7 +272,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale1"
@@ -283,7 +283,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale1"
@@ -294,9 +294,9 @@
      bottom="164"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="YScale"
-     width="94">
+     width="140">
         Y Scale
     </text>
     <spinner
@@ -305,7 +305,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      max_val="50"
      min_val="-50"
      name="AvatarAxisScale2"
@@ -316,7 +316,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale2"
@@ -327,7 +327,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale2"
@@ -338,9 +338,9 @@
      bottom="184"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="ZScale"
-     width="94">
+     width="140">
         Z Scale
     </text>
     <spinner
@@ -349,7 +349,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      max_val="50"
      min_val="-50"
      name="AvatarAxisScale0"
@@ -360,7 +360,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale0"
@@ -371,7 +371,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale0"
@@ -382,9 +382,9 @@
      bottom="204"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="PitchScale"
-     width="94">
+     width="140">
         Pitch Scale
     </text>
     <spinner
@@ -393,7 +393,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      max_val="1024"
      min_val="-1024"
      name="AvatarAxisScale4"
@@ -404,7 +404,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale4"
@@ -415,7 +415,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale4"
@@ -426,9 +426,9 @@
      bottom="224"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="YawScale"
-     width="94">
+     width="140">
         Yaw Scale
     </text>
     <spinner
@@ -437,7 +437,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      max_val="1024"
      min_val="-1024"
      name="AvatarAxisScale5"
@@ -448,7 +448,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale5"
@@ -459,7 +459,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale5"
@@ -470,9 +470,9 @@
      bottom="244"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="RollScale"
-     width="94">
+     width="140">
         Roll Scale
     </text>
     <spinner
@@ -481,7 +481,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      max_val="1024"
      min_val="-1024"
      name="BuildAxisScale3"
@@ -492,7 +492,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale3"
@@ -503,9 +503,9 @@
      bottom="274"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="XDeadZone"
-     width="94">
+     width="140">
         X Dead Zone
     </text>
     <spinner
@@ -515,7 +515,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      name="AvatarAxisDeadZone1"
      width="56" />
     <spinner
@@ -525,7 +525,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone1"
      width="56" />
     <spinner
@@ -535,7 +535,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone1"
      width="56" />
     <text
@@ -544,9 +544,9 @@
      bottom="294"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="YDeadZone"
-     width="94">
+     width="140">
         Y Dead Zone
     </text>
     <spinner
@@ -556,7 +556,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      name="AvatarAxisDeadZone2"
      width="56" />
     <spinner
@@ -566,7 +566,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone2"
      width="56" />
     <spinner
@@ -576,7 +576,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone2"
      width="56" />
     <text
@@ -585,9 +585,9 @@
      bottom="314"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="ZDeadZone"
-     width="94">
+     width="140">
         Z Dead Zone
     </text>
     <spinner
@@ -597,7 +597,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      name="AvatarAxisDeadZone0"
      width="56" />
     <spinner
@@ -607,7 +607,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone0"
      width="56" />
     <spinner
@@ -617,7 +617,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone0"
      width="56" />
     <text
@@ -626,9 +626,9 @@
      bottom="334"
      halign="right"
      layout="topleft"
-     left="20"
+     left="2"
      name="PitchDeadZone"
-     width="94">
+     width="140">
         Pitch Dead Zone
     </text>
     <spinner
@@ -638,7 +638,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      name="AvatarAxisDeadZone4"
      width="56" />
     <spinner
@@ -648,7 +648,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone4"
      width="56" />
     <spinner
@@ -658,7 +658,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone4"
      width="56" />
     <text
@@ -667,9 +667,9 @@
      bottom="354"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="YawDeadZone"
-     width="94">
+     width="140">
         Yaw Dead Zone
     </text>
     <spinner
@@ -679,7 +679,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="125"
+     left="150"
      name="AvatarAxisDeadZone5"
      width="56" />
     <spinner
@@ -689,7 +689,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone5"
      width="56" />
     <spinner
@@ -699,7 +699,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone5"
      width="56" />
     <text
@@ -708,9 +708,9 @@
      bottom="374"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="RollDeadZone"
-     width="94">
+     width="140">
         Roll Dead Zone
     </text>
     <spinner
@@ -720,7 +720,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="195"
+     left="220"
      name="BuildAxisDeadZone3"
      width="56" />
     <spinner
@@ -730,7 +730,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone3"
      width="56" />
     <text
@@ -739,9 +739,9 @@
      bottom="402"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="Feathering"
-     width="94">
+     width="140">
         Feathering
     </text>
     <slider
@@ -752,7 +752,7 @@
      increment="1"
      initial_value="0.7"
      layout="topleft"
-     left="116"
+     left="141"
      max_val="32"
      min_val="1"
      name="AvatarFeathering"
@@ -795,9 +795,9 @@
      bottom="430"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="ZoomScale2"
-     width="94">
+     width="140">
         Zoom Scale
     </text>
     <spinner
@@ -806,7 +806,7 @@
      decimal_digits="2"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      max_val="1024"
      min_val="-1024"
      name="FlycamAxisScale6"
@@ -817,9 +817,9 @@
      bottom="450"
      halign="right"
      layout="topleft"
-     left="20"
+     left="3"
      name="ZoomDeadZone"
-     width="96">
+     width="140">
         Zoom Dead Zone
     </text>
     <spinner
@@ -829,7 +829,7 @@
      increment="0.01"
      label_width="0"
      layout="topleft"
-     left="265"
+     left="290"
      name="FlycamAxisDeadZone6"
      width="56" />
     <button
@@ -837,10 +837,10 @@
      height="22"
      label="SpaceNavigator Defaults"
      layout="topleft"
-     left="340"
+     left="359"
      name="SpaceNavigatorDefaults"
      top="429"
-     width="184" />
+     width="200" />
     <button
      follows="right|bottom"
      height="20"
@@ -850,7 +850,7 @@
      left_delta="0"
      name="ok_btn"
      top_pad="9"
-     width="90" />
+     width="98" />
     <button
      follows="right|bottom"
      height="20"
@@ -860,5 +860,5 @@
      left_pad="4"
      name="cancel_btn"
      top_delta="0"
-     width="90" />
+     width="98" />
 </floater>
diff --git a/indra/newview/skins/default/xui/es/floater_joystick.xml b/indra/newview/skins/default/xui/es/floater_joystick.xml
index dbd2e4f04e..2c1804bd90 100644
--- a/indra/newview/skins/default/xui/es/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/es/floater_joystick.xml
@@ -16,7 +16,7 @@
 		Modos de control:
 	</text>
 	<check_box label="Avatar" name="JoystickAvatarEnabled"/>
-	<check_box label="Construir" left="192" name="JoystickBuildEnabled"/>
+	<check_box label="Construir" name="JoystickBuildEnabled"/>
 	<check_box label="Flycam" name="JoystickFlycamEnabled"/>
 	<text name="XScale">
 		Escala: X
@@ -27,7 +27,7 @@
 	<text name="ZScale">
 		Escala: Z
 	</text>
-	<text left="3" name="PitchScale" width="115">
+	<text name="PitchScale">
 		Escala: arriba/abajo
 	</text>
 	<text name="YawScale">
@@ -45,10 +45,10 @@
 	<text name="ZDeadZone">
 		Zona muerta Z
 	</text>
-	<text left="3" name="PitchDeadZone" width="115">
+	<text name="PitchDeadZone">
 		Zona muerta arri./aba.
 	</text>
-	<text left="3" name="YawDeadZone" width="115">
+	<text name="YawDeadZone">
 		Zona muerta izq./der.
 	</text>
 	<text name="RollDeadZone">
@@ -63,7 +63,7 @@
 	<text name="ZoomDeadZone">
 		Zona muerta zoom
 	</text>
-	<button font="SansSerifSmall" label="Por defecto del SpaceNavigator" left="330" name="SpaceNavigatorDefaults" width="210"/>
+	<button font="SansSerifSmall" label="Por defecto del SpaceNavigator" name="SpaceNavigatorDefaults"/>
 	<button label="OK" label_selected="OK" left="330" name="ok_btn"/>
 	<button label="Cancelar" label_selected="Cancelar" left_delta="120" name="cancel_btn"/>
 	<stat_view label="Monitor del joystick" name="axis_view">
diff --git a/indra/newview/skins/default/xui/fr/floater_joystick.xml b/indra/newview/skins/default/xui/fr/floater_joystick.xml
index e00f9564e8..02ac21bf82 100644
--- a/indra/newview/skins/default/xui/fr/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/fr/floater_joystick.xml
@@ -26,7 +26,7 @@
 	<text name="ZScale">
 		Échelle des Z
 	</text>
-	<text left="9" name="PitchScale" width="104">
+	<text name="PitchScale">
 		Échelle du tangage
 	</text>
 	<text name="YawScale">
@@ -44,13 +44,13 @@
 	<text name="ZDeadZone">
 		Zone neutre Z
 	</text>
-	<text left="4" name="PitchDeadZone" width="116">
+	<text name="PitchDeadZone">
 		Zone neutre tangage
 	</text>
-	<text name="YawDeadZone" left="10" width="104">
+	<text name="YawDeadZone">
 		Zone neutre lacet
 	</text>
-	<text name="RollDeadZone" left="10" width="104">
+	<text name="RollDeadZone">
 		Zone neutre roulis
 	</text>
 	<text name="Feathering">
@@ -59,7 +59,7 @@
 	<text name="ZoomScale2">
 		Échelle du zoom
 	</text>
-	<text left="6" name="ZoomDeadZone" width="120">
+	<text name="ZoomDeadZone">
 		Zone neutre du zoom
 	</text>
 	<button label="Options par défaut du joystick" name="SpaceNavigatorDefaults"/>
diff --git a/indra/newview/skins/default/xui/it/floater_joystick.xml b/indra/newview/skins/default/xui/it/floater_joystick.xml
index 3eff0cfceb..3d60ded7ab 100644
--- a/indra/newview/skins/default/xui/it/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/it/floater_joystick.xml
@@ -16,7 +16,7 @@
 		Modalità di controllo:
 	</text>
 	<check_box label="Avatar" name="JoystickAvatarEnabled"/>
-	<check_box label="Costruire" left="192" name="JoystickBuildEnabled"/>
+	<check_box label="Costruire" name="JoystickBuildEnabled"/>
 	<check_box label="Camera dall&apos;alto" name="JoystickFlycamEnabled"/>
 	<text name="XScale">
 		Regolazione X
@@ -27,13 +27,13 @@
 	<text name="ZScale">
 		Regolazione Z
 	</text>
-	<text left="3" name="PitchScale" width="112">
+	<text name="PitchScale">
 		Regolazione: Pitch
 	</text>
-	<text left="3" name="YawScale" width="112">
+	<text name="YawScale">
 		Regolazione: Yaw
 	</text>
-	<text left="3" name="RollScale" width="112">
+	<text name="RollScale">
 		Regolazione: Roll
 	</text>
 	<text name="XDeadZone">
@@ -45,22 +45,22 @@
 	<text name="ZDeadZone">
 		Angolo morto Z
 	</text>
-	<text left="3" name="PitchDeadZone" width="112">
+	<text name="PitchDeadZone">
 		Angolo morto: Pitch
 	</text>
-	<text left="3" name="YawDeadZone" width="112">
+	<text name="YawDeadZone">
 		Angolo morto: Yaw
 	</text>
-	<text left="3" name="RollDeadZone" width="112">
+	<text name="RollDeadZone">
 		Angolo morto: Roll
 	</text>
 	<text name="Feathering">
 		Smussamento
 	</text>
-	<text left="6" name="ZoomScale2" width="135">
+	<text  name="ZoomScale2">
 		Regolazione dello zoom
 	</text>
-	<text left="6" name="ZoomDeadZone" width="135">
+	<text name="ZoomDeadZone" width="140">
 		Angolo morto dello zoom
 	</text>
 	<button label="SpaceNavigator Defaults" name="SpaceNavigatorDefaults"/>
diff --git a/indra/newview/skins/default/xui/nl/floater_joystick.xml b/indra/newview/skins/default/xui/nl/floater_joystick.xml
index 505e3cd719..1d590dc1f3 100644
--- a/indra/newview/skins/default/xui/nl/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/nl/floater_joystick.xml
@@ -45,7 +45,7 @@
 	<text name="ZDeadZone">
 		Z dode zone
 	</text>
-	<text name="PitchDeadZone" left="4" width="110">
+	<text name="PitchDeadZone">
 		Stampen dode zone
 	</text>
 	<text name="YawDeadZone">
diff --git a/indra/newview/skins/default/xui/pl/floater_joystick.xml b/indra/newview/skins/default/xui/pl/floater_joystick.xml
index 78742c39d1..2b1e362b98 100644
--- a/indra/newview/skins/default/xui/pl/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/pl/floater_joystick.xml
@@ -1,108 +1,108 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Joystick" title="KONFIGURACJA JOYSTICKA" width="590">
+<floater name="Joystick" title="KONFIGURACJA JOYSTICKA">
 	<check_box label="Aktywuj Joystick:" name="enable_joystick"/>
 	<text left="130" name="joystick_type" width="360"/>
 	<spinner label="Kalibracja Osi X" label_width="130" left="20" name="JoystickAxis1" width="170"/>
 	<spinner label="Kalibracja Osi Y" label_width="130" left="210" name="JoystickAxis2" width="170"/>
-	<spinner label="Kalibracja Osi Z" label_width="130" left="400" name="JoystickAxis0" width="170"/>
+	<spinner label="Kalibracja Osi Z" label_width="100" left="400" name="JoystickAxis0" width="140"/>
 	<spinner label="Kalibracja wznoszenia" label_width="130" left="20" name="JoystickAxis4" width="170"/>
 	<spinner label="Kalibracja wychylania" label_width="130" left="210" name="JoystickAxis5" width="170"/>
-	<spinner label="Kalibracja obrotu" label_width="130" left="400" name="JoystickAxis3" width="170"/>
+	<spinner label="Kalibracja obrotu" label_width="100" left="400" name="JoystickAxis3" width="140"/>
 	<spinner label="Kalibracja powiększania" label_width="130" name="JoystickAxis6" width="170"/>
 	<check_box label="Bezpośrednie" left="205" name="ZoomDirect"/>
 	<check_box label="Kursor 3D" left="340" name="Cursor3D"/>
 	<check_box label="Automatyczne" left="450" name="AutoLeveling"/>
-	<text left="22" name="Control Modes:">
+	<text name="Control Modes:">
 		Kontroluj:
 	</text>
-	<check_box label="Awatara" left="130" name="JoystickAvatarEnabled" width="90"/>
-	<check_box label="Budowanie" left="205" name="JoystickBuildEnabled" width="90"/>
-	<check_box label="Kamerę podczas latania" left="282" name="JoystickFlycamEnabled" width="90"/>
-	<text name="XScale" width="104">
+	<check_box label="Awatara" name="JoystickAvatarEnabled" width="90"/>
+	<check_box label="Budowanie" name="JoystickBuildEnabled" width="90"/>
+	<check_box label="Kamerę podczas latania" left="300" name="JoystickFlycamEnabled" width="90"/>
+	<text name="XScale">
 		Skala X
 	</text>
-	<spinner left="133" name="AvatarAxisScale1"/>
-	<spinner left="208" name="BuildAxisScale1"/>
-	<spinner left="283" name="FlycamAxisScale1"/>
-	<text name="YScale" width="104">
+	<spinner name="AvatarAxisScale1"/>
+	<spinner name="BuildAxisScale1"/>
+	<spinner left="300" name="FlycamAxisScale1"/>
+	<text name="YScale">
 		Skala Y
 	</text>
-	<spinner left="133" name="AvatarAxisScale2"/>
-	<spinner left="208" name="BuildAxisScale2"/>
-	<spinner left="283" name="FlycamAxisScale2"/>
-	<text name="ZScale" width="104">
+	<spinner name="AvatarAxisScale2"/>
+	<spinner name="BuildAxisScale2"/>
+	<spinner left="300" name="FlycamAxisScale2"/>
+	<text name="ZScale">
 		Skala Z
 	</text>
-	<spinner left="133" name="AvatarAxisScale0"/>
-	<spinner left="208" name="BuildAxisScale0"/>
-	<spinner left="283" name="FlycamAxisScale0"/>
-	<text name="PitchScale" width="104">
+	<spinner name="AvatarAxisScale0"/>
+	<spinner name="BuildAxisScale0"/>
+	<spinner left="300" name="FlycamAxisScale0"/>
+	<text name="PitchScale">
 		Skala wznoszenia
 	</text>
-	<spinner left="133" name="AvatarAxisScale4"/>
-	<spinner left="208" name="BuildAxisScale4"/>
-	<spinner left="283" name="FlycamAxisScale4"/>
-	<text name="YawScale" width="104">
+	<spinner name="AvatarAxisScale4"/>
+	<spinner name="BuildAxisScale4"/>
+	<spinner left="300" name="FlycamAxisScale4"/>
+	<text name="YawScale">
 		Skala odchylania
 	</text>
-	<spinner left="133" name="AvatarAxisScale5"/>
-	<spinner left="208" name="BuildAxisScale5"/>
-	<spinner left="283" name="FlycamAxisScale5"/>
-	<text name="RollScale" width="104">
+	<spinner name="AvatarAxisScale5"/>
+	<spinner name="BuildAxisScale5"/>
+	<spinner left="300" name="FlycamAxisScale5"/>
+	<text name="RollScale">
 		Skala obrotu
 	</text>
-	<spinner left="208" name="BuildAxisScale3"/>
-	<spinner left="283" name="FlycamAxisScale3"/>
-	<text name="XDeadZone" width="104">
+	<spinner name="BuildAxisScale3"/>
+	<spinner left="300" name="FlycamAxisScale3"/>
+	<text name="XDeadZone">
 		Tolerancja osi X
 	</text>
-	<spinner left="133" name="AvatarAxisDeadZone1"/>
-	<spinner left="208" name="BuildAxisDeadZone1"/>
-	<spinner left="283" name="FlycamAxisDeadZone1"/>
-	<text name="YDeadZone" width="104">
+	<spinner name="AvatarAxisDeadZone1"/>
+	<spinner name="BuildAxisDeadZone1"/>
+	<spinner left="300" name="FlycamAxisDeadZone1"/>
+	<text name="YDeadZone">
 		Tolerancja osi Y
 	</text>
-	<spinner left="133" name="AvatarAxisDeadZone2"/>
-	<spinner left="208" name="BuildAxisDeadZone2"/>
-	<spinner left="283" name="FlycamAxisDeadZone2"/>
-	<text name="ZDeadZone" width="104">
+	<spinner name="AvatarAxisDeadZone2"/>
+	<spinner name="BuildAxisDeadZone2"/>
+	<spinner left="300" name="FlycamAxisDeadZone2"/>
+	<text name="ZDeadZone">
 		Tolerancja osi Z
 	</text>
-	<spinner left="133" name="AvatarAxisDeadZone0"/>
-	<spinner left="208" name="BuildAxisDeadZone0"/>
-	<spinner left="283" name="FlycamAxisDeadZone0"/>
-	<text name="PitchDeadZone" width="104">
+	<spinner name="AvatarAxisDeadZone0"/>
+	<spinner name="BuildAxisDeadZone0"/>
+	<spinner left="300" name="FlycamAxisDeadZone0"/>
+	<text name="PitchDeadZone">
 		Tolerancja wznoszenia
 	</text>
-	<spinner left="133" name="AvatarAxisDeadZone4"/>
-	<spinner left="208" name="BuildAxisDeadZone4"/>
-	<spinner left="283" name="FlycamAxisDeadZone4"/>
-	<text name="YawDeadZone" width="104">
+	<spinner name="AvatarAxisDeadZone4"/>
+	<spinner name="BuildAxisDeadZone4"/>
+	<spinner left="300" name="FlycamAxisDeadZone4"/>
+	<text name="YawDeadZone">
 		Tolerancja odchylania
 	</text>
-	<spinner left="133" name="AvatarAxisDeadZone5"/>
-	<spinner left="208" name="BuildAxisDeadZone5"/>
-	<spinner left="283" name="FlycamAxisDeadZone5"/>
-	<text name="RollDeadZone" width="104">
+	<spinner name="AvatarAxisDeadZone5"/>
+	<spinner name="BuildAxisDeadZone5"/>
+	<spinner left="300" name="FlycamAxisDeadZone5"/>
+	<text name="RollDeadZone">
 		Tolerancja obrotu
 	</text>
-	<spinner left="208" name="BuildAxisDeadZone3"/>
-	<spinner left="283" name="FlycamAxisDeadZone3"/>
-	<text name="Feathering" width="104">
+	<spinner name="BuildAxisDeadZone3"/>
+	<spinner left="300" name="FlycamAxisDeadZone3"/>
+	<text name="Feathering">
 		Przenikanie
 	</text>
-	<slider label="" left="125" name="AvatarFeathering"/>
-	<slider label="" left="200" name="BuildFeathering"/>
-	<slider label="" left="275" name="FlycamFeathering"/>
-	<text name="ZoomScale2" width="104">
+	<slider label="" name="AvatarFeathering"/>
+	<slider label="" name="BuildFeathering"/>
+	<slider label="" left_delta="81" name="FlycamFeathering"/>
+	<text name="ZoomScale2">
 		Skala powiększania
 	</text>
-	<spinner label="" left="283" name="FlycamAxisScale6"/>
-	<text name="ZoomDeadZone" width="104">
+	<spinner label="" left="300" name="FlycamAxisScale6"/>
+	<text name="ZoomDeadZone">
 		Tolerancja powiększania
 	</text>
-	<spinner label="" left="283" name="FlycamAxisDeadZone6"/>
-	<button label="Ustawienia domyślne" left="366" name="SpaceNavigatorDefaults"/>
+	<spinner label="" left="300" name="FlycamAxisDeadZone6"/>
+	<button label="Ustawienia domyślne" name="SpaceNavigatorDefaults"/>
 	<button label="OK" label_selected="OK" left="366" name="ok_btn"/>
 	<button label="Anuluj" label_selected="Anuluj" name="cancel_btn"/>
 	<stat_view label="Monitor Joysticka" name="axis_view">
diff --git a/indra/newview/skins/default/xui/pt/floater_joystick.xml b/indra/newview/skins/default/xui/pt/floater_joystick.xml
index ecc4fcc9e9..98d8c0e319 100644
--- a/indra/newview/skins/default/xui/pt/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/pt/floater_joystick.xml
@@ -16,7 +16,7 @@
 		Modos de Controle:
 	</text>
 	<check_box label="Avatar" name="JoystickAvatarEnabled"/>
-	<check_box label="Construir" left="192" name="JoystickBuildEnabled"/>
+	<check_box label="Construir" name="JoystickBuildEnabled"/>
 	<check_box label="Camera aérea" name="JoystickFlycamEnabled"/>
 	<text name="XScale">
 		Escala X
@@ -27,13 +27,13 @@
 	<text name="ZScale">
 		Escala Z
 	</text>
-	<text left="3" name="PitchScale" width="115">
+	<text name="PitchScale">
 		Escala de Elevação
 	</text>
-	<text left="3" name="YawScale" width="115">
+	<text name="YawScale">
 		Escala da Guinada
 	</text>
-	<text left="3" name="RollScale" width="115">
+	<text name="RollScale">
 		Escala de Rolagem
 	</text>
 	<text name="XDeadZone">
@@ -45,13 +45,13 @@
 	<text name="ZDeadZone">
 		Zona Morta Z
 	</text>
-	<text left="3" name="PitchDeadZone" width="115">
+	<text name="PitchDeadZone">
 		Zona Morta: Elevação
 	</text>
-	<text left="3" name="YawDeadZone" width="115">
+	<text name="YawDeadZone">
 		Zona Morta: Guinada
 	</text>
-	<text left="3" name="RollDeadZone" width="115">
+	<text name="RollDeadZone">
 		Zona Morta: Rolagem
 	</text>
 	<text name="Feathering">
@@ -60,7 +60,7 @@
 	<text name="ZoomScale2">
 		Escala de Zoom
 	</text>
-	<text left="4" name="ZoomDeadZone" width="110">
+	<text name="ZoomDeadZone">
 		Zona Morta de Zoom
 	</text>
 	<button font="SansSerifSmall" label="Padrões do SpaceNavigator" name="SpaceNavigatorDefaults"/>
-- 
cgit v1.2.3


From 079963c9295243c731916127e39bfa39ae9690ca Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Wed, 14 Apr 2010 13:18:40 +0300
Subject: Fixed normal bug EXT-6302 (TP requests need to display destination
 region maturity) Added:  - parsing of region information from "lure" binary
 bucket  - displaying destination region maturity by teleport offer Reviewed
 by Mike Antipov at https://codereview.productengine.com/secondlife/r/229/

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp                  | 57 ++++++++++++++++++++++
 .../newview/skins/default/xui/en/notifications.xml |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 32df7d8410..48e781e95d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -32,6 +32,7 @@
 
 #include "llviewerprecompiledheaders.h"
 #include "llviewermessage.h"
+#include "boost/lexical_cast.hpp"
 
 #include "llanimationstates.h"
 #include "llaudioengine.h" 
@@ -1860,6 +1861,53 @@ protected:
 	}
 };
 
+static void parse_lure_bucket(const std::string& bucket,
+							  U64& region_handle,
+							  LLVector3& pos,
+							  LLVector3& look_at,
+							  U8& region_access)
+{
+	// tokenize the bucket
+	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+	boost::char_separator<char> sep("|", "", boost::keep_empty_tokens);
+	tokenizer tokens(bucket, sep);
+	tokenizer::iterator iter = tokens.begin();
+
+	S32 gx = boost::lexical_cast<S32>((*(iter)).c_str());
+	S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str());
+	S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str());
+
+	// Grab region access
+	region_access = SIM_ACCESS_MIN;
+	if (++iter != tokens.end())
+	{
+		std::string access_str((*iter).c_str());
+		LLStringUtil::trim(access_str);
+		if ( access_str == "A" )
+		{
+			region_access = SIM_ACCESS_ADULT;
+		}
+		else if ( access_str == "M" )
+		{
+			region_access = SIM_ACCESS_MATURE;
+		}
+		else if ( access_str == "PG" )
+		{
+			region_access = SIM_ACCESS_PG;
+		}
+	}
+
+	pos.setVec((F32)rx, (F32)ry, (F32)rz);
+	look_at.setVec((F32)lx, (F32)ly, (F32)lz);
+
+	region_handle = to_region_handle(gx, gy);
+}
+
 void process_improved_im(LLMessageSystem *msg, void **user_data)
 {
 	if (gNoRender)
@@ -2493,10 +2541,19 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			}
 			else
 			{
+				LLVector3 pos, look_at;
+				U64 region_handle;
+				U8 region_access;
+				std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
+				parse_lure_bucket(region_info, region_handle, pos, look_at, region_access);
+
+				std::string region_access_str = LLViewerRegion::accessToString(region_access);
+
 				LLSD args;
 				// *TODO: Translate -> [FIRST] [LAST] (maybe)
 				args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about");
 				args["MESSAGE"] = message;
+				args["MATURITY"] = region_access_str;
 				LLSD payload;
 				payload["from_id"] = from_id;
 				payload["lure_id"] = session_id;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9ee4e13f3c..6c9564c8cf 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5165,7 +5165,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th
    type="offer">
 [NAME_SLURL] has offered to teleport you to their location:
 
-[MESSAGE]
+[MESSAGE], ([MATURITY])
     <form name="form">
       <button
        index="0"
-- 
cgit v1.2.3


From c1662e55838b6bde176a862847f67359ce0af3b4 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Wed, 14 Apr 2010 16:17:17 +0300
Subject: Fixed EXT-6591(normal) - Place profile accordions should be
 single-instance Made accordion single expansion - added single_expansion
 attribute

Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/232/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/panel_place_profile.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index a43b244fa0..9725e9952a 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -321,6 +321,7 @@
              follows="all"
              height="223"
              layout="topleft"
+             single_expansion="true"
              left="0"
              name="advanced_info_accordion"
              top_pad="10"
-- 
cgit v1.2.3


From 255ca59f7438a1528dff04e5facec2229bd9e10a Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Wed, 14 Apr 2010 16:18:33 +0300
Subject: Fixed EXT-6604(normal) - Nav bar search field text not vertically
 aligned Increased search field height to match location input height.

Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/231/

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 7ec1ca2e2e..96c76576c0 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -119,7 +119,7 @@
 	     commit_on_focus_lost="false"
 	     follows="right|top"
 	     halign="right"
-	     height="22"
+	     height="23"
 	     label="Search"
 	     layout="topleft"
 	     right="-10"
-- 
cgit v1.2.3


From 5faad370242649e911dfc866d2995e3d3c962bbd Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Wed, 14 Apr 2010 16:24:07 +0300
Subject: Fixed EXT-6349(normal) - "More" link in event details window does
 nothing Deleted code that disables expandable textbox. Probably there was
 edit_box, some time ago, that was read-only.

Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/235/

--HG--
branch : product-engine
---
 indra/newview/llfloaterevent.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp
index 97ebab3425..560cc29080 100644
--- a/indra/newview/llfloaterevent.cpp
+++ b/indra/newview/llfloaterevent.cpp
@@ -113,7 +113,6 @@ BOOL LLFloaterEvent::postBuild()
 	mTBDuration = getChild<LLTextBox>("event_duration");
 
 	mTBDesc = getChild<LLExpandableTextBox>("event_desc");
-	mTBDesc->setEnabled(FALSE);
 
 	mTBRunBy = getChild<LLTextBox>("event_runby");
 	mTBLocation = getChild<LLTextBox>("event_location");
-- 
cgit v1.2.3


From 2ddcd1dbd3ba838a9fd50f7db3ccf906ecf61ad8 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Wed, 14 Apr 2010 16:40:47 +0300
Subject: Fixed critical bug EXT-6847 (Default configuration has Away Timeout
 set to "Never")

Reason: changeset 97654b5b6313 for EXT-4843 [NUX] Set default Preferences. Setting was reset to 0.

Fix: restored default value 300. Also updated setting's description with supported combobox values (0, 120, 300, 600, 1800)

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/234/

--HG--
branch : product-engine
---
 indra/newview/app_settings/settings.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f76b471c9c..c9b5631d54 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4,13 +4,14 @@
     <key>AFKTimeout</key>
     <map>
       <key>Comment</key>
-      <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never)</string>
+      <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never). 
+        Valid values are: 0, 120, 300, 600, 1800</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <real>0</real>
+      <real>300</real>
     </map>
     <key>AdvanceSnapshot</key>
     <map>
-- 
cgit v1.2.3


From dd73ac682eba2f0f33c636d636298a3e6982f16a Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Wed, 14 Apr 2010 17:26:26 +0300
Subject: Fixed major bug EXT-6786 ('Stand' button is corrupted if movement
 control floater is opened)

This issue is a regression of EXT-1655: Move Floater is notified about "not flying" after it was notified about "sitting".

Fix: taking into account siting mode while notifying about "flying".

Reviewed by Eugene Mutavchi at https://codereview.productengine.com/secondlife/r/233/

--HG--
branch : product-engine
---
 indra/newview/llmoveview.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 0f22a50093..4ccf5e1c7b 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -200,7 +200,8 @@ void LLFloaterMove::setFlyingMode(BOOL fly)
 	if (instance)
 	{
 		instance->setFlyingModeImpl(fly);
-		instance->showModeButtons(!fly);
+		BOOL is_sitting = isAgentAvatarValid() && gAgentAvatarp->isSitting();
+		instance->showModeButtons(!fly && !is_sitting);
 	}
 	if (fly)
 	{
-- 
cgit v1.2.3


From 7a65a9430e1904f9c9b23d6f75a567e76a962312 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Wed, 14 Apr 2010 18:36:11 +0300
Subject: Fixed low priority bug EXT-6781 (Text edit field should be in focus
 after IM button has been pressed).

Explicitly focus the input editor whenever an IM tab gets visible.

Added a check for the IM tab to have focus and only then pass the focus to the input entry.
The check is needed for the fix not to re-introduce EXT-5387 (Private IM Window Steals Focus from Nearby Chat).

Reviewed by Alex: https://codereview.productengine.com/secondlife/r/224/

--HG--
branch : product-engine
---
 indra/newview/llimfloater.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 3ec8d11fb0..19dbc564d1 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -499,8 +499,8 @@ void LLIMFloater::setVisible(BOOL visible)
 	{
 		//only if floater was construced and initialized from xml
 		updateMessages();
-		//prevent steal focus when IM opened in multitab mode
-		if (!isChatMultiTab())
+		//prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781)
+		if (!isChatMultiTab() || hasFocus())
 		{
 			mInputEditor->setFocus(TRUE);
 		}
-- 
cgit v1.2.3


From 6a298ea603258b6f72580379a1b25350c6e8b982 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Wed, 14 Apr 2010 18:54:06 +0300
Subject: Fixed major bug EXT-6802 (Cancelling out of People Chooser while
 Searching Causes Crash) * Added check of Avatar Picker floater (People
 Chooser) against NULL in search callback.

Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/236/

--HG--
branch : product-engine
---
 indra/newview/llfloateravatarpicker.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 01a699506e..d1e99fbd61 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -451,8 +451,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
 	
 	LLFloaterAvatarPicker* floater = LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
 
-	// these are not results from our last request
-	if (query_id != floater->mQueryID)
+	// floater is closed or these are not results from our last request
+	if (NULL == floater || query_id != floater->mQueryID)
 	{
 		return;
 	}
-- 
cgit v1.2.3


From 663725dcee17b4adbb1409554b7d0de9741e7388 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 14 Apr 2010 12:02:25 -0500
Subject: Remove calls to llpushcallstacks from inner loops.

---
 indra/newview/lldrawpool.cpp     | 1 -
 indra/newview/lldrawpoolbump.cpp | 3 ---
 indra/newview/llface.cpp         | 1 -
 indra/newview/llvovolume.cpp     | 3 ---
 4 files changed, 8 deletions(-)

diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index ef946ac49e..e3e66fa00d 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -442,7 +442,6 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
 
 void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture)
 {
-	llpushcallstacks ;
 	for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)	
 	{
 		LLDrawInfo* pparams = *i;
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index d09d4a412f..19cdccb630 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -825,7 +825,6 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32
 
 void LLBumpImageList::updateImages()
 {	
-	llpushcallstacks ;
 	for (bump_image_map_t::iterator iter = mBrightnessEntries.begin(); iter != mBrightnessEntries.end(); )
 	{
 		bump_image_map_t::iterator curiter = iter++;
@@ -852,7 +851,6 @@ void LLBumpImageList::updateImages()
 			}
 		}
 	}
-	llpushcallstacks ;
 	for (bump_image_map_t::iterator iter = mDarknessEntries.begin(); iter != mDarknessEntries.end(); )
 	{
 		bump_image_map_t::iterator curiter = iter++;
@@ -879,7 +877,6 @@ void LLBumpImageList::updateImages()
 			}
 		}
 	}
-	llpushcallstacks ;
 }
 
 
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9de69a8173..a1336815f7 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -867,7 +867,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 								const LLMatrix4& mat_vert, const LLMatrix3& mat_normal,
 								const U16 &index_offset)
 {
-	llpushcallstacks ;
 	const LLVolumeFace &vf = volume.getVolumeFace(f);
 	S32 num_vertices = (S32)vf.mVertices.size();
 	S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index cb362d557c..95ceb0189c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3293,7 +3293,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt");
 
 void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 {
-	llpushcallstacks ;
 	if (group->changeLOD())
 	{
 		group->mLastUpdateDistance = group->mDistance;
@@ -3524,7 +3523,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry");
 void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
 {
-	llpushcallstacks ;
 	llassert(group);
 	if (group && group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY))
 	{
@@ -3616,7 +3614,6 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
 
 void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort)
 {
-	llpushcallstacks ;
 	//calculate maximum number of vertices to store in a single buffer
 	U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask);
 	max_vertices = llmin(max_vertices, (U32) 65535);
-- 
cgit v1.2.3


From c7fa24ea86ca2a02b4797328cbb9f2c03d8c6ee2 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Wed, 14 Apr 2010 11:12:03 -0700
Subject: IT JA linguistic

---
 indra/newview/skins/default/xui/it/panel_side_tray.xml         | 10 +++++-----
 indra/newview/skins/default/xui/ja/panel_preferences_sound.xml |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/newview/skins/default/xui/it/panel_side_tray.xml b/indra/newview/skins/default/xui/it/panel_side_tray.xml
index 846dcb69f0..e0143088a5 100644
--- a/indra/newview/skins/default/xui/it/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/it/panel_side_tray.xml
@@ -6,24 +6,24 @@
 	<sidetray_tab description="Casa." name="sidebar_home" tab_title="Home">
 		<panel label="casa" name="panel_home"/>
 	</sidetray_tab>
-	<sidetray_tab description="Modifica il tuo profilo pubblico e i preferiti." name="sidebar_me" tab_title="My Profile">
+	<sidetray_tab description="Modifica il tuo profilo pubblico e i preferiti." name="sidebar_me" tab_title="Il mio profilo">
 		<panel_container name="panel_container">
 			<panel label="Io" name="panel_me"/>
 		</panel_container>
 	</sidetray_tab>
-	<sidetray_tab description="Trova amici, contatti e persone nelle vicinanze." name="sidebar_people" tab_title="People">
+	<sidetray_tab description="Trova amici, contatti e persone nelle vicinanze." name="sidebar_people" tab_title="Persone">
 		<panel_container name="panel_container">
 			<panel label="Profilo del gruppo" name="panel_group_info_sidetray"/>
 			<panel label="Residenti e oggetti bloccati" name="panel_block_list_sidetray"/>
 		</panel_container>
 	</sidetray_tab>
-	<sidetray_tab description="Trova luoghi dove andare e luoghi già visitati." label="Luoghi" name="sidebar_places" tab_title="Places">
+	<sidetray_tab description="Trova luoghi dove andare e luoghi già visitati." label="Luoghi" name="sidebar_places" tab_title="Luoghi">
 		<panel label="Luoghi" name="panel_places"/>
 	</sidetray_tab>
-	<sidetray_tab description="Sfoglia il tuo inventario." name="sidebar_inventory" tab_title="My Inventory">
+	<sidetray_tab description="Sfoglia il tuo inventario." name="sidebar_inventory" tab_title="Il mio inventario">
 		<panel label="Modifica inventario" name="sidepanel_inventory"/>
 	</sidetray_tab>
-	<sidetray_tab description="Cambia il tuo aspetto ed il tuo look attuale." name="sidebar_appearance" tab_title="My Appearance">
+	<sidetray_tab description="Cambia il tuo aspetto ed il tuo look attuale." name="sidebar_appearance" tab_title="Il mio aspetto">
 		<panel label="Modifica aspetto fisico" name="sidepanel_appearance"/>
 	</sidetray_tab>
 </side_tray>
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
index fe830d864f..abbd29286b 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml
@@ -12,7 +12,7 @@
 	<slider label="ボイスチャット" name="Voice Volume"/>
 	<check_box label="有効" name="enable_voice_check"/>
 	<check_box label="メディアを自動再生する" name="media_auto_play_btn" tool_tip="ここにチェックを入れてメディアの自動再生を許可します" value="true"/>
-	<check_box label="他のアバターに取り付けられたメディアを再生します" name="media_show_on_others_btn" tool_tip="このチェックを外すと、近くにいる他のアバターに取り付けられたメディアを非表示にします。" value="true"/>
+	<check_box label="他のアバターに取り付けられたメディアを再生する" name="media_show_on_others_btn" tool_tip="このチェックを外すと、近くにいる他のアバターに取り付けられたメディアを非表示にします" value="true"/>
 	<text name="voice_chat_settings">
 		ボイスチャットの設定
 	</text>
-- 
cgit v1.2.3


From 6c00473593df07b76cc9db293fbdf582f8fe5d6c Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 14 Apr 2010 17:35:06 -0500
Subject: Fix for LLVOAvatarSelf calling updateVisualParams every frame --
 saves about 2ms per frame.

Reviewed by Nyx
---
 indra/newview/llvoavatarself.cpp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 98ca76ed01..5cf115890b 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -673,15 +673,6 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL
 /*virtual*/ 
 void LLVOAvatarSelf::updateVisualParams()
 {
-	for (U32 type = 0; type < WT_COUNT; type++)
-	{
-		LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type);
-		if (wearable)
-		{
-			wearable->writeToAvatar();
-		}
-	}
-
 	LLVOAvatar::updateVisualParams();
 }
 
@@ -692,7 +683,14 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
 	gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE);
 
 	// apply wearable visual params to avatar
-	updateVisualParams();
+	for (U32 type = 0; type < WT_COUNT; type++)
+	{
+		LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type);
+		if (wearable)
+		{
+			wearable->writeToAvatar();
+		}
+	}
 
 	//allow avatar to process updates
 	LLVOAvatar::idleUpdateAppearanceAnimation();
-- 
cgit v1.2.3


From c0a98f8f949c7140b3b33252c46f3bd934109a06 Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 16:31:17 -0700
Subject: added cur files to textures directory for 32 bit windows cursors

---
 indra/newview/viewer_manifest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 18ac10fe38..b9e16cd101 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -91,6 +91,7 @@ class ViewerManifest(LLManifest):
                             self.path("*.j2c")
                             self.path("*.jpg")
                             self.path("*.png")
+                            self.path("*.cur")
                             self.path("textures.xml")
                             self.end_prefix("*/textures")
                     self.path("*/xui/*/*.xml")
-- 
cgit v1.2.3


From 594612c5a2fb186fffa37dc6ae3704f28f6fcd61 Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Wed, 14 Apr 2010 17:01:53 -0700
Subject: Fix for incorrect handling of an OpenID url containing a port number

The code was using the "authority" part of the URL returned by LLURL when constructing the cookie's domain, which incorrectly included the port number.  This change makes sure any port number and username/password that might be in the authority are stripped from the string before handing it to the cookie code.

Reviewed by Gino at http://codereview.lindenlab.com/1297006
---
 indra/newview/llviewermedia.cpp | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index dd4192f270..58138d9917 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1286,7 +1286,30 @@ void LLViewerMedia::setOpenIDCookie()
 {
 	if(!sOpenIDCookie.empty())
 	{
-		getCookieStore()->setCookiesFromHost(sOpenIDCookie, sOpenIDURL.mAuthority);
+		// The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port]
+		// We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that.
+		// We therefore do it here.
+		std::string authority = sOpenIDURL.mAuthority;
+		std::string::size_type host_start = authority.find('@'); 
+		if(host_start == std::string::npos)
+		{
+			// no username/password
+			host_start = 0;
+		}
+		else
+		{
+			// Hostname starts after the @. 
+			// (If the hostname part is empty, this may put host_start at the end of the string.  In that case, it will end up passing through an empty hostname, which is correct.)
+			++host_start;
+		}
+		std::string::size_type host_end = authority.rfind(':'); 
+		if((host_end == std::string::npos) || (host_end < host_start))
+		{
+			// no port
+			host_end = authority.size();
+		}
+		
+		getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start));
 	}
 }
 
-- 
cgit v1.2.3


From e7bbdb039bd478c0baf60b0563a0455d11eccf48 Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Wed, 14 Apr 2010 17:22:28 -0700
Subject: VWR-18603 en_xui_change for ES (longest); JA linguistic

---
 indra/newview/skins/default/xui/en/floater_world_map.xml       |  2 +-
 .../newview/skins/default/xui/ja/panel_prim_media_controls.xml | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 291f8f6f51..233ab2c1b2 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -496,7 +496,7 @@
      top_delta="-1"
      name="DoSearch"
      tool_tip="Search for region"
-     width="58">
+     width="62">
 		<button.commit_callback
 		function="WMap.Location" />
     </button>
diff --git a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml
index 1fe6ad25ed..a9897c7ae4 100644
--- a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml
@@ -13,10 +13,10 @@
 	</layout_stack>
 	<layout_stack name="media_controls">
 		<layout_panel name="back">
-			<button name="back_btn" tool_tip="Navigate back"/>
+			<button name="back_btn" tool_tip="前へ"/>
 		</layout_panel>
 		<layout_panel name="fwd">
-			<button name="fwd_btn" tool_tip="Navigate forward"/>
+			<button name="fwd_btn" tool_tip="次へ"/>
 		</layout_panel>
 		<layout_panel name="home">
 			<button name="home_btn" tool_tip="ホームページ"/>
@@ -51,10 +51,10 @@
 			<slider_bar initial_value="0.5" name="media_play_slider" tool_tip="ムービー再生進行"/>
 		</layout_panel>
 		<layout_panel name="skip_back">
-			<button name="skip_back_btn" tool_tip="Step back"/>
+			<button name="skip_back_btn" tool_tip="前にステップ"/>
 		</layout_panel>
 		<layout_panel name="skip_forward">
-			<button name="skip_forward_btn" tool_tip="Step forward"/>
+			<button name="skip_forward_btn" tool_tip="次にステップ"/>
 		</layout_panel>
 		<layout_panel name="media_volume">
 			<button name="media_mute_button" tool_tip="ミュート"/>
@@ -64,7 +64,7 @@
 			<button name="zoom_frame_btn" tool_tip="メディアにズームイン"/>
 		</layout_panel>
 		<layout_panel name="close">
-			<button name="close_btn" tool_tip="Zoom Back"/>
+			<button name="close_btn" tool_tip="ズームバック"/>
 		</layout_panel>
 		<layout_panel name="new_window">
 			<button name="new_window_btn" tool_tip="URL をブラウザで開く"/>
-- 
cgit v1.2.3


From 04332ede42b62165d343d86010c1d762e348128e Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 17:57:28 -0700
Subject: EXT-6307 - World Map: field of view triangle rotates reviewed by
 monroe

---
 indra/newview/llworldmapview.cpp | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 0c37bb6eb1..151180aae7 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -900,14 +900,32 @@ void LLWorldMapView::drawFrustum()
 		// fade out in distance.
 		gGL.begin( LLRender::TRIANGLES  );
 		{
-			LLVector2 cam_lookat(LLViewerCamera::instance().getAtAxis().mV[VX], LLViewerCamera::instance().getAtAxis().mV[VY]);
-			LLVector2 cam_left(LLViewerCamera::instance().getLeftAxis().mV[VX], LLViewerCamera::instance().getLeftAxis().mV[VY]);
+			// get camera look at and left axes
+			LLVector3 at_axis = LLViewerCamera::instance().getAtAxis();
+			LLVector3 left_axis = LLViewerCamera::instance().getLeftAxis();
+
+			// grab components along XY plane
+			LLVector2 cam_lookat(at_axis.mV[VX], at_axis.mV[VY]);
+			LLVector2 cam_left(left_axis.mV[VX], left_axis.mV[VY]);
+
+			// but, when looking near straight up or down...
+			if (is_approx_zero(cam_lookat.magVecSquared()))
+			{
+				//...just fall back to looking down the x axis
+				cam_lookat = LLVector2(1.f, 0.f); // x axis
+				cam_left = LLVector2(0.f, 1.f); // y axis
+			}
+
+			// normalize to unit length
+			cam_lookat.normVec();
+			cam_left.normVec();
 
 			gGL.color4f(1.f, 1.f, 1.f, 0.25f);
 			gGL.vertex2f( 0, 0 );
 
 			gGL.color4f(1.f, 1.f, 1.f, 0.02f);
 			
+			// use 2d camera vectors to render frustum triangle
 			LLVector2 vert = cam_lookat * far_clip_pixels + cam_left * half_width_pixels;
 			gGL.vertex2f(vert.mV[VX], vert.mV[VY]);
 
-- 
cgit v1.2.3


From c4e287c909ca3c1eb7364964f225dd2d901fdf2c Mon Sep 17 00:00:00 2001
From: Eli Linden <eli@lindenlab.com>
Date: Wed, 14 Apr 2010 18:02:27 -0700
Subject: VWR-18615 missing translation

---
 indra/newview/skins/default/xui/es/panel_region_general.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/es/panel_region_general.xml b/indra/newview/skins/default/xui/es/panel_region_general.xml
index 9ee7bef493..67800b2c6f 100644
--- a/indra/newview/skins/default/xui/es/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_general.xml
@@ -32,7 +32,7 @@
 	</text>
 	<icons_combo_box label="&apos;Mature&apos;" name="access_combo">
 		<icons_combo_box.item label="&apos;Adult&apos;" name="Adult" value="42"/>
-		<icons_combo_box.item label="&apos;Mature&apos;" name="Mature" value="21"/>
+		<icons_combo_box.item label="Moderado" name="Mature" value="21"/>
 		<icons_combo_box.item label="&apos;PG&apos;" name="PG" value="13"/>
 	</icons_combo_box>
 	<button label="Aplicar" name="apply_btn"/>
-- 
cgit v1.2.3


From 10b5c10310ae56844a471eba2fd5e1808cec44db Mon Sep 17 00:00:00 2001
From: Leyla Farazha <leyla@lindenlab.com>
Date: Wed, 14 Apr 2010 18:11:51 -0700
Subject: EXT-6856 Display per media volume control reviewed by Richard cc#189

---
 indra/newview/llpanelprimmediacontrols.cpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index ab2f9284f7..83244edb8e 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -31,7 +31,6 @@
 
 #include "llviewerprecompiledheaders.h"
 
-//LLPanelPrimMediaControls
 #include "llagent.h"
 #include "llagentcamera.h"
 #include "llparcel.h"
@@ -65,9 +64,12 @@
 #include "llvovolume.h"
 #include "llweb.h"
 #include "llwindow.h"
-
 #include "llfloatertools.h"  // to enable hide if build tools are up
 
+#if defined(LL_DARWIN) || (defined(LL_WINDOW) && (! defined(LL_RELEASE_FOR_DOWNLOAD)) )
+#define PER_MEDIA_VOLUME
+#endif
+
 // Functions pulled from pipeline.cpp
 glh::matrix4f glh_get_current_modelview();
 glh::matrix4f glh_get_current_projection();
@@ -464,11 +466,18 @@ void LLPanelPrimMediaControls::updateShape()
 			mSkipBackCtrl->setVisible(FALSE);
 			mSkipBackCtrl->setEnabled(FALSE);
 			
+#ifdef PER_MEDIA_VOLUME
+			mVolumeCtrl->setVisible(has_focus);
+			mVolumeCtrl->setEnabled(has_focus);
+			mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible());
+			mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible());
+#else
 			mVolumeCtrl->setVisible(FALSE);
 			mVolumeSliderCtrl->setVisible(FALSE);
 			mVolumeCtrl->setEnabled(FALSE);
 			mVolumeSliderCtrl->setEnabled(FALSE);
-			
+#endif
+
 			if (mMediaPanelScroll)
 			{
 				mMediaPanelScroll->setVisible(has_focus);
-- 
cgit v1.2.3


From bd2b97fe40394ae9c315a886ebdfeb7067901783 Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 20:06:06 -0700
Subject: EXT-2418 and EXT-6317 found out how to fix loading 32-bit cursors
 from embedded resource and moved them back there instead of freestanding
 files

---
 indra/llwindow/llwindowwin32.cpp |  16 +-
 indra/newview/CMakeLists.txt     |   3 +
 indra/newview/res/resource.h     | 337 +++++++++++++++++--------------------
 indra/newview/res/toolbuy.cur    | Bin 0 -> 4286 bytes
 indra/newview/res/toolopen.cur   | Bin 0 -> 4286 bytes
 indra/newview/res/toolsit.cur    | Bin 0 -> 4286 bytes
 indra/newview/res/viewerRes.rc   | 353 ++++++++++++++++++++-------------------
 indra/newview/viewer_manifest.py |   1 -
 8 files changed, 341 insertions(+), 369 deletions(-)
 create mode 100644 indra/newview/res/toolbuy.cur
 create mode 100644 indra/newview/res/toolopen.cur
 create mode 100644 indra/newview/res/toolsit.cur

diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 13e71ed936..37b5c840a3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1544,16 +1544,16 @@ void LLWindowWin32::initCursors()
 	mCursor[ UI_CURSOR_TOOLZOOMIN ] = LoadCursor(module, TEXT("TOOLZOOMIN"));
 	mCursor[ UI_CURSOR_TOOLPICKOBJECT3 ] = LoadCursor(module, TEXT("TOOLPICKOBJECT3"));
 	mCursor[ UI_CURSOR_PIPETTE ] = LoadCursor(module, TEXT("TOOLPIPETTE"));
+	mCursor[ UI_CURSOR_TOOLSIT ]	= LoadCursor(module, TEXT("TOOLSIT"));
+	mCursor[ UI_CURSOR_TOOLBUY ]	= LoadCursor(module, TEXT("TOOLBUY"));
+	mCursor[ UI_CURSOR_TOOLOPEN ]	= LoadCursor(module, TEXT("TOOLOPEN"));
+
+	mCursor[ UI_CURSOR_ARROW ] = LoadCursor(module, TEXT("TOOLPLAY"));
 
 	// Color cursors
-	gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "res", "toolbuy.cur");
-
-	mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolsit.cur")).c_str());
-	mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolbuy.cur")).c_str());
-	mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolopen.cur")).c_str());
-	mCursor[UI_CURSOR_TOOLPLAY] = loadColorCursor(TEXT("TOOLPLAY"));
-	mCursor[UI_CURSOR_TOOLPAUSE] = loadColorCursor(TEXT("TOOLPAUSE"));
-	mCursor[UI_CURSOR_TOOLMEDIAOPEN] = loadColorCursor(TEXT("TOOLMEDIAOPEN"));
+	mCursor[ UI_CURSOR_TOOLPLAY ]		= loadColorCursor(TEXT("TOOLPLAY"));
+	mCursor[ UI_CURSOR_TOOLPAUSE ]		= loadColorCursor(TEXT("TOOLPAUSE"));
+	mCursor[ UI_CURSOR_TOOLMEDIAOPEN ]	= loadColorCursor(TEXT("TOOLMEDIAOPEN"));
 
 	// Note: custom cursors that are not found make LoadCursor() return NULL.
 	for( S32 i = 0; i < UI_CURSOR_COUNT; i++ )
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 8ad3b2085d..0a2ae1ed52 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1156,6 +1156,9 @@ if (WINDOWS)
         res/toolpickobject2.cur
         res/toolpickobject3.cur
         res/toolpipette.cur
+        res/toolbuy.cur
+        res/toolopen.cur
+        res/toolsit.cur
         )
 
     set_source_files_properties(${viewer_RESOURCE_FILES}
diff --git a/indra/newview/res/resource.h b/indra/newview/res/resource.h
index da27e47dfb..084fd405fb 100644
--- a/indra/newview/res/resource.h
+++ b/indra/newview/res/resource.h
@@ -1,185 +1,152 @@
-/** 
- * @file resource.h
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- * 
- * Copyright (c) 2001-2009, Linden Research, Inc.
- * 
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab.  Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- * 
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- * 
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- * 
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by viewerRes.rc
-//
-#define IDREMOVE                        3
-#define IDI_LL_ICON                     103
-#define IDC_GRABHAND                    104
-#define IDC_CURSOR1                     134
-#define IDC_CURSOR2                     136
-#define IDC_CURSOR3                     147
-#define IDB_LOGIN                       149
-#define IDC_CURSOR4                     153
-#define IDC_CURSOR5                     154
-#define IDI_LCD_LL_ICON                 157
-#define IDC_CURSOR6                     158
-#define IDC_RADIO_56                    1000
-#define IDC_RADIO_128                   1001
-#define IDC_RADIO_256                   1002
-#define IDC_RADIO_CUSTOM                1003
-#define IDC_STATIC_LAND                 1004
-#define IDC_EDIT_LAND                   1005
-#define IDC_STATIC_WATER                1006
-#define IDC_EDIT_WATER                  1007
-#define IDC_STATIC_WIND                 1008
-#define IDC_EDIT_WIND                   1009
-#define IDC_STATIC_CLOUD                1010
-#define IDC_EDIT_CLOUD                  1011
-#define IDC_STATIC_TASK                 1012
-#define IDC_EDIT_TASK                   1013
-#define IDC_STATIC_OTHER                1014
-#define IDC_EDIT_OTHER                  1015
-#define IDC_EDIT_USERNAME               1018
-#define IDC_EDIT_PASSWORD               1019
-#define IDC_EDIT_ACCOUNT                1020
-#define IDC_EDIT_GUEST                  1021
-#define IDC_EDIT_LASTNAME               1021
-#define IDC_LABEL_TEXTURE               1028
-#define IDC_BUTTON_APPLY                1030
-#define IDAPPLY                         1030
-#define IDC_BUTTON_GRAB                 1031
-#define IDC_COMBO_TEXTURE               1032
-#define IDC_RADIO_POSITION              1033
-#define IDC_RADIO_SIZE                  1034
-#define IDC_RADIO_ROTATION              1035
-#define IDC_STATIC_POS_X                1036
-#define IDC_STATIC_POS_Y                1037
-#define IDC_STATIC_POS_Z                1038
-#define IDC_EDIT_POS_X                  1039
-#define IDC_EDIT_POS_Y                  1040
-#define IDC_CHECK_AUTO_LOGIN            1040
-#define IDC_EDIT_POS_Z                  1041
-#define IDC_STATIC_FILENAME             1041
-#define IDC_STATIC_POS_X2               1042
-#define IDC_EDIT_FILENAME               1042
-#define IDC_STATIC_POS_Y2               1043
-#define IDC_COMBO_FACE                  1043
-#define IDC_STATIC_POS_Z2               1044
-#define IDC_RADIO_TEXTURE_LOW           1044
-#define IDC_COMBO_MATERIAL              1044
-#define IDC_EDIT_SIZE_X                 1045
-#define IDC_RADIO_TEXTURE_MEDIUM        1045
-#define IDC_EDIT_SIZE_Y                 1046
-#define IDC_RADIO_TEXTURE_HIGH          1046
-#define IDC_EDIT_SIZE_Z                 1047
-#define IDC_STATIC_POS_X3               1048
-#define IDC_STATIC_POS_Y3               1049
-#define IDC_STATIC_POS_Z3               1050
-#define IDC_EDIT_ROT_X                  1051
-#define IDC_EDIT_ROT_Y                  1052
-#define IDC_EDIT_ROT_Z                  1053
-#define IDC_CHECK_USE_PHYSICS           1065
-#define IDC_LIST1                       1068
-#define IDC_LIST_USER                   1068
-#define IDC_LIST_LOCATION               1068
-#define IDC_BUTTON_CHANGE               1070
-#define IDC_BUTTON_CLOSE                1071
-#define IDC_CHAT_SAY                    1072
-#define IDC_STATIC_VERT_SCALE           1073
-#define IDC_STATIC_SCALE                1073
-#define IDC_EDIT_VERT_SCALE             1074
-#define IDC_STATIC_HORIZ_SCALE          1075
-#define IDC_STATIC_SCALE2               1075
-#define IDC_EDIT_HORIZ_SCALE            1076
-#define IDC_BUTTON_STRETCH              1077
-#define IDC_BUTTON_REPEAT               1078
-#define IDC_EDIT_VERT_OFFSET            1079
-#define IDC_EDIT_HORIZ_OFFSET           1080
-#define IDC_EDIT_ROTATION               1081
-#define IDC_STATIC_KBPS1                1082
-#define IDC_STATIC_KBPS2                1083
-#define IDC_BTN_INTERNAL                1083
-#define IDC_BUTTON_RESET                1083
-#define IDC_STATIC_KBPS3                1084
-#define IDC_BTN_EXTERNAL                1084
-#define IDC_STATIC_KBPS4                1085
-#define IDC_BTN_QUIT                    1085
-#define IDC_STATIC_KBPS5                1086
-#define IDC_RESOURCE_TITLE              1086
-#define IDC_STATIC_KBPS6                1087
-#define IDC_RESOURCE_DESC               1087
-#define IDC_EDIT_SAY                    1091
-#define IDC_BTN_NORMAL                  1092
-#define IDC_BTN_WHISPER                 1093
-#define IDC_BTN_SHOUT                   1094
-#define IDC_STATIC_ACCOUNT              1102
-#define IDC_STATIC_PASSWORD             1103
-#define IDC_STATIC_GUEST                1104
-#define IDC_STATIC_SERVER               1104
-#define IDC_STATIC_SPACESERVER          1105
-#define IDC_STATIC_LASTNAME             1105
-#define IDC_CHECK_GUEST                 1106
-#define IDC_SCRIPT_EDIT                 1107
-#define IDC_LSLSYNTAX                   1108
-#define IDDONE                          1109
-#define IDC_LIST                        1110
-#define IDC_EDIT_MESSAGE                1111
-#define IDC_BUTTON_REFRESH              1112
-#define IDC_STATIC_OFFSET               1113
-#define IDC_STATIC_ROTATION             1115
-#define IDC_STATIC_FILEPATH             1115
-#define IDC_STATIC_PX                   1118
-#define IDC_STATIC_PY                   1119
-#define IDC_STATIC_PZ                   1120
-#define IDC_STATIC_SX                   1121
-#define IDC_STATIC_SY                   1122
-#define IDC_STATIC_SZ                   1123
-#define IDC_STATIC_RX                   1124
-#define IDC_STATIC_RY                   1125
-#define IDC_STATIC_RZ                   1126
-#define IDC_BTN_APPLY                   1127
-#define IDC_COMBO_SERVER                1131
-#define IDC_STATIC_FIRSTNAME            1132
-#define IDC_EDIT_FIRSTNAME              1133
-#define IDC_REMEMBER_PASSWORD           1134
-#define IDC_REMEMBER_PASSWORD2          1135
-#define IDC_FULL_SCREEN                 1135
-#define IDC_RADIO_HOME                  1136
-#define IDC_RADIO_LAST                  1137
-#define IDC_COMBO1                      1138
-#define IDC_COMBO_FARM                  1138
-#define ID_TESTMENU_TEST                40001
-#define IDC_STATIC                      -1
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        159
-#define _APS_NEXT_RESOURCE_VALUE        167
-#define _APS_NEXT_COMMAND_VALUE         40002
-#define _APS_NEXT_CONTROL_VALUE         1139
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by viewerRes.rc
+//
+#define IDREMOVE                        3
+#define IDI_LL_ICON                     103
+#define IDC_GRABHAND                    104
+#define IDC_CURSOR1                     134
+#define IDC_CURSOR2                     136
+#define IDC_CURSOR3                     147
+#define IDB_LOGIN                       149
+#define IDC_CURSOR4                     153
+#define IDC_CURSOR5                     154
+#define IDI_LCD_LL_ICON                 157
+#define IDC_CURSOR6                     158
+#define IDC_RADIO_56                    1000
+#define IDC_RADIO_128                   1001
+#define IDC_RADIO_256                   1002
+#define IDC_RADIO_CUSTOM                1003
+#define IDC_STATIC_LAND                 1004
+#define IDC_EDIT_LAND                   1005
+#define IDC_STATIC_WATER                1006
+#define IDC_EDIT_WATER                  1007
+#define IDC_STATIC_WIND                 1008
+#define IDC_EDIT_WIND                   1009
+#define IDC_STATIC_CLOUD                1010
+#define IDC_EDIT_CLOUD                  1011
+#define IDC_STATIC_TASK                 1012
+#define IDC_EDIT_TASK                   1013
+#define IDC_STATIC_OTHER                1014
+#define IDC_EDIT_OTHER                  1015
+#define IDC_EDIT_USERNAME               1018
+#define IDC_EDIT_PASSWORD               1019
+#define IDC_EDIT_ACCOUNT                1020
+#define IDC_EDIT_GUEST                  1021
+#define IDC_EDIT_LASTNAME               1021
+#define IDC_LABEL_TEXTURE               1028
+#define IDC_BUTTON_APPLY                1030
+#define IDAPPLY                         1030
+#define IDC_BUTTON_GRAB                 1031
+#define IDC_COMBO_TEXTURE               1032
+#define IDC_RADIO_POSITION              1033
+#define IDC_RADIO_SIZE                  1034
+#define IDC_RADIO_ROTATION              1035
+#define IDC_STATIC_POS_X                1036
+#define IDC_STATIC_POS_Y                1037
+#define IDC_STATIC_POS_Z                1038
+#define IDC_EDIT_POS_X                  1039
+#define IDC_EDIT_POS_Y                  1040
+#define IDC_CHECK_AUTO_LOGIN            1040
+#define IDC_EDIT_POS_Z                  1041
+#define IDC_STATIC_FILENAME             1041
+#define IDC_STATIC_POS_X2               1042
+#define IDC_EDIT_FILENAME               1042
+#define IDC_STATIC_POS_Y2               1043
+#define IDC_COMBO_FACE                  1043
+#define IDC_STATIC_POS_Z2               1044
+#define IDC_RADIO_TEXTURE_LOW           1044
+#define IDC_COMBO_MATERIAL              1044
+#define IDC_EDIT_SIZE_X                 1045
+#define IDC_RADIO_TEXTURE_MEDIUM        1045
+#define IDC_EDIT_SIZE_Y                 1046
+#define IDC_RADIO_TEXTURE_HIGH          1046
+#define IDC_EDIT_SIZE_Z                 1047
+#define IDC_STATIC_POS_X3               1048
+#define IDC_STATIC_POS_Y3               1049
+#define IDC_STATIC_POS_Z3               1050
+#define IDC_EDIT_ROT_X                  1051
+#define IDC_EDIT_ROT_Y                  1052
+#define IDC_EDIT_ROT_Z                  1053
+#define IDC_CHECK_USE_PHYSICS           1065
+#define IDC_LIST1                       1068
+#define IDC_LIST_USER                   1068
+#define IDC_LIST_LOCATION               1068
+#define IDC_BUTTON_CHANGE               1070
+#define IDC_BUTTON_CLOSE                1071
+#define IDC_CHAT_SAY                    1072
+#define IDC_STATIC_VERT_SCALE           1073
+#define IDC_STATIC_SCALE                1073
+#define IDC_EDIT_VERT_SCALE             1074
+#define IDC_STATIC_HORIZ_SCALE          1075
+#define IDC_STATIC_SCALE2               1075
+#define IDC_EDIT_HORIZ_SCALE            1076
+#define IDC_BUTTON_STRETCH              1077
+#define IDC_BUTTON_REPEAT               1078
+#define IDC_EDIT_VERT_OFFSET            1079
+#define IDC_EDIT_HORIZ_OFFSET           1080
+#define IDC_EDIT_ROTATION               1081
+#define IDC_STATIC_KBPS1                1082
+#define IDC_STATIC_KBPS2                1083
+#define IDC_BTN_INTERNAL                1083
+#define IDC_BUTTON_RESET                1083
+#define IDC_STATIC_KBPS3                1084
+#define IDC_BTN_EXTERNAL                1084
+#define IDC_STATIC_KBPS4                1085
+#define IDC_BTN_QUIT                    1085
+#define IDC_STATIC_KBPS5                1086
+#define IDC_RESOURCE_TITLE              1086
+#define IDC_STATIC_KBPS6                1087
+#define IDC_RESOURCE_DESC               1087
+#define IDC_EDIT_SAY                    1091
+#define IDC_BTN_NORMAL                  1092
+#define IDC_BTN_WHISPER                 1093
+#define IDC_BTN_SHOUT                   1094
+#define IDC_STATIC_ACCOUNT              1102
+#define IDC_STATIC_PASSWORD             1103
+#define IDC_STATIC_GUEST                1104
+#define IDC_STATIC_SERVER               1104
+#define IDC_STATIC_SPACESERVER          1105
+#define IDC_STATIC_LASTNAME             1105
+#define IDC_CHECK_GUEST                 1106
+#define IDC_SCRIPT_EDIT                 1107
+#define IDC_LSLSYNTAX                   1108
+#define IDDONE                          1109
+#define IDC_LIST                        1110
+#define IDC_EDIT_MESSAGE                1111
+#define IDC_BUTTON_REFRESH              1112
+#define IDC_STATIC_OFFSET               1113
+#define IDC_STATIC_ROTATION             1115
+#define IDC_STATIC_FILEPATH             1115
+#define IDC_STATIC_PX                   1118
+#define IDC_STATIC_PY                   1119
+#define IDC_STATIC_PZ                   1120
+#define IDC_STATIC_SX                   1121
+#define IDC_STATIC_SY                   1122
+#define IDC_STATIC_SZ                   1123
+#define IDC_STATIC_RX                   1124
+#define IDC_STATIC_RY                   1125
+#define IDC_STATIC_RZ                   1126
+#define IDC_BTN_APPLY                   1127
+#define IDC_COMBO_SERVER                1131
+#define IDC_STATIC_FIRSTNAME            1132
+#define IDC_EDIT_FIRSTNAME              1133
+#define IDC_REMEMBER_PASSWORD           1134
+#define IDC_REMEMBER_PASSWORD2          1135
+#define IDC_FULL_SCREEN                 1135
+#define IDC_RADIO_HOME                  1136
+#define IDC_RADIO_LAST                  1137
+#define IDC_COMBO1                      1138
+#define IDC_COMBO_FARM                  1138
+#define ID_TESTMENU_TEST                40001
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        173
+#define _APS_NEXT_COMMAND_VALUE         40002
+#define _APS_NEXT_CONTROL_VALUE         1139
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur
new file mode 100644
index 0000000000..a1bc278116
Binary files /dev/null and b/indra/newview/res/toolbuy.cur differ
diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur
new file mode 100644
index 0000000000..a72cdfe4c0
Binary files /dev/null and b/indra/newview/res/toolopen.cur differ
diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur
new file mode 100644
index 0000000000..6327bdb281
Binary files /dev/null and b/indra/newview/res/toolsit.cur differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 3a20d91129..b9e9cf35aa 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -1,175 +1,178 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE 
-BEGIN
-    "#include ""winres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_LL_ICON             ICON                    "ll_icon.ico"
-IDI_LCD_LL_ICON         ICON                    "icon1.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-SPLASHSCREEN DIALOG  32, 32, 144, 34
-STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
-FONT 8, "MS Sans Serif"
-BEGIN
-    ICON            IDI_LL_ICON,IDC_STATIC,7,7,20,20
-    LTEXT           "Loading Second Life...",666,36,13,91,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
-BEGIN
-    "SPLASHSCREEN", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 137
-        VERTGUIDE, 36
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 27
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Cursor
-//
-
-TOOLGRAB                CURSOR                  "lltoolgrab.cur"
-TOOLLAND                CURSOR                  "lltoolland.cur"
-TOOLZOOMIN              CURSOR                  "lltoolzoomin.cur"
-TOOLCREATE              CURSOR                  "lltoolcreate.cur"
-ARROWDRAG               CURSOR                  "llarrowdrag.cur"
-ARROW                   CURSOR                  "llarrow.cur"
-NOLOCKED                CURSOR                  "llnolocked.cur"
-ARROWLOCKED             CURSOR                  "llarrowlocked.cur"
-GRABLOCKED              CURSOR                  "llgrablocked.cur"
-TOOLROTATE              CURSOR                  "lltoolrotate.cur"
-TOOLTRANSLATE           CURSOR                  "lltooltranslate.cur"
-TOOLSCALE               CURSOR                  "lltoolscale.cur"
-TOOLCAMERA              CURSOR                  "lltoolcamera.cur"
-TOOLPAN                 CURSOR                  "lltoolpan.cur"
-TOOLFOCUS               CURSOR                  "lltoolfocus.cur"
-TOOLPICKOBJECT3         CURSOR                  "toolpickobject3.cur"
-ARROWCOPY               CURSOR                  "arrowcop.cur"
-ARROWDRAGMULTI          CURSOR                  "llarrowdragmulti.cur"
-ARROWCOPYMULTI          CURSOR                  "arrowcopmulti.cur"
-TOOLPIPETTE             CURSOR                  "toolpipette.cur"
-TOOLPLAY                CURSOR                  "toolplay.cur"
-TOOLPAUSE               CURSOR                  "toolpause.cur"
-TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,3422
- PRODUCTVERSION 2,0,0,3422
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "CompanyName", "Linden Lab"
-            VALUE "FileDescription", "Second Life"
-            VALUE "FileVersion", "2.0.0.200030"
-            VALUE "InternalName", "Second Life"
-            VALUE "LegalCopyright", "Copyright � 2001-2008, Linden Research, Inc."
-            VALUE "OriginalFilename", "SecondLife.exe"
-            VALUE "ProductName", "Second Life"
-            VALUE "ProductVersion", "2.0.0.200030"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1200
-    END
-END
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""winres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_LL_ICON             ICON                    "ll_icon.ico"
+IDI_LCD_LL_ICON         ICON                    "icon1.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+SPLASHSCREEN DIALOG  32, 32, 144, 34
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Sans Serif"
+BEGIN
+    ICON            IDI_LL_ICON,IDC_STATIC,7,7,20,20
+    LTEXT           "Loading Second Life...",666,36,13,91,8
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    "SPLASHSCREEN", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 137
+        VERTGUIDE, 36
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 27
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Cursor
+//
+
+TOOLGRAB                CURSOR                  "lltoolgrab.cur"
+TOOLLAND                CURSOR                  "lltoolland.cur"
+TOOLZOOMIN              CURSOR                  "lltoolzoomin.cur"
+TOOLCREATE              CURSOR                  "lltoolcreate.cur"
+ARROWDRAG               CURSOR                  "llarrowdrag.cur"
+ARROW                   CURSOR                  "llarrow.cur"
+NOLOCKED                CURSOR                  "llnolocked.cur"
+ARROWLOCKED             CURSOR                  "llarrowlocked.cur"
+GRABLOCKED              CURSOR                  "llgrablocked.cur"
+TOOLROTATE              CURSOR                  "lltoolrotate.cur"
+TOOLTRANSLATE           CURSOR                  "lltooltranslate.cur"
+TOOLSCALE               CURSOR                  "lltoolscale.cur"
+TOOLCAMERA              CURSOR                  "lltoolcamera.cur"
+TOOLPAN                 CURSOR                  "lltoolpan.cur"
+TOOLFOCUS               CURSOR                  "lltoolfocus.cur"
+TOOLPICKOBJECT3         CURSOR                  "toolpickobject3.cur"
+ARROWCOPY               CURSOR                  "arrowcop.cur"
+ARROWDRAGMULTI          CURSOR                  "llarrowdragmulti.cur"
+ARROWCOPYMULTI          CURSOR                  "arrowcopmulti.cur"
+TOOLPIPETTE             CURSOR                  "toolpipette.cur"
+TOOLPLAY                CURSOR                  "toolplay.cur"
+TOOLPAUSE               CURSOR                  "toolpause.cur"
+TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
+TOOLBUY                 CURSOR                  "toolbuy.cur"
+TOOLOPEN                CURSOR                  "toolopen.cur"
+TOOLSIT                 CURSOR                  "toolsit.cur"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 2,0,0,3422
+ PRODUCTVERSION 2,0,0,3422
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Linden Lab"
+            VALUE "FileDescription", "Second Life"
+            VALUE "FileVersion", "2.0.0.200030"
+            VALUE "InternalName", "Second Life"
+            VALUE "LegalCopyright", "Copyright � 2001-2008, Linden Research, Inc."
+            VALUE "OriginalFilename", "SecondLife.exe"
+            VALUE "ProductName", "Second Life"
+            VALUE "ProductVersion", "2.0.0.200030"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index b9e16cd101..18ac10fe38 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -91,7 +91,6 @@ class ViewerManifest(LLManifest):
                             self.path("*.j2c")
                             self.path("*.jpg")
                             self.path("*.png")
-                            self.path("*.cur")
                             self.path("textures.xml")
                             self.end_prefix("*/textures")
                     self.path("*/xui/*/*.xml")
-- 
cgit v1.2.3


From 6029383a798a6631addb91e373f2354557c49ea1 Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 20:12:22 -0700
Subject: fixed eol and lack of copyright in resource.h

---
 indra/newview/res/resource.h | 335 +++++++++++++++++++++++--------------------
 1 file changed, 183 insertions(+), 152 deletions(-)

diff --git a/indra/newview/res/resource.h b/indra/newview/res/resource.h
index 084fd405fb..6cabd5e10b 100644
--- a/indra/newview/res/resource.h
+++ b/indra/newview/res/resource.h
@@ -1,152 +1,183 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by viewerRes.rc
-//
-#define IDREMOVE                        3
-#define IDI_LL_ICON                     103
-#define IDC_GRABHAND                    104
-#define IDC_CURSOR1                     134
-#define IDC_CURSOR2                     136
-#define IDC_CURSOR3                     147
-#define IDB_LOGIN                       149
-#define IDC_CURSOR4                     153
-#define IDC_CURSOR5                     154
-#define IDI_LCD_LL_ICON                 157
-#define IDC_CURSOR6                     158
-#define IDC_RADIO_56                    1000
-#define IDC_RADIO_128                   1001
-#define IDC_RADIO_256                   1002
-#define IDC_RADIO_CUSTOM                1003
-#define IDC_STATIC_LAND                 1004
-#define IDC_EDIT_LAND                   1005
-#define IDC_STATIC_WATER                1006
-#define IDC_EDIT_WATER                  1007
-#define IDC_STATIC_WIND                 1008
-#define IDC_EDIT_WIND                   1009
-#define IDC_STATIC_CLOUD                1010
-#define IDC_EDIT_CLOUD                  1011
-#define IDC_STATIC_TASK                 1012
-#define IDC_EDIT_TASK                   1013
-#define IDC_STATIC_OTHER                1014
-#define IDC_EDIT_OTHER                  1015
-#define IDC_EDIT_USERNAME               1018
-#define IDC_EDIT_PASSWORD               1019
-#define IDC_EDIT_ACCOUNT                1020
-#define IDC_EDIT_GUEST                  1021
-#define IDC_EDIT_LASTNAME               1021
-#define IDC_LABEL_TEXTURE               1028
-#define IDC_BUTTON_APPLY                1030
-#define IDAPPLY                         1030
-#define IDC_BUTTON_GRAB                 1031
-#define IDC_COMBO_TEXTURE               1032
-#define IDC_RADIO_POSITION              1033
-#define IDC_RADIO_SIZE                  1034
-#define IDC_RADIO_ROTATION              1035
-#define IDC_STATIC_POS_X                1036
-#define IDC_STATIC_POS_Y                1037
-#define IDC_STATIC_POS_Z                1038
-#define IDC_EDIT_POS_X                  1039
-#define IDC_EDIT_POS_Y                  1040
-#define IDC_CHECK_AUTO_LOGIN            1040
-#define IDC_EDIT_POS_Z                  1041
-#define IDC_STATIC_FILENAME             1041
-#define IDC_STATIC_POS_X2               1042
-#define IDC_EDIT_FILENAME               1042
-#define IDC_STATIC_POS_Y2               1043
-#define IDC_COMBO_FACE                  1043
-#define IDC_STATIC_POS_Z2               1044
-#define IDC_RADIO_TEXTURE_LOW           1044
-#define IDC_COMBO_MATERIAL              1044
-#define IDC_EDIT_SIZE_X                 1045
-#define IDC_RADIO_TEXTURE_MEDIUM        1045
-#define IDC_EDIT_SIZE_Y                 1046
-#define IDC_RADIO_TEXTURE_HIGH          1046
-#define IDC_EDIT_SIZE_Z                 1047
-#define IDC_STATIC_POS_X3               1048
-#define IDC_STATIC_POS_Y3               1049
-#define IDC_STATIC_POS_Z3               1050
-#define IDC_EDIT_ROT_X                  1051
-#define IDC_EDIT_ROT_Y                  1052
-#define IDC_EDIT_ROT_Z                  1053
-#define IDC_CHECK_USE_PHYSICS           1065
-#define IDC_LIST1                       1068
-#define IDC_LIST_USER                   1068
-#define IDC_LIST_LOCATION               1068
-#define IDC_BUTTON_CHANGE               1070
-#define IDC_BUTTON_CLOSE                1071
-#define IDC_CHAT_SAY                    1072
-#define IDC_STATIC_VERT_SCALE           1073
-#define IDC_STATIC_SCALE                1073
-#define IDC_EDIT_VERT_SCALE             1074
-#define IDC_STATIC_HORIZ_SCALE          1075
-#define IDC_STATIC_SCALE2               1075
-#define IDC_EDIT_HORIZ_SCALE            1076
-#define IDC_BUTTON_STRETCH              1077
-#define IDC_BUTTON_REPEAT               1078
-#define IDC_EDIT_VERT_OFFSET            1079
-#define IDC_EDIT_HORIZ_OFFSET           1080
-#define IDC_EDIT_ROTATION               1081
-#define IDC_STATIC_KBPS1                1082
-#define IDC_STATIC_KBPS2                1083
-#define IDC_BTN_INTERNAL                1083
-#define IDC_BUTTON_RESET                1083
-#define IDC_STATIC_KBPS3                1084
-#define IDC_BTN_EXTERNAL                1084
-#define IDC_STATIC_KBPS4                1085
-#define IDC_BTN_QUIT                    1085
-#define IDC_STATIC_KBPS5                1086
-#define IDC_RESOURCE_TITLE              1086
-#define IDC_STATIC_KBPS6                1087
-#define IDC_RESOURCE_DESC               1087
-#define IDC_EDIT_SAY                    1091
-#define IDC_BTN_NORMAL                  1092
-#define IDC_BTN_WHISPER                 1093
-#define IDC_BTN_SHOUT                   1094
-#define IDC_STATIC_ACCOUNT              1102
-#define IDC_STATIC_PASSWORD             1103
-#define IDC_STATIC_GUEST                1104
-#define IDC_STATIC_SERVER               1104
-#define IDC_STATIC_SPACESERVER          1105
-#define IDC_STATIC_LASTNAME             1105
-#define IDC_CHECK_GUEST                 1106
-#define IDC_SCRIPT_EDIT                 1107
-#define IDC_LSLSYNTAX                   1108
-#define IDDONE                          1109
-#define IDC_LIST                        1110
-#define IDC_EDIT_MESSAGE                1111
-#define IDC_BUTTON_REFRESH              1112
-#define IDC_STATIC_OFFSET               1113
-#define IDC_STATIC_ROTATION             1115
-#define IDC_STATIC_FILEPATH             1115
-#define IDC_STATIC_PX                   1118
-#define IDC_STATIC_PY                   1119
-#define IDC_STATIC_PZ                   1120
-#define IDC_STATIC_SX                   1121
-#define IDC_STATIC_SY                   1122
-#define IDC_STATIC_SZ                   1123
-#define IDC_STATIC_RX                   1124
-#define IDC_STATIC_RY                   1125
-#define IDC_STATIC_RZ                   1126
-#define IDC_BTN_APPLY                   1127
-#define IDC_COMBO_SERVER                1131
-#define IDC_STATIC_FIRSTNAME            1132
-#define IDC_EDIT_FIRSTNAME              1133
-#define IDC_REMEMBER_PASSWORD           1134
-#define IDC_REMEMBER_PASSWORD2          1135
-#define IDC_FULL_SCREEN                 1135
-#define IDC_RADIO_HOME                  1136
-#define IDC_RADIO_LAST                  1137
-#define IDC_COMBO1                      1138
-#define IDC_COMBO_FARM                  1138
-#define ID_TESTMENU_TEST                40001
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        173
-#define _APS_NEXT_COMMAND_VALUE         40002
-#define _APS_NEXT_CONTROL_VALUE         1139
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
+/** 
+ * @file resource.h
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ * 
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ * 
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab.  Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * 
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ * 
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by viewerRes.rc
+//
+#define IDREMOVE                        3
+#define IDI_LL_ICON                     103
+#define IDC_GRABHAND                    104
+#define IDC_CURSOR1                     134
+#define IDC_CURSOR2                     136
+#define IDC_CURSOR3                     147
+#define IDB_LOGIN                       149
+#define IDC_CURSOR4                     153
+#define IDC_CURSOR5                     154
+#define IDI_LCD_LL_ICON                 157
+#define IDC_CURSOR6                     158
+#define IDC_RADIO_56                    1000
+#define IDC_RADIO_128                   1001
+#define IDC_RADIO_256                   1002
+#define IDC_RADIO_CUSTOM                1003
+#define IDC_STATIC_LAND                 1004
+#define IDC_EDIT_LAND                   1005
+#define IDC_STATIC_WATER                1006
+#define IDC_EDIT_WATER                  1007
+#define IDC_STATIC_WIND                 1008
+#define IDC_EDIT_WIND                   1009
+#define IDC_STATIC_CLOUD                1010
+#define IDC_EDIT_CLOUD                  1011
+#define IDC_STATIC_TASK                 1012
+#define IDC_EDIT_TASK                   1013
+#define IDC_STATIC_OTHER                1014
+#define IDC_EDIT_OTHER                  1015
+#define IDC_EDIT_USERNAME               1018
+#define IDC_EDIT_PASSWORD               1019
+#define IDC_EDIT_ACCOUNT                1020
+#define IDC_EDIT_GUEST                  1021
+#define IDC_EDIT_LASTNAME               1021
+#define IDC_LABEL_TEXTURE               1028
+#define IDC_BUTTON_APPLY                1030
+#define IDAPPLY                         1030
+#define IDC_BUTTON_GRAB                 1031
+#define IDC_COMBO_TEXTURE               1032
+#define IDC_RADIO_POSITION              1033
+#define IDC_RADIO_SIZE                  1034
+#define IDC_RADIO_ROTATION              1035
+#define IDC_STATIC_POS_X                1036
+#define IDC_STATIC_POS_Y                1037
+#define IDC_STATIC_POS_Z                1038
+#define IDC_EDIT_POS_X                  1039
+#define IDC_EDIT_POS_Y                  1040
+#define IDC_CHECK_AUTO_LOGIN            1040
+#define IDC_EDIT_POS_Z                  1041
+#define IDC_STATIC_FILENAME             1041
+#define IDC_STATIC_POS_X2               1042
+#define IDC_EDIT_FILENAME               1042
+#define IDC_STATIC_POS_Y2               1043
+#define IDC_COMBO_FACE                  1043
+#define IDC_STATIC_POS_Z2               1044
+#define IDC_RADIO_TEXTURE_LOW           1044
+#define IDC_COMBO_MATERIAL              1044
+#define IDC_EDIT_SIZE_X                 1045
+#define IDC_RADIO_TEXTURE_MEDIUM        1045
+#define IDC_EDIT_SIZE_Y                 1046
+#define IDC_RADIO_TEXTURE_HIGH          1046
+#define IDC_EDIT_SIZE_Z                 1047
+#define IDC_STATIC_POS_X3               1048
+#define IDC_STATIC_POS_Y3               1049
+#define IDC_STATIC_POS_Z3               1050
+#define IDC_EDIT_ROT_X                  1051
+#define IDC_EDIT_ROT_Y                  1052
+#define IDC_EDIT_ROT_Z                  1053
+#define IDC_CHECK_USE_PHYSICS           1065
+#define IDC_LIST1                       1068
+#define IDC_LIST_USER                   1068
+#define IDC_LIST_LOCATION               1068
+#define IDC_BUTTON_CHANGE               1070
+#define IDC_BUTTON_CLOSE                1071
+#define IDC_CHAT_SAY                    1072
+#define IDC_STATIC_VERT_SCALE           1073
+#define IDC_STATIC_SCALE                1073
+#define IDC_EDIT_VERT_SCALE             1074
+#define IDC_STATIC_HORIZ_SCALE          1075
+#define IDC_STATIC_SCALE2               1075
+#define IDC_EDIT_HORIZ_SCALE            1076
+#define IDC_BUTTON_STRETCH              1077
+#define IDC_BUTTON_REPEAT               1078
+#define IDC_EDIT_VERT_OFFSET            1079
+#define IDC_EDIT_HORIZ_OFFSET           1080
+#define IDC_EDIT_ROTATION               1081
+#define IDC_STATIC_KBPS1                1082
+#define IDC_STATIC_KBPS2                1083
+#define IDC_BTN_INTERNAL                1083
+#define IDC_BUTTON_RESET                1083
+#define IDC_STATIC_KBPS3                1084
+#define IDC_BTN_EXTERNAL                1084
+#define IDC_STATIC_KBPS4                1085
+#define IDC_BTN_QUIT                    1085
+#define IDC_STATIC_KBPS5                1086
+#define IDC_RESOURCE_TITLE              1086
+#define IDC_STATIC_KBPS6                1087
+#define IDC_RESOURCE_DESC               1087
+#define IDC_EDIT_SAY                    1091
+#define IDC_BTN_NORMAL                  1092
+#define IDC_BTN_WHISPER                 1093
+#define IDC_BTN_SHOUT                   1094
+#define IDC_STATIC_ACCOUNT              1102
+#define IDC_STATIC_PASSWORD             1103
+#define IDC_STATIC_GUEST                1104
+#define IDC_STATIC_SERVER               1104
+#define IDC_STATIC_SPACESERVER          1105
+#define IDC_STATIC_LASTNAME             1105
+#define IDC_CHECK_GUEST                 1106
+#define IDC_SCRIPT_EDIT                 1107
+#define IDC_LSLSYNTAX                   1108
+#define IDDONE                          1109
+#define IDC_LIST                        1110
+#define IDC_EDIT_MESSAGE                1111
+#define IDC_BUTTON_REFRESH              1112
+#define IDC_STATIC_OFFSET               1113
+#define IDC_STATIC_ROTATION             1115
+#define IDC_STATIC_FILEPATH             1115
+#define IDC_STATIC_PX                   1118
+#define IDC_STATIC_PY                   1119
+#define IDC_STATIC_PZ                   1120
+#define IDC_STATIC_SX                   1121
+#define IDC_STATIC_SY                   1122
+#define IDC_STATIC_SZ                   1123
+#define IDC_STATIC_RX                   1124
+#define IDC_STATIC_RY                   1125
+#define IDC_STATIC_RZ                   1126
+#define IDC_BTN_APPLY                   1127
+#define IDC_COMBO_SERVER                1131
+#define IDC_STATIC_FIRSTNAME            1132
+#define IDC_EDIT_FIRSTNAME              1133
+#define IDC_REMEMBER_PASSWORD           1134
+#define IDC_REMEMBER_PASSWORD2          1135
+#define IDC_FULL_SCREEN                 1135
+#define IDC_RADIO_HOME                  1136
+#define IDC_RADIO_LAST                  1137
+#define IDC_COMBO1                      1138
+#define IDC_COMBO_FARM                  1138
+#define ID_TESTMENU_TEST                40001
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        173
+#define _APS_NEXT_COMMAND_VALUE         40002
+#define _APS_NEXT_CONTROL_VALUE         1139
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
-- 
cgit v1.2.3


From 840533b709b5176894e1848bf72eb58ff9f7131a Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 20:15:23 -0700
Subject: fixed eol style

---
 indra/newview/res/viewerRes.rc | 356 ++++++++++++++++++++---------------------
 1 file changed, 178 insertions(+), 178 deletions(-)

diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index b9e9cf35aa..bb3378f490 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -1,178 +1,178 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE 
-BEGIN
-    "#include ""winres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_LL_ICON             ICON                    "ll_icon.ico"
-IDI_LCD_LL_ICON         ICON                    "icon1.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-SPLASHSCREEN DIALOG  32, 32, 144, 34
-STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
-FONT 8, "MS Sans Serif"
-BEGIN
-    ICON            IDI_LL_ICON,IDC_STATIC,7,7,20,20
-    LTEXT           "Loading Second Life...",666,36,13,91,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
-BEGIN
-    "SPLASHSCREEN", DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 137
-        VERTGUIDE, 36
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 27
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Cursor
-//
-
-TOOLGRAB                CURSOR                  "lltoolgrab.cur"
-TOOLLAND                CURSOR                  "lltoolland.cur"
-TOOLZOOMIN              CURSOR                  "lltoolzoomin.cur"
-TOOLCREATE              CURSOR                  "lltoolcreate.cur"
-ARROWDRAG               CURSOR                  "llarrowdrag.cur"
-ARROW                   CURSOR                  "llarrow.cur"
-NOLOCKED                CURSOR                  "llnolocked.cur"
-ARROWLOCKED             CURSOR                  "llarrowlocked.cur"
-GRABLOCKED              CURSOR                  "llgrablocked.cur"
-TOOLROTATE              CURSOR                  "lltoolrotate.cur"
-TOOLTRANSLATE           CURSOR                  "lltooltranslate.cur"
-TOOLSCALE               CURSOR                  "lltoolscale.cur"
-TOOLCAMERA              CURSOR                  "lltoolcamera.cur"
-TOOLPAN                 CURSOR                  "lltoolpan.cur"
-TOOLFOCUS               CURSOR                  "lltoolfocus.cur"
-TOOLPICKOBJECT3         CURSOR                  "toolpickobject3.cur"
-ARROWCOPY               CURSOR                  "arrowcop.cur"
-ARROWDRAGMULTI          CURSOR                  "llarrowdragmulti.cur"
-ARROWCOPYMULTI          CURSOR                  "arrowcopmulti.cur"
-TOOLPIPETTE             CURSOR                  "toolpipette.cur"
-TOOLPLAY                CURSOR                  "toolplay.cur"
-TOOLPAUSE               CURSOR                  "toolpause.cur"
-TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
-TOOLBUY                 CURSOR                  "toolbuy.cur"
-TOOLOPEN                CURSOR                  "toolopen.cur"
-TOOLSIT                 CURSOR                  "toolsit.cur"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,3422
- PRODUCTVERSION 2,0,0,3422
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904b0"
-        BEGIN
-            VALUE "CompanyName", "Linden Lab"
-            VALUE "FileDescription", "Second Life"
-            VALUE "FileVersion", "2.0.0.200030"
-            VALUE "InternalName", "Second Life"
-            VALUE "LegalCopyright", "Copyright � 2001-2008, Linden Research, Inc."
-            VALUE "OriginalFilename", "SecondLife.exe"
-            VALUE "ProductName", "Second Life"
-            VALUE "ProductVersion", "2.0.0.200030"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1200
-    END
-END
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""winres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_LL_ICON             ICON                    "ll_icon.ico"
+IDI_LCD_LL_ICON         ICON                    "icon1.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+SPLASHSCREEN DIALOG  32, 32, 144, 34
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Sans Serif"
+BEGIN
+    ICON            IDI_LL_ICON,IDC_STATIC,7,7,20,20
+    LTEXT           "Loading Second Life...",666,36,13,91,8
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    "SPLASHSCREEN", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 137
+        VERTGUIDE, 36
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 27
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Cursor
+//
+
+TOOLGRAB                CURSOR                  "lltoolgrab.cur"
+TOOLLAND                CURSOR                  "lltoolland.cur"
+TOOLZOOMIN              CURSOR                  "lltoolzoomin.cur"
+TOOLCREATE              CURSOR                  "lltoolcreate.cur"
+ARROWDRAG               CURSOR                  "llarrowdrag.cur"
+ARROW                   CURSOR                  "llarrow.cur"
+NOLOCKED                CURSOR                  "llnolocked.cur"
+ARROWLOCKED             CURSOR                  "llarrowlocked.cur"
+GRABLOCKED              CURSOR                  "llgrablocked.cur"
+TOOLROTATE              CURSOR                  "lltoolrotate.cur"
+TOOLTRANSLATE           CURSOR                  "lltooltranslate.cur"
+TOOLSCALE               CURSOR                  "lltoolscale.cur"
+TOOLCAMERA              CURSOR                  "lltoolcamera.cur"
+TOOLPAN                 CURSOR                  "lltoolpan.cur"
+TOOLFOCUS               CURSOR                  "lltoolfocus.cur"
+TOOLPICKOBJECT3         CURSOR                  "toolpickobject3.cur"
+ARROWCOPY               CURSOR                  "arrowcop.cur"
+ARROWDRAGMULTI          CURSOR                  "llarrowdragmulti.cur"
+ARROWCOPYMULTI          CURSOR                  "arrowcopmulti.cur"
+TOOLPIPETTE             CURSOR                  "toolpipette.cur"
+TOOLPLAY                CURSOR                  "toolplay.cur"
+TOOLPAUSE               CURSOR                  "toolpause.cur"
+TOOLMEDIAOPEN           CURSOR                  "toolmediaopen.cur"
+TOOLBUY                 CURSOR                  "toolbuy.cur"
+TOOLOPEN                CURSOR                  "toolopen.cur"
+TOOLSIT                 CURSOR                  "toolsit.cur"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 2,0,0,3422
+ PRODUCTVERSION 2,0,0,3422
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Linden Lab"
+            VALUE "FileDescription", "Second Life"
+            VALUE "FileVersion", "2.0.0.200030"
+            VALUE "InternalName", "Second Life"
+            VALUE "LegalCopyright", "Copyright � 2001-2008, Linden Research, Inc."
+            VALUE "OriginalFilename", "SecondLife.exe"
+            VALUE "ProductName", "Second Life"
+            VALUE "ProductVersion", "2.0.0.200030"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
-- 
cgit v1.2.3


From fcb36144dd78d0fa9cacc6fd6e036846493ea2a2 Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Wed, 14 Apr 2010 20:17:44 -0700
Subject: accidentally changed default cursor for testing purposes, reverted

---
 indra/llwindow/llwindowwin32.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 37b5c840a3..5be1bf1665 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1548,8 +1548,6 @@ void LLWindowWin32::initCursors()
 	mCursor[ UI_CURSOR_TOOLBUY ]	= LoadCursor(module, TEXT("TOOLBUY"));
 	mCursor[ UI_CURSOR_TOOLOPEN ]	= LoadCursor(module, TEXT("TOOLOPEN"));
 
-	mCursor[ UI_CURSOR_ARROW ] = LoadCursor(module, TEXT("TOOLPLAY"));
-
 	// Color cursors
 	mCursor[ UI_CURSOR_TOOLPLAY ]		= loadColorCursor(TEXT("TOOLPLAY"));
 	mCursor[ UI_CURSOR_TOOLPAUSE ]		= loadColorCursor(TEXT("TOOLPAUSE"));
-- 
cgit v1.2.3