From fed26cf76ebf401decc4e3fb2faa7b5f822bb588 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 17 Nov 2009 15:00:25 -0500
Subject: EXT-2568 : Reset Current Look string if wearing from non-outfit

If you wear a category, then the current look string on the appearance sidepanel gets set back to NULL.

--HG--
branch : avatar-pipeline
---
 indra/newview/llappearancemgr.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 043f6f37bf..71cd6faecc 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -536,6 +536,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
 	linkAll(cof, obj_items, link_waiter);
 	linkAll(cof, gest_items, link_waiter);
 
+	LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
 	// Add link to outfit if category is an outfit. 
 	LLViewerInventoryCategory* catp = gInventory.getCategory(category);
 	if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)
@@ -544,13 +545,18 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
 							LLAssetType::AT_LINK_FOLDER, link_waiter);
 
 		// Update the current outfit name of the appearance sidepanel.
-		LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
 		if (panel_appearance)
 		{
 			panel_appearance->refreshCurrentOutfitName(catp->getName());
 		}
 	}
-							  
+	else
+	{
+		if (panel_appearance)
+		{
+			panel_appearance->refreshCurrentOutfitName("");
+		}
+	}
 }
 
 void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
-- 
cgit v1.2.3


From 08cbeea3c72be69137b7ca7d4a95cc7d80fc176e Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 17 Nov 2009 15:03:14 -0500
Subject: EXT-2583 : Some sidepanel inventory folders appear blank

Starting sidepanel inventory folders as open by default.
Also did some minor syntactic cleanup on the folder filter iterators.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderviewitem.cpp | 40 ++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index bf74c5c936..1096f25f0c 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -1253,6 +1253,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 			// filter self only on first pass through
 			LLFolderViewItem::filter( filter );
 		}
+		if (mDontShowInHierarchy)
+		{
+			setOpen();
+		}
 	}
 
 	if (getRoot()->getDebugFilters())
@@ -1286,9 +1290,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 
 	// now query children
 	for (folders_t::iterator iter = mFolders.begin();
-		iter != mFolders.end();)
+		 iter != mFolders.end();
+		 ++iter)
 	{
-		folders_t::iterator fit = iter++;
+		LLFolderViewFolder* folder = (*iter);
 		// have we run out of iterations this frame?
 		if (filter.getFilterCount() < 0)
 		{
@@ -1298,15 +1303,15 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 		// mMostFilteredDescendantGeneration might have been reset
 		// in which case we need to update it even for folders that
 		// don't need to be filtered anymore
-		if ((*fit)->getCompletedFilterGeneration() >= filter_generation)
+		if (folder->getCompletedFilterGeneration() >= filter_generation)
 		{
 			// track latest generation to pass any child items
-			if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter.getMinRequiredGeneration()))
+			if (folder->getFiltered() || folder->hasFilteredDescendants(filter.getMinRequiredGeneration()))
 			{
 				mMostFilteredDescendantGeneration = filter_generation;
 				if (getRoot()->needsAutoSelect() && autoopen_folders)
 				{
-					(*fit)->setOpenArrangeRecursively(TRUE);
+					folder->setOpenArrangeRecursively(TRUE);
 				}
 			}
 			// just skip it, it has already been filtered
@@ -1314,48 +1319,49 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 		}
 
 		// update this folders filter status (and children)
-		(*fit)->filter( filter );
+		folder->filter( filter );
 
 		// track latest generation to pass any child items
-		if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter_generation))
+		if (folder->getFiltered() || folder->hasFilteredDescendants(filter_generation))
 		{
 			mMostFilteredDescendantGeneration = filter_generation;
 			if (getRoot()->needsAutoSelect() && autoopen_folders)
 			{
-				(*fit)->setOpenArrangeRecursively(TRUE);
+				folder->setOpenArrangeRecursively(TRUE);
 			}
 		}
 	}
 
 	for (items_t::iterator iter = mItems.begin();
-		iter != mItems.end();)
+		 iter != mItems.end();
+		 ++iter)
 	{
-		items_t::iterator iit = iter++;
+		LLFolderViewItem* item = (*iter);
 		if (filter.getFilterCount() < 0)
 		{
 			break;
 		}
-		if ((*iit)->getLastFilterGeneration() >= filter_generation)
+		if (item->getLastFilterGeneration() >= filter_generation)
 		{
-			if ((*iit)->getFiltered())
+			if (item->getFiltered())
 			{
 				mMostFilteredDescendantGeneration = filter_generation;
 			}
 			continue;
 		}
 
-		if ((*iit)->getLastFilterGeneration() >= must_pass_generation && 
-			!(*iit)->getFiltered(must_pass_generation))
+		if (item->getLastFilterGeneration() >= must_pass_generation && 
+			!item->getFiltered(must_pass_generation))
 		{
 			// failed to pass an earlier filter that was a subset of the current one
 			// go ahead and flag this item as done
-			(*iit)->setFiltered(FALSE, filter_generation);
+			item->setFiltered(FALSE, filter_generation);
 			continue;
 		}
 
-		(*iit)->filter( filter );
+		item->filter( filter );
 
-		if ((*iit)->getFiltered(filter.getMinRequiredGeneration()))
+		if (item->getFiltered(filter.getMinRequiredGeneration()))
 		{
 			mMostFilteredDescendantGeneration = filter_generation;
 		}
-- 
cgit v1.2.3


From 2b0a997b13de15c7aae009b52d7353c97e1781f3 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 17 Nov 2009 15:06:27 -0500
Subject: Small fix for updating enabled state of Wear/Edit buttons.

--HG--
branch : avatar-pipeline
---
 indra/newview/llpaneloutfitsinventory.cpp | 4 ++++
 indra/newview/llsidepanelappearance.cpp   | 1 +
 2 files changed, 5 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 5ad9bf056e..c4bde369db 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -148,12 +148,16 @@ void LLPanelOutfitsInventory::onNew()
 {
 	const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
 	LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name);
+	/*
 	getRootFolder()->setSelectionByID(outfit_folder, TRUE);
 	getRootFolder()->setNeedsAutoRename(TRUE);
+	getRootFolder()->startRenamingSelectedItem();
+	*/
 }
 
 void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
+	updateListCommands();
 	updateParent();
 }
 
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index aeab3e2876..28c06b41e0 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -140,6 +140,7 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
 {
 	fetchInventory();
 	refreshCurrentOutfitName();
+	updateVerbs();
 
 	if(key.size() == 0)
 		return;
-- 
cgit v1.2.3


From 815f336a157cc33233633deed66634195d3dc552 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 18 Nov 2009 11:23:59 -0500
Subject: For EXT-2574, EXT-2577: remove from outfit now enforces mandatory
 body parts, teen underthings

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2d8b058ed8..aef412d24a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4294,32 +4294,37 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
 		{
 			for(i = 0; i  < wearable_count; ++i)
 			{
-				if( gAgentWearables.isWearingItem (item_array.get(i)->getUUID()) )
+				LLViewerInventoryItem *item = item_array.get(i);
+				if (item->getType() == LLAssetType::AT_BODYPART)
+					continue;
+				if (gAgent.isTeen() && item->isWearableType() &&
+					(item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT))
+					continue;
+				if( gAgentWearables.isWearingItem (item->getLinkedUUID()) )
 				{
-					LLWearableList::instance().getAsset(item_array.get(i)->getAssetUUID(),
-														item_array.get(i)->getName(),
-														item_array.get(i)->getType(),
+					LLWearableList::instance().getAsset(item->getAssetUUID(),
+														item->getName(),
+														item->getType(),
 														LLWearableBridge::onRemoveFromAvatarArrived,
-														new OnRemoveStruct(item_array.get(i)->getUUID()));
-
+														new OnRemoveStruct(item->getLinkedUUID()));
 				}
 			}
 		}
 
-
 		if (obj_count > 0)
 		{
 			for(i = 0; i  < obj_count; ++i)
 			{
+				LLViewerInventoryItem *obj_item = obj_item_array.get(i);
 				gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
 				gMessageSystem->nextBlockFast(_PREHASH_ObjectData );
 				gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
-				gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item_array.get(i)->getUUID() );
+				gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->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( obj_item_array.get(i)->getUUID());
+				LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID());
 				if (found_obj)
 				{
 					LLSelectMgr::getInstance()->remove(found_obj);
@@ -4331,10 +4336,11 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
 		{
 			for(i = 0; i  < gest_count; ++i)
 			{
-				if ( LLGestureManager::instance().isGestureActive( gest_item_array.get(i)->getUUID()) )
+				LLViewerInventoryItem *gest_item = gest_item_array.get(i);
+				if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) )
 				{
-					LLGestureManager::instance().deactivateGesture( gest_item_array.get(i)->getUUID() );
-					gInventory.updateItem( gest_item_array.get(i) );
+					LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() );
+					gInventory.updateItem( gest_item );
 					gInventory.notifyObservers();
 				}
 
-- 
cgit v1.2.3


From 0c95f8bf30bc6ec9835c5a298bf27115a2a92047 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 19 Nov 2009 12:03:11 -0500
Subject: For EXT-2623 - object missing wearables and attachments on initial
 login

--HG--
branch : avatar-pipeline
---
 indra/newview/llagentwearables.cpp    | 57 ++++++++++++++++++++++++++++++++---
 indra/newview/llinventoryobserver.cpp |  3 +-
 2 files changed, 55 insertions(+), 5 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 6b2033fc6f..e78ea88b94 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2196,11 +2196,48 @@ void LLInitialWearablesFetch::processContents()
 	delete this;
 }
 
+class LLFetchAndLinkObserver: public LLInventoryFetchObserver
+{
+public:
+	LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids):
+		m_ids(ids)
+	{
+		llwarns << "LLFetchAndLinkObserver" << llendl;
+	}
+	~LLFetchAndLinkObserver()
+	{
+		llwarns << "~LLFetchAndLinkObserver" << llendl;
+	}
+	virtual void done()
+	{
+		gInventory.removeObserver(this);
+		// Link to all fetched items in COF.
+		for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin();
+			 it != m_ids.end();
+			 ++it)
+		{
+			LLUUID id = *it;
+			LLViewerInventoryItem *item = gInventory.getItem(*it);
+			if (!item)
+			{
+				llwarns << "LLFetchAndLinkObserver fetch failed!" << llendl;
+				continue;
+			}
+			link_inventory_item(gAgent.getID(), item->getLinkedUUID(), LLAppearanceManager::instance().getCOF(), item->getName(),
+								LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+		}
+
+	}
+private:
+	LLInventoryFetchObserver::item_ref_t m_ids;
+};
+
 void LLInitialWearablesFetch::processWearablesMessage()
 {
 	if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead.
 	{
-		const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
+		const LLUUID current_outfit_id = LLAppearanceManager::instance().getCOF();
+		LLInventoryFetchObserver::item_ref_t ids;
 		for (U8 i = 0; i < mAgentInitialWearables.size(); ++i)
 		{
 			// Populate the current outfit folder with links to the wearables passed in the message
@@ -2209,9 +2246,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
 			if (wearable_data->mAssetID.notNull())
 			{
 #ifdef USE_CURRENT_OUTFIT_FOLDER
-				const std::string link_name = "WearableLink"; // Unimportant what this is named, it isn't exposed.
-				link_inventory_item(gAgent.getID(), wearable_data->mItemID, current_outfit_id, link_name,
-									LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+				ids.push_back(wearable_data->mItemID);
 #endif
 				// Fetch the wearables
 				LLWearableList::instance().getAsset(wearable_data->mAssetID,
@@ -2225,6 +2260,20 @@ void LLInitialWearablesFetch::processWearablesMessage()
 				<< wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl;
 			}
 		}
+
+		// Need to fetch the inventory items for ids, then create links to them after they arrive.
+		LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids);
+		fetcher->fetchItems(ids);
+		// If no items to be fetched, done will never be triggered.
+		// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
+		if (fetcher->isEverythingComplete())
+		{
+			fetcher->done();
+		}
+		else
+		{
+			gInventory.addObserver(fetcher);
+		}
 	}
 	else
 	{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 3ccf593d27..e904fb6c92 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -115,7 +115,8 @@ void LLInventoryFetchObserver::changed(U32 mask)
 				// BUG: This can cause done() to get called prematurely below.
 				// This happens with the LLGestureInventoryFetchObserver that
 				// loads gestures at startup. JC
-				it = mIncomplete.erase(it);
+				//it = mIncomplete.erase(it);
+				++it;
 				continue;
 			}
 			if(item->isComplete())
-- 
cgit v1.2.3


From ddb7ce417979cedf733dadb09dbe0edd49b9f4bc Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Thu, 19 Nov 2009 13:55:07 -0500
Subject: EXT-2601 edit appearance: label_min / label_max not translated

strings are already in strings.xml, just had to actually translate the
labels where they were being applied.

Code reviewed by Bigpapi

--HG--
branch : avatar-pipeline
---
 indra/newview/llscrollingpanelparam.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index b5e55df1f5..32a915608e 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -86,9 +86,8 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param
 	childSetEnabled("param slider", mAllowModify);
 	childSetCommitCallback("param slider", LLScrollingPanelParam::onSliderMoved, this);
 
-	// *TODO: Translate
-	std::string min_name = param->getMinDisplayName();
-	std::string max_name = param->getMaxDisplayName();
+	std::string min_name = LLTrans::getString(param->getMinDisplayName());
+	std::string max_name = LLTrans::getString(param->getMaxDisplayName());
 	childSetValue("min param text", min_name);
 	childSetValue("max param text", max_name);
 
-- 
cgit v1.2.3


From 62ce5fa4628672c8f9b95faac2797ce82c59deed Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 19 Nov 2009 16:00:40 -0500
Subject: For EXT-2623 - object missing wearables and attachments on initial
 login

--HG--
branch : avatar-pipeline
---
 indra/newview/llagentwearables.cpp    | 30 +++++++++++++++++++++++++-----
 indra/newview/llappearancemgr.cpp     |  4 ++++
 indra/newview/llinventoryobserver.cpp | 19 ++++++++++++++-----
 indra/newview/llinventoryobserver.h   |  3 ++-
 4 files changed, 45 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e78ea88b94..a93b0c1357 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2190,8 +2190,6 @@ void LLInitialWearablesFetch::processContents()
 	else
 	{
 		processWearablesMessage();
-		// Create links for attachments that may have arrived before the COF existed.
-		LLAppearanceManager::instance().linkRegisteredAttachments();
 	}
 	delete this;
 }
@@ -2200,7 +2198,8 @@ class LLFetchAndLinkObserver: public LLInventoryFetchObserver
 {
 public:
 	LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids):
-		m_ids(ids)
+		m_ids(ids),
+		LLInventoryFetchObserver(true)
 	{
 		llwarns << "LLFetchAndLinkObserver" << llendl;
 	}
@@ -2220,13 +2219,12 @@ public:
 			LLViewerInventoryItem *item = gInventory.getItem(*it);
 			if (!item)
 			{
-				llwarns << "LLFetchAndLinkObserver fetch failed!" << llendl;
+				llwarns << "fetch failed!" << llendl;
 				continue;
 			}
 			link_inventory_item(gAgent.getID(), item->getLinkedUUID(), LLAppearanceManager::instance().getCOF(), item->getName(),
 								LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
 		}
-
 	}
 private:
 	LLInventoryFetchObserver::item_ref_t m_ids;
@@ -2261,6 +2259,28 @@ void LLInitialWearablesFetch::processWearablesMessage()
 			}
 		}
 
+		// Add all current attachments to the requested items as well.
+		LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
+		if( avatar )
+		{
+			for (LLVOAvatar::attachment_map_t::const_iterator iter = avatar->mAttachmentPoints.begin(); 
+				 iter != avatar->mAttachmentPoints.end(); ++iter)
+			{
+				LLViewerJointAttachment* attachment = iter->second;
+				if (!attachment) continue;
+				for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+					 attachment_iter != attachment->mAttachedObjects.end();
+					 ++attachment_iter)
+				{
+					LLViewerObject* attached_object = (*attachment_iter);
+					if (!attached_object) continue;
+					const LLUUID& item_id = attached_object->getItemID();
+					if (item_id.isNull()) continue;
+					ids.push_back(item_id);
+				}
+			}
+		}
+
 		// Need to fetch the inventory items for ids, then create links to them after they arrive.
 		LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids);
 		fetcher->fetchItems(ids);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 60c6061e96..bec70ce827 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -990,6 +990,10 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
 			   gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
 			   gInventory.notifyObservers();
 		   }
+		   else
+		   {
+			   llwarns << "missing item, can't link" << llendl;
+		   }
 	   }
 	   else
 	   {
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index e904fb6c92..06f4b36df3 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -112,11 +112,20 @@ void LLInventoryFetchObserver::changed(U32 mask)
 			LLViewerInventoryItem* item = gInventory.getItem(*it);
 			if(!item)
 			{
-				// BUG: This can cause done() to get called prematurely below.
-				// This happens with the LLGestureInventoryFetchObserver that
-				// loads gestures at startup. JC
-				//it = mIncomplete.erase(it);
-				++it;
+				if (mRetryIfMissing)
+				{
+					// 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.
+					++it;
+				}
+				else
+				{
+					// BUG: This can cause done() to get called prematurely below.
+					// This happens with the LLGestureInventoryFetchObserver that
+					// loads gestures at startup. JC
+					it = mIncomplete.erase(it);
+				}
 				continue;
 			}
 			if(item->isComplete())
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 384e6292e8..3a083e913b 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -106,7 +106,7 @@ protected:
 class LLInventoryFetchObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryFetchObserver() {}
+	LLInventoryFetchObserver(bool retry_if_missing = false): mRetryIfMissing(retry_if_missing) {}
 	virtual void changed(U32 mask);
 
 	typedef std::vector<LLUUID> item_ref_t;
@@ -116,6 +116,7 @@ public:
 	virtual void done() = 0;
 
 protected:
+	bool mRetryIfMissing;
 	item_ref_t mComplete;
 	item_ref_t mIncomplete;
 };
-- 
cgit v1.2.3


From fae78349915a1f8603beb034166f8ea5c64dc5a6 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 19 Nov 2009 17:36:13 -0500
Subject: cleanup: log file spam

--HG--
branch : avatar-pipeline
---
 indra/newview/llagentwearables.cpp | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index a93b0c1357..6595e28622 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2160,7 +2160,6 @@ void LLLibraryOutfitsFetch::contentsDone(void)
 
 LLInitialWearablesFetch::~LLInitialWearablesFetch()
 {
-	llinfos << "~LLInitialWearablesFetch" << llendl;
 }
 
 // virtual
@@ -2201,11 +2200,9 @@ public:
 		m_ids(ids),
 		LLInventoryFetchObserver(true)
 	{
-		llwarns << "LLFetchAndLinkObserver" << llendl;
 	}
 	~LLFetchAndLinkObserver()
 	{
-		llwarns << "~LLFetchAndLinkObserver" << llendl;
 	}
 	virtual void done()
 	{
-- 
cgit v1.2.3


From ad86caf4790d45b0d7c6776c9f840e3023c52033 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Thu, 19 Nov 2009 17:56:30 -0500
Subject: EXT-2668 : Screwy logic for figuring out if a folder is removable
 EXT-2661 : "Remove From Outfit" on COF doesn't take off my outfit EXT-2662 :
 Can't delete a worn item link

Cleaned up the whole "isItemRemovable" logic, and having folders figure this out recursively via children.
Changed the isItemRemovable logic so that links aren't treated as worn for the purposes of deletion.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderviewitem.cpp  | 16 +++++++
 indra/newview/llfolderviewitem.h    |  3 ++
 indra/newview/llinventorybridge.cpp | 94 ++++++++++++++++++-------------------
 indra/newview/llinventorybridge.h   |  2 -
 4 files changed, 64 insertions(+), 51 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 1096f25f0c..41e3279795 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2030,6 +2030,22 @@ void LLFolderViewFolder::openItem( void )
 	toggleOpen();
 }
 
+void LLFolderViewFolder::applyFunctorToChildren(LLFolderViewFunctor& functor)
+{
+	for (folders_t::iterator iter = mFolders.begin();
+		iter != mFolders.end();)
+	{
+		folders_t::iterator fit = iter++;
+		functor.doItem((*fit));
+	}
+	for (items_t::iterator iter = mItems.begin();
+		iter != mItems.end();)
+	{
+		items_t::iterator iit = iter++;
+		functor.doItem((*iit));
+	}
+}
+
 void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor)
 {
 	functor.doFolder(this);
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 30387812a6..f6264ec968 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -501,6 +501,9 @@ public:
 	void applyFunctorRecursively(LLFolderViewFunctor& functor);
 	virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
 
+	// Just apply this functor to the folder's immediate children.
+	void applyFunctorToChildren(LLFolderViewFunctor& functor);
+
 	virtual void openItem( void );
 	virtual BOOL addItem(LLFolderViewItem* item);
 	virtual BOOL addFolder( LLFolderViewFolder* folder);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index bb8b45ef11..578cf7bebc 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -171,16 +171,33 @@ time_t LLInvFVBridge::getCreationDate() const
 	return 0;
 }
 
-// Can be destoryed (or moved to trash)
+// Can be destroyed (or moved to trash)
 BOOL LLInvFVBridge::isItemRemovable()
 {
-	LLInventoryModel* model = getInventoryModel();
-	if(!model) return FALSE;
-	if(model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
+	const LLInventoryModel* model = getInventoryModel();
+	if(!model) 
+	{
+		return FALSE;
+	}
+	if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
+	{
+		return FALSE;
+	}
+	const LLInventoryObject *obj = model->getItem(mUUID);
+	if (obj && obj->getIsLinkType())
 	{
 		return TRUE;
 	}
-	return FALSE;
+	if (gAgentWearables.isWearingItem(mUUID))
+	{
+		return FALSE;
+	}
+	const LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
+	if (avatar && avatar->isWearingAttachment(mUUID))
+	{
+		return FALSE;
+	}
+	return TRUE;
 }
 
 // Can be moved to another folder
@@ -1303,6 +1320,23 @@ void LLFolderBridge::selectItem()
 }
 
 
+// Iterate through a folder's children to determine if
+// all the children are removable.
+class LLIsItemRemovable : public LLFolderViewFunctor
+{
+public:
+	LLIsItemRemovable() : mPassed(TRUE) {}
+	virtual void doFolder(LLFolderViewFolder* folder)
+	{
+		mPassed &= folder->getListener()->isItemRemovable();
+	}
+	virtual void doItem(LLFolderViewItem* item)
+	{
+		mPassed &= item->getListener()->isItemRemovable();
+	}
+	BOOL mPassed;
+};
+
 // Can be destroyed (or moved to trash)
 BOOL LLFolderBridge::isItemRemovable()
 {
@@ -1334,41 +1368,17 @@ BOOL LLFolderBridge::isItemRemovable()
 		return FALSE;
 	}
 
-	LLInventoryModel::cat_array_t	descendent_categories;
-	LLInventoryModel::item_array_t	descendent_items;
-	gInventory.collectDescendents( mUUID, descendent_categories, descendent_items, FALSE );
-
-	S32 i;
-	for( i = 0; i < descendent_categories.count(); i++ )
+	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+	LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL);
+	if (folderp)
 	{
-		LLInventoryCategory* category = descendent_categories[i];
-		if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
+		LLIsItemRemovable folder_test;
+		folderp->applyFunctorToChildren(folder_test);
+		if (!folder_test.mPassed)
 		{
 			return FALSE;
 		}
 	}
-
-	for( i = 0; i < descendent_items.count(); i++ )
-	{
-		LLInventoryItem* item = descendent_items[i];
-		if( (item->getType() == LLAssetType::AT_CLOTHING) ||
-			(item->getType() == LLAssetType::AT_BODYPART) )
-		{
-			if(gAgentWearables.isWearingItem(item->getUUID()))
-			{
-				return FALSE;
-			}
-		}
-		else
-		if( item->getType() == LLAssetType::AT_OBJECT )
-		{
-			if(avatar->isWearingAttachment(item->getUUID()))
-			{
-				return FALSE;
-			}
-		}
-	}
-
 	return TRUE;
 }
 
@@ -3772,14 +3782,6 @@ LLItemBridge(inventory, uuid), mInvType(type)
 	mIsMultiObject = ( flags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ?  TRUE: FALSE;
 }
 
-BOOL LLObjectBridge::isItemRemovable()
-{
-	LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
-	if(!avatar) return FALSE;
-	if(avatar->isWearingAttachment(mUUID)) return FALSE;
-	return LLInvFVBridge::isItemRemovable();
-}
-
 LLUIImagePtr LLObjectBridge::getIcon() const
 {
 	return get_item_icon(LLAssetType::AT_OBJECT, mInvType, mAttachPt, mIsMultiObject );
@@ -4299,12 +4301,6 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name)
 	return LLItemBridge::renameItem(new_name);
 }
 
-BOOL LLWearableBridge::isItemRemovable()
-{
-	if (gAgentWearables.isWearingItem(mUUID)) return FALSE;
-	return LLInvFVBridge::isItemRemovable();
-}
-
 std::string LLWearableBridge::getLabelSuffix() const
 {
 	if( gAgentWearables.isWearingItem( mUUID ) )
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 49e64ebdde..7534548894 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -508,7 +508,6 @@ public:
 	virtual LLFontGL::StyleFlags getLabelStyle() const;
 	virtual std::string getLabelSuffix() const;
 	virtual void			buildContextMenu(LLMenuGL& menu, U32 flags);
-	virtual BOOL			isItemRemovable();
 	virtual BOOL renameItem(const std::string& new_name);
 
 	LLInventoryObject* getObject() const;
@@ -546,7 +545,6 @@ public:
 	virtual void	openItem();
 	virtual void	buildContextMenu(LLMenuGL& menu, U32 flags);
 	virtual std::string getLabelSuffix() const;
-	virtual BOOL	isItemRemovable();
 	virtual BOOL renameItem(const std::string& new_name);
 
 	static void		onWearOnAvatar( void* userdata );	// Access to wearOnAvatar() from menu
-- 
cgit v1.2.3


From 56a861138b451ab7f7c20c6c461a6243edca8069 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Thu, 19 Nov 2009 21:57:14 -0500
Subject: EXT-2675 : Folder that contains baseitems for COF doesn't load on
 first click EXT-2456 : Usability: Inventory > Clothing > context menu not
 intuitive

RightClickFetchInventoryObserver now works correctly to update menu
FetchInventoryDescendents now triggers notifyObservers properly
Fixed up gInventory.notifyObservers logic

--HG--
branch : avatar-pipeline
---
 indra/newview/llappviewer.cpp       |  2 +-
 indra/newview/llinventorybridge.cpp |  5 +++++
 indra/newview/llinventorymodel.cpp  | 27 +++++++++++++++------------
 indra/newview/llinventorymodel.h    |  9 ++++++---
 4 files changed, 27 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a5ca06ce30..af17286c9c 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3534,7 +3534,7 @@ void LLAppViewer::idle()
 		gEventNotifier.update();
 		
 		gIdleCallbacks.callFunctions();
-		gInventory.notifyObservers();
+		gInventory.idleNotifyObservers();
 	}
 	
 	if (gDisconnected)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 578cf7bebc..c8540bdbd2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -492,6 +492,7 @@ void hide_context_entries(LLMenuGL& menu,
 		}
 		else
 		{
+			(*itor)->setVisible(TRUE);
 			for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2)
 			{
 				if (*itor2 == name)
@@ -2359,6 +2360,10 @@ void LLFolderBridge::folderOptionsMenu()
 		mItems.push_back(std::string("Remove From Outfit"));
 	}
 	hide_context_entries(*mMenu, mItems, disabled_items);
+
+	// Reposition the menu, in case we're adding items to an existing menu.
+	mMenu->needsArrange();
+	mMenu->arrangeAndClear();
 }
 
 BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type)
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index fbaab385fe..9e37c5be38 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1118,9 +1118,16 @@ BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer) const
 	return mObservers.find(observer) != mObservers.end();
 }
 
-// Call this method when it's time to update everyone on a new state,
-// by default, the inventory model will not update observers
-// automatically.
+void LLInventoryModel::idleNotifyObservers()
+{
+	if (mModifyMask == LLInventoryObserver::NONE && (mChangedItemIDs.size() == 0))
+	{
+		return;
+	}
+	notifyObservers("");
+}
+
+// Call this method when it's time to update everyone on a new state.
 // The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328]
 void LLInventoryModel::notifyObservers(const std::string service_name)
 {
@@ -1133,13 +1140,6 @@ void LLInventoryModel::notifyObservers(const std::string service_name)
 		return;
 	}
 
-	if ((mModifyMask == LLInventoryObserver::NONE) && (service_name == ""))
-	{
-		mModifyMask = LLInventoryObserver::NONE;
-		mChangedItemIDs.clear();
-		return;
-	}
-
 	mIsNotifyObservers = TRUE;
 	for (observer_list_t::iterator iter = mObservers.begin();
 		 iter != mObservers.end(); )
@@ -3308,8 +3308,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
 	msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
 	if(agent_id != gAgent.getID())
 	{
-		llwarns << "Got a UpdateInventoryItem for the wrong agent."
-				<< llendl;
+		llwarns << "Got a UpdateInventoryItem for the wrong agent." << llendl;
 		return;
 	}
 	LLUUID parent_id;
@@ -3320,6 +3319,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
 	msg->getS32("AgentData", "Version", version);
 	S32 descendents;
 	msg->getS32("AgentData", "Descendents", descendents);
+
 	S32 i;
 	S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
 	LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id);
@@ -3349,6 +3349,9 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**)
 	{
 		cat->setVersion(version);
 		cat->setDescendentCount(descendents);
+		// Get this UUID on the changed list so that whatever's listening for it
+		// will get triggered.
+		gInventory.addChangedMask(LLInventoryObserver::INTERNAL, cat->getUUID());
 	}
 	gInventory.notifyObservers();
 }
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index da12dbdf7f..50f54cb842 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -252,9 +252,12 @@ public:
 	// multiple trash can bug.
 	const LLUUID findCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true, bool find_in_library = false);
 
-	// Call this method when it's time to update everyone on a new
-	// state, by default, the inventory model will not update
-	// observers automatically.
+	// This gets called by the idle loop.  It only updates if new
+	// state is detected.  Call notifyObservers() manually to update
+	// regardless of whether state change has been indicated.
+	void idleNotifyObservers();
+
+	// Call this method to explicitly update everyone on a new state.
 	// The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328]
 	void notifyObservers(const std::string service_name="");
 
-- 
cgit v1.2.3


From f440bc5bcfdda0af47f76662a5c56630941bb518 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Fri, 20 Nov 2009 15:31:47 -0500
Subject: EXT-2596 EXT-2354 extra lines in put on > attach put on > wear
 submenus

finishing the cleanup here, missed a couple of extraneous separators.

Will be post-reviewed.

--HG--
branch : avatar-pipeline
---
 indra/newview/llvoavatarself.cpp | 10 ----------
 1 file changed, 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 711e9f90fc..2f63ad2f02 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -318,11 +318,6 @@ BOOL LLVOAvatarSelf::buildMenus()
 
 				}
 			}
-
-			if (!attachment_found)
-			{
-				gAttachPieMenu->addSeparator();
-			}
 		}
 
 		if (gDetachBodyPartPieMenus[i])
@@ -362,11 +357,6 @@ BOOL LLVOAvatarSelf::buildMenus()
 					break;
 				}
 			}
-
-			if (!attachment_found)
-			{
-				gDetachPieMenu->addSeparator();
-			}
 		}
 	}
 
-- 
cgit v1.2.3


From 7e181025c0dc31db2d2d4eb6ccb17ee83f4dc27c Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Fri, 20 Nov 2009 15:38:50 -0500
Subject: EXT-2456 : Usability: Inventory > Clothing > context menu not
 intuitive

Context menu now fills in after folder contents are fetched.

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp                | 86 +++++++++++++++-------
 indra/newview/llinventorybridge.h                  |  2 +
 .../newview/skins/default/xui/en/notifications.xml | 12 +++
 3 files changed, 74 insertions(+), 26 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c8540bdbd2..db079de593 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1363,11 +1363,13 @@ BOOL LLFolderBridge::isItemRemovable()
 	{
 		return FALSE;
 	}
-
+	// Allow protected types to be removed, but issue a warning.
+	/*
 	if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
 	{
 		return FALSE;
 	}
+	*/
 
 	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
 	LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL);
@@ -2191,38 +2193,70 @@ BOOL LLFolderBridge::removeItem()
 	{
 		return FALSE;
 	}
-	// move it to the trash
-	LLPreview::hide(mUUID);
-	LLInventoryModel* model = getInventoryModel();
-	if(!model) return FALSE;
+	const LLViewerInventoryCategory *cat = getCategory();
+	
+	LLSD payload;
+	LLSD args;
+	args["FOLDERNAME"] = cat->getName();
 
-	const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
+	LLNotification::Params params("ConfirmDeleteProtectedCategory");
+	params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2));
+	//params.functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2));
+	/*
+	LLNotification::Params params("ChangeLindenEstate");
+	params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
+	*/
+	if (LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
+	{
+		LLNotifications::instance().add(params);
+	}
+	else
+	{
+		LLNotifications::instance().forceResponse(params, 0);
+	}
+	return TRUE;
+}
 
-	// Look for any gestures and deactivate them
-	LLInventoryModel::cat_array_t	descendent_categories;
-	LLInventoryModel::item_array_t	descendent_items;
-	gInventory.collectDescendents( mUUID, descendent_categories, descendent_items, FALSE );
+bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& response)
+{
+	S32 option = LLNotification::getSelectedOption(notification, response);
 
-	S32 i;
-	for (i = 0; i < descendent_items.count(); i++)
+	// if they choose delete, do it.  Otherwise, don't do anything
+	if(option == 0) 
 	{
-		LLInventoryItem* item = descendent_items[i];
-		if (item->getType() == LLAssetType::AT_GESTURE
-			&& LLGestureManager::instance().isGestureActive(item->getUUID()))
+		// move it to the trash
+		LLPreview::hide(mUUID);
+		LLInventoryModel* model = getInventoryModel();
+		if(!model) return FALSE;
+		
+		const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
+		
+		// Look for any gestures and deactivate them
+		LLInventoryModel::cat_array_t	descendent_categories;
+		LLInventoryModel::item_array_t	descendent_items;
+		gInventory.collectDescendents( mUUID, descendent_categories, descendent_items, FALSE );
+		
+		S32 i;
+		for (i = 0; i < descendent_items.count(); i++)
 		{
-			LLGestureManager::instance().deactivateGesture(item->getUUID());
+			LLInventoryItem* item = descendent_items[i];
+			if (item->getType() == LLAssetType::AT_GESTURE
+				&& LLGestureManager::instance().isGestureActive(item->getUUID()))
+			{
+				LLGestureManager::instance().deactivateGesture(item->getUUID());
+			}
 		}
+		
+		// go ahead and do the normal remove if no 'last calling
+		// cards' are being removed.
+		LLViewerInventoryCategory* cat = getCategory();
+		if(cat)
+		{
+			LLInvFVBridge::changeCategoryParent(model, cat, trash_id, TRUE);
+		}
+		return TRUE;
 	}
-
-	// go ahead and do the normal remove if no 'last calling
-	// cards' are being removed.
-	LLViewerInventoryCategory* cat = getCategory();
-	if(cat)
-	{
-		LLInvFVBridge::changeCategoryParent(model, cat, trash_id, TRUE);
-	}
-
-	return TRUE;
+	return FALSE;
 }
 
 void LLFolderBridge::pasteFromClipboard()
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 7534548894..6a284e0550 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -288,6 +288,8 @@ public:
 
 	virtual BOOL renameItem(const std::string& new_name);
 	virtual BOOL removeItem();
+	bool removeItemResponse(const LLSD& notification, const LLSD& response);
+
 	virtual void pasteFromClipboard();
 	virtual void pasteLinkFromClipboard();
 	virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 0d1ed6fc64..cdf62340b2 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3930,6 +3930,18 @@ Would you like to leave Busy Mode before completing this transaction?
     </form>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="ConfirmDeleteProtectedCategory"
+   type="alertmodal">
+The folder &apos;[FOLDERNAME]&apos; is a system folder. Deleting system folders can cause instability.  Are you sure you want to delete it?
+    <usetemplate
+     ignoretext="Confirm before I delete a system folder"
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="OK"/>
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="ConfirmEmptyTrash"
-- 
cgit v1.2.3


From 52c27b99b839cccab09b61c5b02ced2e9df0a04b Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Fri, 20 Nov 2009 17:52:17 -0500
Subject: EXT-829 share button in people panel is inactive

First pass at getting share buttons in the three places we need them:
person's profile
IM window
people panel

Only UI changes so far, functionality in a future checkin.

Will be reviewed before pushing.

--HG--
branch : avatar-pipeline
---
 indra/newview/llavataractions.cpp                             |  6 ++++++
 indra/newview/llavataractions.h                               |  5 +++++
 indra/newview/llpanelavatar.cpp                               |  6 ++++++
 indra/newview/llpanelpeople.cpp                               |  2 +-
 indra/newview/skins/default/xui/en/panel_im_control_panel.xml |  4 ++--
 indra/newview/skins/default/xui/en/sidepanel_inventory.xml    | 11 -----------
 6 files changed, 20 insertions(+), 14 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 0844cca766..a2beb6af93 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -324,6 +324,12 @@ void LLAvatarActions::pay(const LLUUID& id)
 	}
 }
 
+//static 
+void LLAvatarActions::share(const LLUUID& id)
+{
+	// TODO: share items with selected avatar
+}
+
 // static
 void LLAvatarActions::toggleBlock(const LLUUID& id)
 {
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index d9dab95a77..4c9851a48d 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -103,6 +103,11 @@ public:
 	 */
 	static void pay(const LLUUID& id);
 
+	/**
+	 * Share items with the avatar.
+	 */
+	static void share(const LLUUID& id);
+
 	/**
 	 * Block/unblock the avatar.
 	 */
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 2254684f21..7f4a22aaf7 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -339,6 +339,7 @@ BOOL LLPanelAvatarProfile::postBuild()
 
 	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
 	registrar.add("Profile.Pay",  boost::bind(&LLPanelAvatarProfile::pay, this));
+	registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this));
 
 	mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 
@@ -525,6 +526,11 @@ void LLPanelAvatarProfile::pay()
 	LLAvatarActions::pay(getAvatarId());
 }
 
+void LLPanelAvatarProfile::share()
+{
+	LLAvatarActions::share(getAvatarID());
+}
+
 void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url)
 {
 	LLWeb::loadURL(url);
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 4dc8872557..d11ea69d78 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -758,7 +758,7 @@ void LLPanelPeople::updateButtons()
 	buttonSetEnabled("view_profile_btn",	item_selected);
 	buttonSetEnabled("im_btn",				multiple_selected); // allow starting the friends conference for multiple selection
 	buttonSetEnabled("call_btn",			multiple_selected);
-	buttonSetEnabled("share_btn",			item_selected && false); // not implemented yet
+	buttonSetEnabled("share_btn",			item_selected); // not implemented yet
 
 	bool none_group_selected = item_selected && selected_id.isNull();
 	buttonSetEnabled("group_info_btn", !none_group_selected);
diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
index 73d843e6dd..0a5812882d 100644
--- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
+++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
@@ -38,12 +38,12 @@
      label="Teleport"
      name="teleport_btn"
      width="100" />
-  <!--  <button
+   <button
      follows="left|top"
      height="20"
      label="Share"
      name="share_btn"
-     width="100" />-->
+     width="100" />
      <!--Removing pay button to save space - will update spec - verified by Erica/Steve -->
  <!--   <button
      follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index b8b3d993bd..bb29397ef6 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -49,17 +49,6 @@
 				 name="info_btn"
 				 top="0"
 				 width="60" />
-			<button
-				 enabled="true"
-				 follows="bottom|left"
-				 font="SansSerifSmall"
-				 height="25"
-				 label="Share"
-				 layout="topleft"
-				 left_pad="5"
-				 name="share_btn"
-				 top="0"
-				 width="60" />
 			<button
 				 enabled="false"
 				 follows="bottom|left"
-- 
cgit v1.2.3


From 98c184619b62e1d0e4e0f40613449a643604eba9 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 23 Nov 2009 11:32:30 -0500
Subject: EXT-829 share button in profile inactive

Pass number 2 - re-enabled share button in the locations where it should exist
and disabled it in others. Next pass will be making all buttons functional.

Will be post-reviewed before pushing

--HG--
branch : avatar-pipeline
---
 indra/newview/llpanelavatar.cpp                              | 2 +-
 indra/newview/llpanelavatar.h                                | 5 +++++
 indra/newview/skins/default/xui/en/menu_profile_overflow.xml | 7 +++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 7f4a22aaf7..a822897c7e 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -528,7 +528,7 @@ void LLPanelAvatarProfile::pay()
 
 void LLPanelAvatarProfile::share()
 {
-	LLAvatarActions::share(getAvatarID());
+	LLAvatarActions::share(getAvatarId());
 }
 
 void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url)
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index a0caf0c915..587b9cabe9 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -172,6 +172,11 @@ protected:
 	 */
 	void pay();
 
+	/**
+	 * opens inventory and IM for sharing items
+	 */
+	void share();
+
 	void onUrlTextboxClicked(const std::string& url);
 	void onHomepageTextboxClicked();
 	void onAddFriendButtonClick();
diff --git a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
index 7b52fecef7..d0128d1c9a 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
@@ -12,4 +12,11 @@
         <menu_item_call.on_click
          function="Profile.Pay" />
     </menu_item_call>
+    <menu_item_call
+     label="Share"
+     layout="topleft"
+     name="share">
+        <menu_item_call.on_click
+         function="Profile.Share" />
+    </menu_item_call>
 </toggleable_menu>
-- 
cgit v1.2.3


From ef63c80766811a86d8ea6ed90d409b6451744e6b Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 23 Nov 2009 11:46:15 -0500
Subject: EXT-2535 wearables created in 2.0 don't load in 1.23

Re-opening issue for a second pass at it. This pass updates the code that was
intended to make all loaded wearables auto-save themselves back to wearable
version 22 (from 24). Code was not being hit, so relocated it to after wearable
had been added to llagentwearables to ensure the save succeeded.

Will be post-reviewed before push.

--HG--
branch : avatar-pipeline
---
 indra/newview/llagentwearables.cpp | 25 ++++++++++++++++++++++---
 indra/newview/llagentwearables.h   |  1 +
 indra/newview/llwearable.cpp       | 12 ------------
 indra/newview/llwearable.h         |  2 ++
 4 files changed, 25 insertions(+), 15 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index cfa3f4ae02..574b449d23 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -675,7 +675,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab
 	{
 		wearable_vec[index] = wearable;
 		old_wearable->setLabelUpdated();
-		mAvatarObject->wearableUpdated(wearable->getType());
+		wearableUpdated(wearable);
 	}
 }
 
@@ -690,13 +690,32 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
 	if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
 	{
 		mWearableDatas[type].push_back(wearable);
-		mAvatarObject->wearableUpdated(wearable->getType());
-		wearable->setLabelUpdated();
+		wearableUpdated(wearable);
 		return mWearableDatas[type].size()-1;
 	}
 	return MAX_WEARABLES_PER_TYPE;
 }
 
+void LLAgentWearables::wearableUpdated(LLWearable *wearable)
+{
+	mAvatarObject->wearableUpdated(wearable->getType());
+	wearable->setLabelUpdated();
+
+	// Hack pt 2. If the wearable we just loaded has definition version 24,
+	// then force a re-save of this wearable after slamming the version number to 22.
+	// This number was incorrectly incremented for internal builds before release, and
+	// this fix will ensure that the affected wearables are re-saved with the right version number.
+	// the versions themselves are compatible. This code can be removed before release.
+	if( wearable->getDefinitionVersion() == 24 )
+	{
+		wearable->setDefinitionVersion(22);
+		U32 index = getWearableIndex(wearable);
+		llinfos << "forcing werable type " << wearable->getType() << " to version 22 from 24" << llendl;
+		saveWearable(wearable->getType(),index,TRUE);
+	}
+
+}
+
 void LLAgentWearables::popWearable(LLWearable *wearable)
 {
 	if (wearable == NULL)
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 8f3a16501e..b4f58674af 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -107,6 +107,7 @@ private:
 	// Low-level data structure setter - public access is via setWearableItem, etc.
 	void 			setWearable(const EWearableType type, U32 index, LLWearable *wearable);
 	U32 			pushWearable(const EWearableType type, LLWearable *wearable);
+	void			wearableUpdated(LLWearable *wearable);
 	void 			popWearable(LLWearable *wearable);
 	void			popWearable(const EWearableType type, U32 index);
 	
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index ced0b64896..d92da4ef44 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -421,18 +421,6 @@ BOOL LLWearable::importFile( LLFILE* file )
 	// copy all saved param values to working params
 	revertValues();
 
-	// Hack pt 2. If the wearable we just loaded has definition version 24,
-	// then force a re-save of this wearable after slamming the version number to 22.
-	// This number was incorrectly incremented for internal builds before release, and
-	// this fix will ensure that the affected wearables are re-saved with the right version number.
-	// the versions themselves are compatible. This code can be removed before release.
-	if( mDefinitionVersion == 24 )
-	{
-		mDefinitionVersion = 22;
-		U32 index = gAgentWearables.getWearableIndex(this);
-		gAgentWearables.saveWearable(mType,index,TRUE);
-	}
-
 	return TRUE;
 }
 
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 0863adb7f5..43ffa12420 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -82,6 +82,8 @@ public:
 	const std::string&			getTypeName() const;
 	LLAssetType::EType			getAssetType() const;
 	LLLocalTextureObject*		getLocalTextureObject(S32 index) const;
+	S32							getDefinitionVersion() const { return mDefinitionVersion; }
+	void						setDefinitionVersion( S32 new_version ) { mDefinitionVersion = new_version; }
 
 public:
 	typedef std::vector<LLVisualParam*> visual_param_vec_t;
-- 
cgit v1.2.3


From 24dbd81763254178bfcdb15d1ee3e4be48032b4b Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 23 Nov 2009 13:23:54 -0500
Subject: EXT-829 share button in profile inactive

refactored share code to all call LLAvatarActions::share.
Function opens an IM window if one doesn't already exist and prints an
appropriate message, as well as opening the inventory sidepanel.

Verified working in IM window, people tab, and individual's profile.

Will be post-reviewed before push.

--HG--
branch : avatar-pipeline
---
 indra/newview/llavataractions.cpp       | 17 ++++++++++++++++-
 indra/newview/llpanelimcontrolpanel.cpp |  8 +-------
 indra/newview/llpanelpeople.cpp         |  2 +-
 3 files changed, 18 insertions(+), 9 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index a2beb6af93..89a774fd2b 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -327,7 +327,22 @@ void LLAvatarActions::pay(const LLUUID& id)
 //static 
 void LLAvatarActions::share(const LLUUID& id)
 {
-	// TODO: share items with selected avatar
+	LLSD key;
+	LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+
+
+	LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id);
+
+	if (!gIMMgr->hasSession(session_id))
+	{
+		startIM(id);
+	}
+
+	if (gIMMgr->hasSession(session_id))
+	{
+		// we should always get here, but check to verify anyways
+		LLIMModel::getInstance()->addMessage(session_id, SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
+	}
 }
 
 // static
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 40319d949d..fa6d16cfb1 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -160,13 +160,7 @@ void LLPanelIMControlPanel::onAddFriendButtonClicked()
 
 void LLPanelIMControlPanel::onShareButtonClicked()
 {
-	LLSD key;
-	LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
-
-	if (gIMMgr->hasSession(getSessionId()))
-	{
-		LLIMModel::getInstance()->addMessage(getSessionId(), SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
-	}
+	LLAvatarActions::share(mAvatarID);
 }
 
 void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index d11ea69d78..c332776010 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1211,7 +1211,7 @@ void LLPanelPeople::onTeleportButtonClicked()
 
 void LLPanelPeople::onShareButtonClicked()
 {
-	// *TODO: not implemented yet
+	LLAvatarActions::share(getCurrentItemID());
 }
 
 void LLPanelPeople::onMoreButtonClicked()
-- 
cgit v1.2.3


From ca5e49d5fab171bc455c58b8f745d7f00d46bb41 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 23 Nov 2009 15:12:48 -0500
Subject: EXT-2718 EXT-2434 avatar render cost changes

Fixing a but in new ARC function where textures added 5 to the ARC for each
use. Expected (and previous) behavior restored, where 5 is added to ARC for each
unique texture, regardless of how many faces it is used on.

Confirmed new ARC is 99 points higher than previous (20 for each body part), or
119 if avatar is wearing a skirt.

Will be post-reviewed before pushing

--HG--
branch : avatar-pipeline
---
 indra/newview/llfloatertools.cpp |  6 +++++-
 indra/newview/llvoavatar.cpp     | 22 ++++++++++++++--------
 indra/newview/llvovolume.cpp     | 12 ++++++++----
 indra/newview/llvovolume.h       |  2 +-
 4 files changed, 28 insertions(+), 14 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 9854d2594b..6d30d375f9 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -975,6 +975,8 @@ void LLFloaterTools::onClickGridOptions()
 S32 LLFloaterTools::calcRenderCost()
 {
 	S32 cost = 0;
+	std::set<LLUUID> textures;
+
 	for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin();
 		  selection_iter != LLSelectMgr::getInstance()->getSelection()->end();
 		  ++selection_iter)
@@ -985,11 +987,13 @@ S32 LLFloaterTools::calcRenderCost()
 			LLVOVolume *viewer_volume = (LLVOVolume*)select_node->getObject();
 			if (viewer_volume)
 			{
-				cost += viewer_volume->getRenderCost();
+				cost += viewer_volume->getRenderCost(textures);
 			}
 		}
 	}
 
+	cost += textures.size() * 5;
+
 	return cost;
 }
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 75e35e5221..9e75d7853d 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7636,15 +7636,19 @@ void LLVOAvatar::idleUpdateRenderCost()
 		return;
 	}
 
-	U32 shame = 0;
+	U32 cost = 0;
+	std::set<LLUUID> textures;
 
 	for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
 	{
 		const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
 		ETextureIndex tex_index = baked_dict->mTextureIndex;
-		if (isTextureVisible(tex_index))
+		if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(WT_SKIRT)))
 		{
-			shame +=20;
+			if (isTextureVisible(tex_index))
+			{
+				cost +=20;
+			}
 		}
 	}
 
@@ -7663,20 +7667,22 @@ void LLVOAvatar::idleUpdateRenderCost()
 				const LLDrawable* drawable = attached_object->mDrawable;
 				if (drawable)
 				{
-					shame += 10;
+					cost += 10;
 					const LLVOVolume* volume = drawable->getVOVolume();
 					if (volume)
 					{
-						shame += volume->getRenderCost();
+						cost += volume->getRenderCost(textures);
 					}
 				}
 			}
 		}
 	}
 
-	setDebugText(llformat("%d", shame));
-	F32 green = 1.f-llclamp(((F32) shame-1024.f)/1024.f, 0.f, 1.f);
-	F32 red = llmin((F32) shame/1024.f, 1.f);
+	cost += textures.size() * 5;
+
+	setDebugText(llformat("%d", cost));
+	F32 green = 1.f-llclamp(((F32) cost-1024.f)/1024.f, 0.f, 1.f);
+	F32 red = llmin((F32) cost/1024.f, 1.f);
 	mText->setColor(LLColor4(red,green,0,1));
 }
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e5531a1497..1f49cd30c7 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2541,7 +2541,11 @@ const LLMatrix4 LLVOVolume::getRenderMatrix() const
 	return mDrawable->getWorldMatrix();
 }
 
-U32 LLVOVolume::getRenderCost() const
+// Returns a base cost and adds textures to passed in set.
+// total cost is returned value + 5 * size of the resulting set.
+// Cannot include cost of textures, as they may be re-used in linked
+// children, and cost should only be increased for unique textures  -Nyx
+U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
 {
 	U32 shame = 0;
 
@@ -2574,7 +2578,7 @@ U32 LLVOVolume::getRenderCost() const
 	{
 		const LLSculptParams *sculpt_params = (LLSculptParams *) getParameterEntry(LLNetworkData::PARAMS_SCULPT);
 		LLUUID sculpt_id = sculpt_params->getSculptTexture();
-		shame += 5;
+		textures.insert(sculpt_id);
 	}
 
 	for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
@@ -2583,7 +2587,7 @@ U32 LLVOVolume::getRenderCost() const
 		const LLTextureEntry* te = face->getTextureEntry();
 		const LLViewerTexture* img = face->getTexture();
 
-		shame += 5;
+		textures.insert(img->getID());
 
 		if (face->getPoolType() == LLDrawPool::POOL_ALPHA)
 		{
@@ -2633,7 +2637,7 @@ U32 LLVOVolume::getRenderCost() const
 			const LLVOVolume* child_volumep = child_drawablep->getVOVolume();
 			if (child_volumep)
 			{
-				shame += child_volumep->getRenderCost();
+				shame += child_volumep->getRenderCost(textures);
 			}
 		}
 	}
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index fb543efc04..6bad245e19 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -120,7 +120,7 @@ public:
 	const LLMatrix4&	getRelativeXform() const				{ return mRelativeXform; }
 	const LLMatrix3&	getRelativeXformInvTrans() const		{ return mRelativeXformInvTrans; }
 	/*virtual*/	const LLMatrix4	getRenderMatrix() const;
-				U32 	getRenderCost() const;
+				U32 	getRenderCost(std::set<LLUUID> &textures) const;
 
 	/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, 
 										  S32 face = -1,                        // which face to check, -1 = ALL_SIDES
-- 
cgit v1.2.3


From 0c3bd94da9ba2244613b6c1f1f0e4ce9723c46d3 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Mon, 23 Nov 2009 15:16:19 -0500
Subject: EXT-2435 : Advanced > Shortcuts > Fly is always ticked

Did a few lines of cleanup for code surrounding this.  Issue is still not fixed though.

--HG--
branch : avatar-pipeline
---
 indra/newview/llagent.cpp                          | 6 +++++-
 indra/newview/llagent.h                            | 2 +-
 indra/newview/skins/default/xui/en/menu_viewer.xml | 2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index fb2ecb3bed..9b3e97e8d8 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -734,6 +734,10 @@ BOOL LLAgent::canFly()
 	return parcel->getAllowFly();
 }
 
+BOOL LLAgent::getFlying() const
+{ 
+	return mControlFlags & AGENT_CONTROL_FLY; 
+}
 
 //-----------------------------------------------------------------------------
 // setFlying()
@@ -791,7 +795,7 @@ void LLAgent::setFlying(BOOL fly)
 // static
 void LLAgent::toggleFlying()
 {
-	BOOL fly = !(gAgent.mControlFlags & AGENT_CONTROL_FLY);
+	BOOL fly = !gAgent.getFlying();
 
 	gAgent.setFlying( fly );
 	gAgent.resetView();
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4162dfce1e..2e95dc72be 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -310,7 +310,7 @@ private:
 	// Fly
 	//--------------------------------------------------------------------
 public:
-	BOOL			getFlying() const	{ return mControlFlags & AGENT_CONTROL_FLY; }
+	BOOL			getFlying() const;
 	void			setFlying(BOOL fly);
 	static void		toggleFlying();
 	static bool		enableFlying();
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 8ab5fb1659..2b101e9058 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1709,6 +1709,8 @@
              layout="topleft"
              name="Fly"
              shortcut="Home">
+                <menu_item_check.on_check
+                 function="Agent.getFlying" />
                 <menu_item_check.on_click
                  function="Agent.toggleFlying" />
                 <menu_item_check.on_enable
-- 
cgit v1.2.3


From fc1860bcc6bab4b538692662db2da4be1def5af4 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Mon, 23 Nov 2009 15:25:31 -0500
Subject: EXT-2705 : Create accordion panel to show COF contents

Also made several infrastructure improvements that help inventory panels defer generating their folders/views until after inventory has been loaded up.  This was pretty haphazard before.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderview.cpp                     |  6 ++
 indra/newview/llinventorypanel.cpp                 | 61 ++++++++++---------
 indra/newview/llinventorypanel.h                   |  8 +--
 indra/newview/llpaneloutfitsinventory.cpp          | 69 ++++++++++++++++++----
 indra/newview/llpaneloutfitsinventory.h            | 22 +++++--
 .../default/xui/en/panel_outfits_inventory.xml     | 33 ++++++++++-
 6 files changed, 153 insertions(+), 46 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 955bc64e05..c9c4c76da4 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2014,6 +2014,12 @@ static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory");
 // Main idle routine
 void LLFolderView::doIdle()
 {
+	// Don't do anything until the inventory is loaded up.
+	if (!gInventory.isInventoryUsable())
+	{
+		return;
+	}
+
 	LLFastTimer t2(FTM_INVENTORY);
 
 	BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 327a735f78..e4dd70cdd1 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -96,6 +96,11 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	setBackgroundColor(LLUIColorTable::instance().getColor("InventoryBackgroundColor"));
 	setBackgroundVisible(TRUE);
 	setBackgroundOpaque(TRUE);
+	
+	if (mStartFolderString != "")
+	{
+		mBuildDefaultHierarchy = false;
+	}
 }
 
 BOOL LLInventoryPanel::postBuild()
@@ -148,7 +153,7 @@ BOOL LLInventoryPanel::postBuild()
 	// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
 	if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mHasInventoryConnection)
 	{
-		rebuildViews();
+		generateViews();
 		mHasInventoryConnection = true;
 		defaultOpenInventory();
 	}
@@ -253,9 +258,9 @@ void LLInventoryPanel::modelChanged(U32 mask)
 	bool handled = false;
 
 	// inventory just initialized, do complete build
-	if ((mask & LLInventoryObserver::ADD) && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
+	if ((mask & LLInventoryObserver::ADD) && mInventory->isInventoryUsable() && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
 	{
-		rebuildViews();
+		generateViews();
 		mHasInventoryConnection = true;
 		defaultOpenInventory();
 		return;
@@ -367,10 +372,14 @@ void LLInventoryPanel::modelChanged(U32 mask)
 }
 
 
-void LLInventoryPanel::rebuildViews()
+void LLInventoryPanel::generateViews()
 {
-	// Determine the root folder and rebuild the views starting
-	// at that folder.
+
+	// Blow away the entire previous UI tree.
+	mFolders->getRoot()->destroyView();
+
+	// Determine the root folder in case specified, and
+	// build the views starting with that folder.
 	const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
 
 	if ("LIBRARY" == mStartFolderString)
@@ -381,16 +390,14 @@ void LLInventoryPanel::rebuildViews()
 	{
 		mStartFolderID = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
 	}
-	
+	llinfos << this << " Generating views for start folder " << mStartFolderString << llendl;
 	rebuildViewsFor(mStartFolderID);
 }
 
 void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
 {
-	LLFolderViewItem* old_view = NULL;
-
-	// get old LLFolderViewItem
-	old_view = mFolders->getItemByID(id);
+	// Destroy the old view for this ID so we can rebuild it
+	LLFolderViewItem* old_view = mFolders->getItemByID(id);
 	if (old_view && id.notNull())
 	{
 		old_view->destroyView();
@@ -409,14 +416,20 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
 		const LLUUID &parent_id = objectp->getParentUUID();
 		LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(parent_id);
 		if (id == mStartFolderID)
+		{
 			parent_folder = mFolders;
-		
-		if (!parent_folder)
+		}
+		else if ((mStartFolderID != LLUUID::null) && (!gInventory.isObjectDescendentOf(id, mStartFolderID)))
 		{
-			// This item exists outside the inventory's hierarchy, so don't add it.
+			// This item exists outside the inventory's hierarchy,
+			// so don't add it.
 			return;
 		}
 		
+		if (objectp->getName() == "My Inventory")
+		{
+			llinfos << this << " Adding MyInventory for start folder " << mStartFolderString << llendl;
+		}
 		if (objectp->getType() <= LLAssetType::AT_NONE ||
 			objectp->getType() >= LLAssetType::AT_COUNT)
 		{
@@ -520,19 +533,20 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
 // bit of a hack to make sure the inventory is open.
 void LLInventoryPanel::defaultOpenInventory()
 {
-	const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(mStartFolderString);
-	if (preferred_type != LLFolderType::FT_NONE)
+	if (mStartFolderString != "")
 	{
-		const std::string& top_level_folder_name = LLViewerFolderType::lookupNewCategoryName(preferred_type);
-		mFolders->openFolder(top_level_folder_name);
+		mFolders->openFolder(mStartFolderString);
 	}
 	else
 	{
 		// Get the first child (it should be "My Inventory") and
 		// open it up by name (just to make sure the first child is actually a folder).
 		LLView* first_child = mFolders->getFirstChild();
-		const std::string& first_child_name = first_child->getName();
-		mFolders->openFolder(first_child_name);
+		if (first_child)
+		{
+			const std::string& first_child_name = first_child->getName();
+			mFolders->openFolder(first_child_name);
+		}
 	}
 }
 
@@ -640,13 +654,6 @@ void LLInventoryPanel::openAllFolders()
 	mFolders->arrangeAll();
 }
 
-void LLInventoryPanel::openDefaultFolderForType(LLFolderType::EType type)
-{
-	LLUUID category_id = mInventory->findCategoryUUIDForType(type);
-	LLOpenFolderByID opener(category_id);
-	mFolders->applyFunctorRecursively(opener);
-}
-
 void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus)
 {
 	// Don't select objects in COF (e.g. to prevent refocus when items are worn).
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 0ccee337c9..41f393c660 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -122,7 +122,6 @@ public:
 
 	// Call this method to set the selection.
 	void openAllFolders();
-	void openDefaultFolderForType(LLFolderType::EType);
 	void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
 	void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); }
 	void clearSelection();
@@ -161,16 +160,17 @@ public:
 	void openSelected();
 	void unSelectAll()	{ mFolders->setSelection(NULL, FALSE, FALSE); }
 	
-protected:
+private:
 	// Destroys the old views, and regenerates them based on the
 	// start folder ID.
-	void rebuildViews();
+	void generateViews();
 
 	// Given the id and the parent, build all of the folder views.
 	void rebuildViewsFor(const LLUUID& id);
 	virtual void buildNewViews(const LLUUID& id); // made virtual to support derived classes. EXT-719
-	void defaultOpenInventory(); // open the first level of inventory
 protected:
+	void defaultOpenInventory(); // open the first level of inventory
+
 	LLInventoryModel*			mInventory;
 	LLInventoryObserver*		mInventoryObserver;
 	BOOL 						mAllowMultiSelect;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index c4bde369db..2550962d76 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -59,7 +59,7 @@
 static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
 
 LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
-	mInventoryPanel(NULL),
+	mActivePanel(NULL),
 	mParent(NULL)
 {
 	mSavedFolderState = new LLSaveFolderState();
@@ -74,12 +74,8 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
 // virtual
 BOOL LLPanelOutfitsInventory::postBuild()
 {
-	mInventoryPanel = getChild<LLInventoryPanel>("outfits_list");
-	mInventoryPanel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, TRUE);
-	mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-	mInventoryPanel->openDefaultFolderForType(LLFolderType::FT_MY_OUTFITS);
-	mInventoryPanel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onSelectionChange, this, _1, _2));
 	
+	initAccordionPanels();
 	initListCommandsHandlers();
 	return TRUE;
 }
@@ -102,7 +98,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 {
 	if (string == "")
 	{
-		mInventoryPanel->setFilterSubString(LLStringUtil::null);
+		mActivePanel->setFilterSubString(LLStringUtil::null);
 
 		// re-open folders that were initially open
 		mSavedFolderState->setApply(TRUE);
@@ -114,7 +110,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 
 	gInventory.startBackgroundFetch();
 
-	if (mInventoryPanel->getFilterSubString().empty() && string.empty())
+	if (mActivePanel->getFilterSubString().empty() && string.empty())
 	{
 		// current filter and new filter empty, do nothing
 		return;
@@ -128,7 +124,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 	}
 
 	// set new filter string
-	mInventoryPanel->setFilterSubString(string);
+	mActivePanel->setFilterSubString(string);
 }
 
 void LLPanelOutfitsInventory::onWear()
@@ -207,7 +203,7 @@ bool LLPanelOutfitsInventory::getIsCorrectType(const LLFolderViewEventListener *
 
 LLFolderView *LLPanelOutfitsInventory::getRootFolder()
 {
-	return mInventoryPanel->getRootFolder();
+	return mActivePanel->getRootFolder();
 }
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -349,3 +345,56 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy
 // List Commands                                                              //
 ////////////////////////////////////////////////////////////////////////////////
 
+//////////////////////////////////////////////////////////////////////////////////
+// Accordion                                                                    //
+
+void LLPanelOutfitsInventory::initAccordionPanels()
+{
+	mAccordionPanels.resize(2);
+	
+	LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel");
+	myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, TRUE);
+	myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+	mAccordionPanels[0] = myoutfits_panel;
+	mActivePanel = myoutfits_panel;
+
+	LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel");
+	cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+	mAccordionPanels[1] = cof_panel;
+
+	for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
+		 iter != mAccordionPanels.end();
+		 ++iter)
+	{
+		LLInventoryPanel *panel = (*iter);
+		panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onAccordionSelectionChange, this, panel, _1, _2));
+	}
+}
+
+void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+{
+	if (user_action && items.size() > 0)
+	{
+		for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
+			 iter != mAccordionPanels.end();
+			 ++iter)
+		{
+			LLInventoryPanel *panel = (*iter);
+			if (panel == accordion_panel)
+			{
+				mActivePanel = panel;
+			}
+			else
+			{
+				panel->getRootFolder()->clearSelection();
+			}
+		}
+	}
+	onSelectionChange(items, user_action);
+}
+
+LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
+{
+	return mActivePanel;
+}
+
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 4d903a389b..902a5caab8 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -61,8 +61,6 @@ public:
 	void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
 	void onSelectorButtonClicked();
 
-	LLInventoryPanel* getActivePanel() { return mInventoryPanel; }
-
 	// If a compatible listener type is selected, then return a pointer to that.
 	// Otherwise, return NULL.
 	LLFolderViewEventListener* getCorrectListenerForAction();
@@ -74,9 +72,25 @@ protected:
 
 private:
 	LLSidepanelAppearance*      mParent;
-	LLInventoryPanel*			mInventoryPanel;
 	LLSaveFolderState*			mSavedFolderState;
 
+public:
+	//////////////////////////////////////////////////////////////////////////////////
+	// Accordion                                                                    //
+	LLInventoryPanel* 	getActivePanel();
+	
+protected:
+	void 				initAccordionPanels();
+	void 				onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+	
+private:
+	LLInventoryPanel* 	mActivePanel;
+	typedef std::vector<LLInventoryPanel *> accordionpanels_vec_t;
+	accordionpanels_vec_t 		mAccordionPanels;
+
+	// Accordion                                                                  //
+	////////////////////////////////////////////////////////////////////////////////
+	
 
 	//////////////////////////////////////////////////////////////////////////////////
 	// List Commands                                                                //
@@ -95,7 +109,7 @@ private:
 	LLPanel*					mListCommands;
 	LLMenuGL*					mMenuGearDefault;
 	LLMenuGL*					mMenuAdd;
-	//                                                                            //
+	// List Commands                                                              //
 	////////////////////////////////////////////////////////////////////////////////
 };
 
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index f511ec0d6f..d805209bf5 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -6,6 +6,18 @@
 	  width="310"
 	  border="true"
 	  follows="left|top|right|bottom">
+    <accordion
+     follows="left|top|right|bottom"
+     height="315"
+     layout="topleft"
+     left="0"
+     name="outfits_accordion"
+     top="2"
+     width="310">
+        <accordion_tab
+         layout="topleft"
+         name="tab_outfits"
+         title="Outfits bar">
 	 <inventory_panel 
 	 	 allow_multi_select="true" 
 		 border="true" 
@@ -14,9 +26,28 @@
 		 height="326" 
 		 left="0" 
 		 mouse_opaque="true"
-	     name="outfits_list"
+	     name="outfitslist_accordionpanel"
 		 width="310"
 		 start_folder="My Outfits"/>
+        </accordion_tab>
+        <accordion_tab
+         layout="topleft"
+         name="tab_cof"
+         title="Current Outfit bar">
+	 <inventory_panel 
+	 	 allow_multi_select="true" 
+		 border="true" 
+		 bottom="0"
+	     follows="left|top|right|bottom" 
+		 height="326" 
+		 left="0" 
+		 mouse_opaque="true"
+	     name="cof_accordionpanel"
+		 width="310"
+		 start_folder="Current Outfit"/>
+        </accordion_tab>
+	</accordion>
+
 	<button bottom="0"
 		 halign="center"
 		 height="16"
-- 
cgit v1.2.3


From c36973dbc8694c418993d567505ec115456d218e Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 23 Nov 2009 17:21:00 -0500
Subject: tweaking render cost calculations based on code review feedback.

Following commits were reviewed by vir:
3054bae2bf21
dcc420c4d3f0
05341c33f01e
d9cb3bf709f8
dad4281217d3
f1d887a950ba

 - Nyx

--HG--
branch : avatar-pipeline
---
 indra/newview/llfloatertools.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 6d30d375f9..b4d248bc40 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -563,7 +563,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
 
 	mBtnEdit	->setToggleState( edit_visible );
 	mRadioGroupEdit->setVisible( edit_visible );
-	childSetVisible("RenderingCost", edit_visible || focus_visible || move_visible);
+	bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts");
+	childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible));
 
 	if (mCheckSelectIndividual)
 	{
@@ -988,11 +989,12 @@ S32 LLFloaterTools::calcRenderCost()
 			if (viewer_volume)
 			{
 				cost += viewer_volume->getRenderCost(textures);
+				cost += textures.size() * 5;
+				textures.clear();
 			}
 		}
 	}
 
-	cost += textures.size() * 5;
 
 	return cost;
 }
-- 
cgit v1.2.3


From 2b54c8a084a3f387d6f15b9d4f61d8cb68b434e0 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Mon, 23 Nov 2009 17:46:30 -0500
Subject: EXT-2763 : Right-click on inventory doesn't bring up context menu

Also did some minor cleanup on header files.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderview.cpp     |  6 ++++--
 indra/newview/llfolderview.h       | 38 ++++++++++++++++----------------------
 indra/newview/llfolderviewitem.cpp |  2 +-
 indra/newview/llinventorypanel.cpp | 28 +++++++++++-----------------
 indra/newview/llinventorypanel.h   | 35 +++++++++++++++--------------------
 5 files changed, 47 insertions(+), 62 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index c9c4c76da4..3138b5b26f 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -44,6 +44,7 @@
 #include "llkeyboard.h"
 #include "lllineeditor.h"
 #include "llmenugl.h"
+#include "llpanel.h"
 #include "llpreview.h"
 #include "llscrollcontainer.h" // hack to allow scrolling
 #include "lltooldraganddrop.h"
@@ -2014,12 +2015,13 @@ static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory");
 // Main idle routine
 void LLFolderView::doIdle()
 {
-	// Don't do anything until the inventory is loaded up.
+	// Don't do anything until the inventory is usable and loaded up.
+	// Seraph: Change this to calling mParentPanel->isViewsInitialized
 	if (!gInventory.isInventoryUsable())
 	{
 		return;
 	}
-
+	
 	LLFastTimer t2(FTM_INVENTORY);
 
 	BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 0bd65b5f90..a0e252ae88 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -41,25 +41,27 @@
 #ifndef LL_LLFOLDERVIEW_H
 #define LL_LLFOLDERVIEW_H
 
-// JAMESDEBUG - trim this list
-#include <vector>
-#include <map>
-#include <deque>
-#include <boost/function.hpp>
-#include <boost/signals2.hpp>
+#include "llfolderviewitem.h"	// because LLFolderView is-a LLFolderViewFolder
 
 #include "lluictrl.h"
 #include "v4color.h"
 #include "lldarray.h"
-//#include "llviewermenu.h"
 #include "stdenums.h"
-#include "llfontgl.h"
-#include "lleditmenuhandler.h"
-#include "llviewertexture.h"
 #include "lldepthstack.h"
+#include "lleditmenuhandler.h"
+#include "llfontgl.h"
 #include "lltooldraganddrop.h"
-// JAMESDEBUG - move this up
-#include "llfolderviewitem.h"	// because LLFolderView is-a LLFolderViewFolder
+#include "llviewertexture.h"
+
+class LLFolderViewEventListener;
+class LLFolderViewFolder;
+class LLFolderViewItem;
+class LLInventoryModel;
+class LLPanel;
+class LLLineEditor;
+class LLMenuGL;
+class LLScrollContainer;
+class LLUICtrl;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLFolderViewFunctor
@@ -70,8 +72,7 @@
 // that later when it's determined to be too slow.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLFolderViewItem;
-class LLFolderViewFolder;
+
 
 class LLFolderViewFunctor
 {
@@ -89,13 +90,6 @@ public:
 // manages the screen region of the folder view.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-class LLFolderViewEventListener;
-class LLInventoryModel;
-class LLLineEditor;
-class LLMenuGL;
-class LLScrollContainer;
-class LLUICtrl;
-
 class LLFolderView : public LLFolderViewFolder, public LLEditMenuHandler
 {
 public:
@@ -330,7 +324,7 @@ protected:
 	
 	LLUUID							mSelectThisID; // if non null, select this item
 	
-	LLPanel*						mParentPanel;
+	LLPanel*				mParentPanel;
 
 	/**
 	 * Is used to determine if we need to cut text In LLFolderViewItem to avoid horizontal scroll.
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 41e3279795..420dba07fe 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -38,12 +38,12 @@
 #include "llfoldervieweventlistener.h"
 #include "llinventorybridge.h"	// for LLItemBridge in LLInventorySort::operator()
 #include "llinventoryfilter.h"
+#include "llpanel.h"
 #include "llviewercontrol.h"	// gSavedSettings
 #include "llviewerwindow.h"		// Argh, only for setCursor()
 
 // linden library includes
 #include "llfocusmgr.h"		// gFocusMgr
-#include "llpanel.h"		// panel->hasFocus()
 #include "lltrans.h"
 
 ///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index e4dd70cdd1..47201b2ccc 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -78,7 +78,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mSortOrderSetting(p.sort_order_setting),
 	mInventory(p.inventory),
 	mAllowMultiSelect(p.allow_multi_select),
-	mHasInventoryConnection(false),
+	mViewsInitialized(false),
 	mStartFolderString(p.start_folder),	
 	mBuildDefaultHierarchy(true),
 	mInvFVBridgeBuilder(NULL)
@@ -151,11 +151,9 @@ BOOL LLInventoryPanel::postBuild()
 	mInventory->addObserver(mInventoryObserver);
 
 	// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
-	if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mHasInventoryConnection)
+	if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mViewsInitialized)
 	{
-		generateViews();
-		mHasInventoryConnection = true;
-		defaultOpenInventory();
+		initializeViews();
 	}
 
 	if (mSortOrderSetting != INHERIT_SORT_ORDER)
@@ -258,11 +256,9 @@ void LLInventoryPanel::modelChanged(U32 mask)
 	bool handled = false;
 
 	// inventory just initialized, do complete build
-	if ((mask & LLInventoryObserver::ADD) && mInventory->isInventoryUsable() && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
+	if ((mask & LLInventoryObserver::ADD) && mInventory->isInventoryUsable() && gInventory.getChangedIDs().empty() && !mViewsInitialized)
 	{
-		generateViews();
-		mHasInventoryConnection = true;
-		defaultOpenInventory();
+		initializeViews();
 		return;
 	}
 
@@ -372,11 +368,10 @@ void LLInventoryPanel::modelChanged(U32 mask)
 }
 
 
-void LLInventoryPanel::generateViews()
+void LLInventoryPanel::initializeViews()
 {
-
-	// Blow away the entire previous UI tree.
-	mFolders->getRoot()->destroyView();
+	if (!gInventory.isInventoryUsable())
+		return;
 
 	// Determine the root folder in case specified, and
 	// build the views starting with that folder.
@@ -392,6 +387,9 @@ void LLInventoryPanel::generateViews()
 	}
 	llinfos << this << " Generating views for start folder " << mStartFolderString << llendl;
 	rebuildViewsFor(mStartFolderID);
+
+	mViewsInitialized = true;
+	defaultOpenInventory();
 }
 
 void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
@@ -426,10 +424,6 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
 			return;
 		}
 		
-		if (objectp->getName() == "My Inventory")
-		{
-			llinfos << this << " Adding MyInventory for start folder " << mStartFolderString << llendl;
-		}
 		if (objectp->getType() <= LLAssetType::AT_NONE ||
 			objectp->getType() >= LLAssetType::AT_COUNT)
 		{
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 41f393c660..5b1104936d 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -161,9 +161,6 @@ public:
 	void unSelectAll()	{ mFolders->setSelection(NULL, FALSE, FALSE); }
 	
 private:
-	// Destroys the old views, and regenerates them based on the
-	// start folder ID.
-	void generateViews();
 
 	// Given the id and the parent, build all of the folder views.
 	void rebuildViewsFor(const LLUUID& id);
@@ -176,25 +173,8 @@ protected:
 	BOOL 						mAllowMultiSelect;
 	std::string					mSortOrderSetting;
 
-//private: // Can not make these private - needed by llinventorysubtreepanel
 	LLFolderView*				mFolders;
-	std::string                 mStartFolderString;
-
-	/**
-	 * Contains UUID of Inventory item from which hierarchy should be built.
-	 * Can be set with the "start_folder" xml property.
-	 * Default is LLUUID::null that means total Inventory hierarchy.
-	 */
-	LLUUID						mStartFolderID;
 	LLScrollContainer*			mScroller;
-	bool						mHasInventoryConnection;
-
-	/**
-	 * Flag specified if default inventory hierarchy should be created in postBuild()
-	 */
-	bool						mBuildDefaultHierarchy;
-
-	LLUUID						mRootInventoryItemUUID;
 
 	/**
 	 * Pointer to LLInventoryFVBridgeBuilder.
@@ -205,6 +185,21 @@ protected:
 	 */
 	const LLInventoryFVBridgeBuilder* mInvFVBridgeBuilder;
 
+	//--------------------------------------------------------------------
+	// Initialization routines for building up the UI ("views")
+	//--------------------------------------------------------------------
+public:
+	BOOL 				getIsViewsInitialized() const { return mViewsInitialized; }
+private:
+	// Builds the UI.  Call this once the inventory is usable.
+	void 				initializeViews();
+	BOOL				mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild()
+	BOOL				mViewsInitialized; // Views have been generated
+	
+	// UUID of category from which hierarchy should be built.  Set with the 
+	// "start_folder" xml property.  Default is LLUUID::null that means total Inventory hierarchy. 
+	std::string         mStartFolderString;
+	LLUUID				mStartFolderID;
 };
 
 #endif // LL_LLINVENTORYPANEL_H
-- 
cgit v1.2.3


From e11d1c1d2b437b7b6d8ba0d0514f050b5d60b221 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Mon, 23 Nov 2009 18:10:37 -0500
Subject: EXT-2705 : Remove (dont' just grey out) right-click context menu
 options for Links that aren't necessary

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderview.cpp      |  8 +++--
 indra/newview/llinventorybridge.cpp | 62 +++++++++++++++++--------------------
 2 files changed, 34 insertions(+), 36 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 3138b5b26f..ab49739d58 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -39,6 +39,7 @@
 #include "llinventoryclipboard.h" // *TODO: remove this once hack below gone.
 #include "llinventoryfilter.h"
 #include "llinventoryfunctions.h"
+#include "llinventorypanel.h"
 #include "llfoldertype.h"
 #include "llfloaterinventory.h"// hacked in for the bonus context menu items.
 #include "llkeyboard.h"
@@ -2015,9 +2016,10 @@ static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory");
 // Main idle routine
 void LLFolderView::doIdle()
 {
-	// Don't do anything until the inventory is usable and loaded up.
-	// Seraph: Change this to calling mParentPanel->isViewsInitialized
-	if (!gInventory.isInventoryUsable())
+	// If this is associated with the user's inventory, don't do anything
+	// until that inventory is loaded up.
+	const LLInventoryPanel *inventory_panel = dynamic_cast<LLInventoryPanel*>(mParentPanel);
+	if (inventory_panel && !inventory_panel->getIsViewsInitialized())
 	{
 		return;
 	}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index db079de593..50dbe8af96 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -509,28 +509,39 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
 										std::vector<std::string> &items,
 										std::vector<std::string> &disabled_items, U32 flags)
 {
-	items.push_back(std::string("Rename"));
-	if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
-	{
-		disabled_items.push_back(std::string("Rename"));
-	}
-
-	if (show_asset_id)
+	const LLInventoryObject *obj = getInventoryObject();
+	if (obj && obj->getIsLinkType())
 	{
-		items.push_back(std::string("Copy Asset UUID"));
-		if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
-			  || (flags & FIRST_SELECTED_ITEM) == 0)
+		items.push_back(std::string("Find Original"));
+		if (LLAssetType::lookupIsLinkType(obj->getType()))
 		{
-			disabled_items.push_back(std::string("Copy Asset UUID"));
+			disabled_items.push_back(std::string("Find Original"));
 		}
 	}
-
-	items.push_back(std::string("Copy Separator"));
-
-	items.push_back(std::string("Copy"));
-	if (!isItemCopyable())
+	else
 	{
-		disabled_items.push_back(std::string("Copy"));
+		items.push_back(std::string("Rename"));
+		if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
+		{
+			disabled_items.push_back(std::string("Rename"));
+		}
+		
+		if (show_asset_id)
+		{
+			items.push_back(std::string("Copy Asset UUID"));
+			if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
+				 || (flags & FIRST_SELECTED_ITEM) == 0)
+			{
+				disabled_items.push_back(std::string("Copy Asset UUID"));
+			}
+		}
+		items.push_back(std::string("Copy Separator"));
+		
+		items.push_back(std::string("Copy"));
+		if (!isItemCopyable())
+		{
+			disabled_items.push_back(std::string("Copy"));
+		}
 	}
 
 	items.push_back(std::string("Paste"));
@@ -3707,11 +3718,6 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
-		LLInventoryItem* item = getItem();
-		if (item && item->getIsLinkType())
-		{
-			items.push_back(std::string("Find Original"));
-		}
 		items.push_back(std::string("Open"));
 		items.push_back(std::string("Properties"));
 
@@ -4031,14 +4037,9 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	}
 	else
 	{
-		LLInventoryItem* item = getItem();
-		if (item && item->getIsLinkType())
-		{
-			items.push_back(std::string("Find Original"));
-		}
-
 		items.push_back(std::string("Properties"));
 
+		LLInventoryItem *item = getItem();
 		getClipboardEntries(true, items, disabled_items, flags);
 
 		LLObjectBridge::sContextMenuItemID = mUUID;
@@ -4469,11 +4470,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 			items.push_back(std::string("Open"));
 		}
 
-		if (item && item->getIsLinkType())
-		{
-			items.push_back(std::string("Find Original"));
-		}
-
 		items.push_back(std::string("Properties"));
 
 		getClipboardEntries(true, items, disabled_items, flags);
-- 
cgit v1.2.3


From fdf80d2af35c5e2ce06f86f8710b470abf7ab387 Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Mon, 23 Nov 2009 17:35:47 -0800
Subject: Fix for DEV-42997 404s result in blank page Also needs a tweak to
 LLQtWebKit that stops navigation to 404 URL specified in code if the URL is
 empty.

---
 indra/newview/llviewermedia.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 8c41133a3a..9dfdf3d5b1 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -169,6 +169,12 @@ public:
 			completeAny(status, "text/html");
 		}
 		else
+		if(status == 404)
+		{
+			// Treat 404s like an html page.
+			completeAny(status, "text/html");
+		}
+		else
 		{
 			llwarns << "responder failed with status " << status << ", reason " << reason << llendl;
 		
-- 
cgit v1.2.3


From d61ef312a2124bd09c499f5faaa1fe8b8b12510f Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 09:34:04 -0800
Subject: DEV-41568 - implement parcel media controls in the nearby media
 floater Review #42

This implements the parcel media controls in the nearby media floater, including:
- Play, Pause, Stop, Volume, and Mute
- Correct update of the parcel media name
- Parcel Audio (which is currently broken, so I cannot test it)
---
 indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 88049fe7d1..0aa05bc0f9 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -417,8 +417,8 @@ function="MediaCtrl.CommitURL" />
 		height="22"
 		min_width="22"
 		width="22">
-	  <!-- Note: this isn't quite right either...the mute button is not the -->
-	  <!-- same as the others because it can't have the "image_overlay" be  -->
+	  <!-- Note: this is not quite right either...the mute button is not the -->
+	  <!-- same as the others because it cannot have the "image_overlay" be  -->
 	  <!-- two different images.  -->
 	  <button
 		  image_disabled="PushButton_Disabled"
@@ -439,7 +439,7 @@ function="MediaCtrl.CommitURL" />
 			function="MediaCtrl.ToggleMute" />
 	  </button>
 	</layout_panel>
-	<!-- We don't have a design yet for "volume", so this is a temporary -->
+	<!-- We do not have a design yet for "volume", so this is a temporary -->
 	<!-- solution.  See DEV-42827. -->
 	<layout_panel
 		name="volume_up"
-- 
cgit v1.2.3


From e1cd91de4e9f3847f185d8b2ffc5ba3a545340fb Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 24 Nov 2009 12:49:36 -0500
Subject: For EXT-2571: Right click context menu for Outfits

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index db079de593..628db46281 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -62,6 +62,7 @@
 #include "llviewerwindow.h"
 #include "llvoavatarself.h"
 #include "llwearablelist.h"
+#include "llpaneloutfitsinventory.h"
 
 using namespace LLOldEvents;
 
@@ -2340,6 +2341,15 @@ void LLFolderBridge::staticFolderOptionsMenu()
 	sSelf->folderOptionsMenu();
 }
 
+bool isInOutfitsSidePanel(LLPanel *panel)
+{
+	LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(panel);
+	LLPanelOutfitsInventory *outfit_panel =
+		dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
+	LLInventoryPanel *outfit_inv_panel = outfit_panel ? outfit_panel->getActivePanel(): NULL;
+	return (my_panel && (my_panel == outfit_inv_panel));
+}
+
 void LLFolderBridge::folderOptionsMenu()
 {
 	std::vector<std::string> disabled_items;
@@ -2353,11 +2363,17 @@ void LLFolderBridge::folderOptionsMenu()
 	// BAP change once we're no longer treating regular categories as ensembles.
 	const bool is_ensemble = category && (type == LLFolderType::FT_NONE ||
 										  LLFolderType::lookupIsEnsembleType(type));
+	const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get());
 
 	// calling card related functionality for folders.
 
+	if (is_sidepanel)
+	{
+		mItems.clear();
+	}
+
 	// Only enable calling-card related options for non-default folders.
-	if (!is_default_folder)
+	if (!is_sidepanel && !is_default_folder)
 	{
 		LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD);
 		if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard))
-- 
cgit v1.2.3


From fc6cfc27bec61ac1f66c1304cc7b54f19157584e Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 24 Nov 2009 14:37:48 -0500
Subject: Fix for EXT-2571 to accommodate accordion panels

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp       |  8 ++++++--
 indra/newview/llpaneloutfitsinventory.cpp | 11 +++++++++++
 indra/newview/llpaneloutfitsinventory.h   |  1 +
 3 files changed, 18 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 628db46281..3e847f11ce 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2346,8 +2346,12 @@ bool isInOutfitsSidePanel(LLPanel *panel)
 	LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(panel);
 	LLPanelOutfitsInventory *outfit_panel =
 		dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
-	LLInventoryPanel *outfit_inv_panel = outfit_panel ? outfit_panel->getActivePanel(): NULL;
-	return (my_panel && (my_panel == outfit_inv_panel));
+	if (!outfit_panel)
+		return false;
+	return outfit_panel->isAccordionPanel(my_panel);
+
+	//LLInventoryPanel *outfit_inv_panel = outfit_panel ? outfit_panel->getActivePanel(): NULL;
+	//return (my_panel && (my_panel == outfit_inv_panel));
 }
 
 void LLFolderBridge::folderOptionsMenu()
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 2550962d76..e66a4440e9 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -398,3 +398,14 @@ LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
 	return mActivePanel;
 }
 
+bool LLPanelOutfitsInventory::isAccordionPanel(LLInventoryPanel *panel)
+{
+	for(accordionpanels_vec_t::iterator it = mAccordionPanels.begin();
+		it != mAccordionPanels.end();
+		++it)
+	{
+		if (*it == panel)
+			return true;
+	}
+	return false;
+}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 902a5caab8..7769a7d172 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -78,6 +78,7 @@ public:
 	//////////////////////////////////////////////////////////////////////////////////
 	// Accordion                                                                    //
 	LLInventoryPanel* 	getActivePanel();
+	bool isAccordionPanel(LLInventoryPanel *panel);
 	
 protected:
 	void 				initAccordionPanels();
-- 
cgit v1.2.3


From 4821134aa7be2471aad461aa6a730a68a4c92560 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Tue, 24 Nov 2009 15:34:31 -0500
Subject: EXT-2671 avatar rebaking on every login

We were querying agent wearables (baked texture) cache before setting
mWearablesLoaded. First thing the function does is checks mWearablesLoaded.
Moving the call down to later in the function allows us to request & use
cached baked textures again.

Code reviewed by Seraph

--HG--
branch : avatar-pipeline
---
 indra/newview/llagentwearables.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 574b449d23..475f34dc2b 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1547,7 +1547,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 
 	gInventory.notifyObservers();
 
-	queryWearableCache();
 
 	std::vector<LLWearable*>::iterator wearable_iter;
 
@@ -1570,6 +1569,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 	// Start rendering & update the server
 	mWearablesLoaded = TRUE; 
 	checkWearablesLoaded();
+	queryWearableCache();
 	updateServer();
 
 	lldebugs << "setWearableOutfit() end" << llendl;
-- 
cgit v1.2.3


From b6c93cf5406cf1a6e898c072f3c900bf2d902953 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 24 Nov 2009 17:11:26 -0500
Subject: For EXT-2584: Select and rename new folder when creating new outfit;
 currently works for new outfit created in side panel, but not in appearance
 editor

--HG--
branch : avatar-pipeline
---
 indra/newview/llpaneloutfitsinventory.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index e66a4440e9..5af26c1ad9 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -144,17 +144,20 @@ void LLPanelOutfitsInventory::onNew()
 {
 	const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
 	LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name);
-	/*
+
 	getRootFolder()->setSelectionByID(outfit_folder, TRUE);
 	getRootFolder()->setNeedsAutoRename(TRUE);
-	getRootFolder()->startRenamingSelectedItem();
-	*/
 }
 
 void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
 	updateListCommands();
 	updateParent();
+	if (getRootFolder()->needsAutoRename())
+	{
+		getRootFolder()->startRenamingSelectedItem();
+		getRootFolder()->setNeedsAutoRename(FALSE);
+	}
 }
 
 void LLPanelOutfitsInventory::onSelectorButtonClicked()
-- 
cgit v1.2.3


From f276b73d974a4b47d50e71922846efe9ee0b1409 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 14:26:00 -0800
Subject: DEV-41998 - refactor mediadataclient to use a std::list, and re-sort
 every time an item is pulled off the queue Review #43

This change refactors mediadataclient to no longer use a PriorityQueue (which sorts only on insertion), but rather just use a std::list which is re-sorted on insert, and also when "popped" (at the time the queue timer goes off).

Also implemented a unit test to make sure re-sorting occurs on timer tick.
---
 indra/newview/llmediadataclient.cpp            | 60 ++++++++---------
 indra/newview/llmediadataclient.h              | 31 +++------
 indra/newview/tests/llmediadataclient_test.cpp | 93 +++++++++++++++++++++++++-
 3 files changed, 131 insertions(+), 53 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index badef4c7ae..924f5a2598 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -260,7 +260,8 @@ void LLMediaDataClient::Responder::result(const LLSD& content)
 //
 //////////////////////////////////////////////////////////////////////////////////////
 
-bool LLMediaDataClient::Comparator::operator() (const request_ptr_t &o1, const request_ptr_t &o2) const
+// static
+bool LLMediaDataClient::compareRequests(const request_ptr_t &o1, const request_ptr_t &o2)
 {
 	if (o2.isNull()) return true;
 	if (o1.isNull()) return false;
@@ -277,20 +278,13 @@ bool LLMediaDataClient::Comparator::operator() (const request_ptr_t &o1, const r
 	// 3: One item with an impl, another without: item with impl wins 
 	//	  (XXX is that what we want?)		 
 	// Calculate the scores for each.  
-	F64 o1_score = Comparator::getObjectScore(o1->getObject());
-	F64 o2_score = Comparator::getObjectScore(o2->getObject());
-
-    // XXX Weird: a higher score should go earlier, but by observation I notice
-    // that this causes further-away objects load first.  This is counterintuitive
-    // to the priority_queue Comparator, which states that this function should
-    // return 'true' if o1 should be *before* o2.
-    // In other words, I'd have expected that the following should return
-    // ( o1_score > o2_score).
-	return ( o1_score < o2_score );
+	F64 o1_score = getObjectScore(o1->getObject());
+	F64 o2_score = getObjectScore(o2->getObject());
+	return ( o1_score > o2_score );
 }
-	
+
 // static
-F64 LLMediaDataClient::Comparator::getObjectScore(const LLMediaDataClientObject::ptr_t &obj)
+F64 LLMediaDataClient::getObjectScore(const LLMediaDataClientObject::ptr_t &obj)
 {
 	// *TODO: make this less expensive?
 	F64 dist = obj->getDistanceFromAvatar() + 0.1;	 // avoids div by 0
@@ -310,12 +304,12 @@ F64 LLMediaDataClient::Comparator::getObjectScore(const LLMediaDataClientObject:
 //////////////////////////////////////////////////////////////////////////////////////
 
 // dump the queue
-std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::PriorityQueue &q)
+std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue_t &q)
 {
 	int i = 0;
-	std::vector<LLMediaDataClient::request_ptr_t>::const_iterator iter = q.c.begin();
-	std::vector<LLMediaDataClient::request_ptr_t>::const_iterator end = q.c.end();
-	while (iter < end)
+	LLMediaDataClient::request_queue_t::const_iterator iter = q.begin();
+	LLMediaDataClient::request_queue_t::const_iterator end = q.end();
+	while (iter != end)
 	{
 		s << "\t" << i << "]: " << (*iter)->getObject()->getID().asString();
 		iter++;
@@ -325,11 +319,11 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::PriorityQueue
 }
 
 // find the given object in the queue.
-bool LLMediaDataClient::PriorityQueue::find(const LLMediaDataClientObject::ptr_t &obj) const
+bool LLMediaDataClient::find(const LLMediaDataClientObject::ptr_t &obj) const
 {
-	std::vector<LLMediaDataClient::request_ptr_t>::const_iterator iter = c.begin();
-	std::vector<LLMediaDataClient::request_ptr_t>::const_iterator end = c.end();
-	while (iter < end)
+	request_queue_t::const_iterator iter = pRequestQueue->begin();
+	request_queue_t::const_iterator end = pRequestQueue->end();
+	while (iter != end)
 	{
 		if (obj->getID() == (*iter)->getObject()->getID())
 		{
@@ -370,13 +364,17 @@ BOOL LLMediaDataClient::QueueTimer::tick()
 		return TRUE;
 	}
 	
-	LLMediaDataClient::PriorityQueue &queue = *(mMDC->pRequestQueue);
+	request_queue_t &queue = *(mMDC->pRequestQueue);
 
 	if(!queue.empty())
 	{
 		LL_INFOS("LLMediaDataClient") << "QueueTimer::tick() started, queue is:	  " << queue << LL_ENDL;
-	}
 
+		// Re-sort the list every time...
+		// XXX Is this really what we want?
+		queue.sort(LLMediaDataClient::compareRequests);
+	}
+	
 	// quick retry loop for cases where we shouldn't wait for the next timer tick
 	while(true)
 	{
@@ -387,7 +385,7 @@ BOOL LLMediaDataClient::QueueTimer::tick()
 		}
 	
 		// Peel one off of the items from the queue, and execute request
-		request_ptr_t request = queue.top();
+		request_ptr_t request = queue.front();
 		llassert(!request.isNull());
 		const LLMediaDataClientObject *object = (request.isNull()) ? NULL : request->getObject();
 		bool performed_request = false;
@@ -398,7 +396,7 @@ BOOL LLMediaDataClient::QueueTimer::tick()
 		{
 			// This object has been marked dead.  Pop it and move on to the next item in the queue immediately.
 			LL_INFOS("LLMediaDataClient") << "Skipping " << *request << ": object is dead!" << LL_ENDL;
-			queue.pop();
+			queue.pop_front();
 			continue;	// jump back to the start of the quick retry loop
 		}
 
@@ -442,7 +440,7 @@ BOOL LLMediaDataClient::QueueTimer::tick()
 											  << mMDC->mMaxNumRetries << " tries...popping object id " << object->getID() << LL_ENDL; 
 				// XXX Should we bring up a warning dialog??
 			}
-			queue.pop();
+			queue.pop_front();
 		}
 		else {
 			request->incRetryCount();
@@ -451,7 +449,7 @@ BOOL LLMediaDataClient::QueueTimer::tick()
  		// end of quick retry loop -- any cases where we want to loop will use 'continue' to jump back to the start.
  		break;
 	}  
-	
+
 	LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() finished, queue is now: " << (*(mMDC->pRequestQueue)) << LL_ENDL;
 
 	return queue.empty();
@@ -488,7 +486,9 @@ void LLMediaDataClient::enqueue(const Request *request)
 	LL_INFOS("LLMediaDataClient") << "Queuing request for " << *request << LL_ENDL;
 	// Push the request on the priority queue
 	// Sadly, we have to const-cast because items put into the queue are not const
-	pRequestQueue->push(const_cast<LLMediaDataClient::Request*>(request));
+	pRequestQueue->push_back(const_cast<LLMediaDataClient::Request*>(request));
+	// sort the list
+	pRequestQueue->sort(LLMediaDataClient::compareRequests);
 	LL_DEBUGS("LLMediaDataClient") << "Queue:" << (*pRequestQueue) << LL_ENDL;
 	// Start the timer if not already running
 	startQueueTimer();
@@ -508,7 +508,7 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay,
 	  mMaxNumRetries(max_retries),
 	  mQueueTimerIsRunning(false)
 {
-	pRequestQueue = new PriorityQueue();
+	pRequestQueue = new request_queue_t();
 }
 
 LLMediaDataClient::~LLMediaDataClient()
@@ -529,7 +529,7 @@ bool LLMediaDataClient::isEmpty() const
 
 bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) const
 {
-	return (NULL == pRequestQueue) ? false : pRequestQueue->find(object);
+	return (NULL == pRequestQueue) ? false : find(object);
 }
 
 //////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index d5dd050111..812e9cbdec 100755
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -195,30 +195,14 @@ protected:
 	
 private:
 	
-	// Comparator for PriorityQueue
-	class Comparator
-	{
-	public:
-		bool operator() (const request_ptr_t &o1, const request_ptr_t &o2) const;
-	private:
-		static F64 getObjectScore(const LLMediaDataClientObject::ptr_t &obj);
-	};
+	typedef std::list<request_ptr_t> request_queue_t;
 	
-    // PriorityQueue
-	class PriorityQueue : public std::priority_queue<
-		request_ptr_t, 
-		std::vector<request_ptr_t>, 
-		Comparator >
-	{
-	public:
-		// Return whether the given object is in the queue
-		bool find(const LLMediaDataClientObject::ptr_t &obj) const;
-		
-		friend std::ostream& operator<<(std::ostream &s, const PriorityQueue &q);
-	};
+	// Comparator for sorting
+	static bool compareRequests(const request_ptr_t &o1, const request_ptr_t &o2);
+	static F64 getObjectScore(const LLMediaDataClientObject::ptr_t &obj);
     
 	friend std::ostream& operator<<(std::ostream &s, const Request &q);
-    friend std::ostream& operator<<(std::ostream &s, const PriorityQueue &q);
+	friend std::ostream& operator<<(std::ostream &s, const request_queue_t &q);
 
 	class QueueTimer : public LLEventTimer
 	{
@@ -232,6 +216,9 @@ private:
 		LLPointer<LLMediaDataClient> mMDC;
 	};
 
+	// Return whether the given object is in the queue
+	bool find(const LLMediaDataClientObject::ptr_t &obj) const;
+	
 	void startQueueTimer();
 	void stopQueueTimer();
 	void setIsRunning(bool val) { mQueueTimerIsRunning = val; }
@@ -242,7 +229,7 @@ private:
 	
 	bool mQueueTimerIsRunning;
 	
-	PriorityQueue *pRequestQueue;
+	request_queue_t *pRequestQueue;
 };
 
 
diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp
index 217889c390..6ff2c9446e 100644
--- a/indra/newview/tests/llmediadataclient_test.cpp
+++ b/indra/newview/tests/llmediadataclient_test.cpp
@@ -191,6 +191,12 @@ public:
 	virtual bool isDead() const
 		{ return mDead; }
 
+	void setDistanceFromAvatar(F64 val)
+		{ mRep["distance"] = val; }
+	
+	void setTotalMediaInterest(F64 val)
+		{ mRep["interest"] = val; }
+
 	int getNumBounceBacks() const
 		{ return mNumBounceBacks; }
 	
@@ -593,6 +599,91 @@ namespace tut
 
 			ensure("queue empty", mdc->isEmpty());
 		}
-		
+		ensure("refcount of o1", o1->getNumRefs(), 1);
+		ensure("refcount of o2", o2->getNumRefs(), 1);
+		ensure("refcount of o3", o3->getNumRefs(), 1);
+		ensure("refcount of o4", o4->getNumRefs(), 1);
+
 	}
+	
+	//////////////////////////////////////////////////////////////////////////////////////////
+
+    template<> template<>
+    void mediadataclient_object_t::test<9>()
+    {
+		//
+		// Test queue re-ordering
+		//
+		LOG_TEST(9);
+		
+		LLMediaDataClientObject::ptr_t o1 = new LLMediaDataClientObjectTest(_DATA(VALID_OBJECT_ID_1,"10.0","1.0"));
+		LLMediaDataClientObject::ptr_t o2 = new LLMediaDataClientObjectTest(_DATA(VALID_OBJECT_ID_2,"20.0","1.0"));
+		LLMediaDataClientObject::ptr_t o3 = new LLMediaDataClientObjectTest(_DATA(VALID_OBJECT_ID_3,"30.0","1.0"));
+		LLMediaDataClientObject::ptr_t o4 = new LLMediaDataClientObjectTest(_DATA(VALID_OBJECT_ID_4,"40.0","1.0"));
+		{
+			LLPointer<LLObjectMediaDataClient> mdc = new LLObjectMediaDataClient(NO_PERIOD,NO_PERIOD);
+			
+			// queue up all 4 objects.  They should now be in the queue in
+			// order 1 through 4, with 4 being at the front of the queue
+			mdc->fetchMedia(o1);
+			mdc->fetchMedia(o2);
+			mdc->fetchMedia(o3);
+			mdc->fetchMedia(o4);
+			
+			int test_num = 0;
+			
+			ensure(STR(test_num) + ". is in queue 1", mdc->isInQueue(o1));
+			ensure(STR(test_num) + ". is in queue 2", mdc->isInQueue(o2));
+			ensure(STR(test_num) + ". is in queue 3", mdc->isInQueue(o3));
+			ensure(STR(test_num) + ". is in queue 4", mdc->isInQueue(o4));
+			ensure(STR(test_num) + ". post records", gPostRecords->size(), 0);
+			
+			::pump_timers();
+			++test_num;
+			
+			// The first tick should remove the first one 
+			ensure(STR(test_num) + ". is not in queue 1", !mdc->isInQueue(o1));
+			ensure(STR(test_num) + ". is in queue 2", mdc->isInQueue(o2));
+			ensure(STR(test_num) + ". is in queue 3", mdc->isInQueue(o3));
+			ensure(STR(test_num) + ". is in queue 4", mdc->isInQueue(o4));
+			ensure(STR(test_num) + ". post records", gPostRecords->size(), 1);
+			
+			// Now, pretend that object 4 moved relative to the avatar such
+			// that it is now closest
+			static_cast<LLMediaDataClientObjectTest*>(
+				static_cast<LLMediaDataClientObject*>(o4))->setDistanceFromAvatar(5.0);
+			
+			::pump_timers();
+			++test_num;
+			
+			// The second tick should still pick off item 2, but then re-sort
+			// have picked off object 4
+			ensure(STR(test_num) + ". is in queue 2", mdc->isInQueue(o2));
+			ensure(STR(test_num) + ". is in queue 3", mdc->isInQueue(o3));
+			ensure(STR(test_num) + ". is not in queue 4", !mdc->isInQueue(o4));
+			ensure(STR(test_num) + ". post records", gPostRecords->size(), 2);
+
+			::pump_timers();
+			++test_num;
+			
+			// The third tick should pick off object 2
+			ensure(STR(test_num) + ". is not in queue 2", !mdc->isInQueue(o2));
+			ensure(STR(test_num) + ". is in queue 3", mdc->isInQueue(o3));
+			ensure(STR(test_num) + ". post records", gPostRecords->size(), 3);
+
+			// The fourth tick should pick off object 3
+			::pump_timers();
+			++test_num;
+
+			ensure(STR(test_num) + ". is not in queue 3", !mdc->isInQueue(o3));
+			ensure(STR(test_num) + ". post records", gPostRecords->size(), 4);
+
+			ensure("queue empty", mdc->isEmpty());
+		}
+		ensure("refcount of o1", o1->getNumRefs(), 1);
+		ensure("refcount of o2", o2->getNumRefs(), 1);
+		ensure("refcount of o3", o3->getNumRefs(), 1);
+		ensure("refcount of o4", o4->getNumRefs(), 1);
+    }
+	
 }
-- 
cgit v1.2.3


From 52a21a301b3fef1401ee333a77f1d53310737717 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Tue, 24 Nov 2009 18:25:20 -0500
Subject: EXT-2818 not using IMG_INVISIBLE in baked textures

this patch allows IMG_INVISIBLE in an alpha mask to set the baked texture to
also be IMG_INVISIBLE for the appropriate baked texture.

Will be post-reviewed with other alpha mask fixes.

--HG--
branch : avatar-pipeline
---
 indra/newview/lltexlayer.cpp     | 102 ++++++++++++++++++++++++++++++---------
 indra/newview/lltexlayer.h       |   6 +++
 indra/newview/llvoavatar.cpp     |   6 +--
 indra/newview/llvoavatarself.cpp |   7 +++
 indra/newview/llvoavatarself.h   |   1 +
 5 files changed, 96 insertions(+), 26 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 25e0ca46e4..a90f3ee181 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -223,7 +223,16 @@ BOOL LLTexLayerSetBuffer::render()
 		}
 		else
 		{
-			readBackAndUpload();
+			if (mTexLayerSet->isVisible())
+			{
+				readBackAndUpload();
+			}
+			else
+			{
+				mUploadPending = FALSE;
+				mNeedsUpload = FALSE;
+				mTexLayerSet->getAvatar()->setNewBakedTexture(mTexLayerSet->getBakedTexIndex(),IMG_INVISIBLE);
+			}
 		}
 	}
 
@@ -551,6 +560,7 @@ LLTexLayerSet::LLTexLayerSet(LLVOAvatarSelf* const avatar) :
 	mComposite( NULL ),
 	mAvatar( avatar ),
 	mUpdatesEnabled( FALSE ),
+	mIsVisible( TRUE ),
 	mInfo( NULL )
 {
 }
@@ -665,38 +675,54 @@ BOOL LLTexLayerSet::isLocalTextureDataFinal() const
 BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
 {
 	BOOL success = TRUE;
+	mIsVisible = TRUE;
 
-	LLGLSUIDefault gls_ui;
-	LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
-	gGL.setColorMask(true, true);
-
-	// clear buffer area to ensure we don't pick up UI elements
+	if (mMaskLayerList.size() > 0)
 	{
-		gGL.flush();
-		LLGLDisable no_alpha(GL_ALPHA_TEST);
-		gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-		gGL.color4f( 0.f, 0.f, 0.f, 1.f );
-		
-		gl_rect_2d_simple( width, height );
-		
-		gGL.flush();
+		for (layer_list_t::iterator iter = mMaskLayerList.begin(); iter != mMaskLayerList.end(); iter++)
+		{
+			LLTexLayerInterface* layer = *iter;
+			if (layer->isInvisibleAlphaMask())
+			{
+				mIsVisible = FALSE;
+			}
+		}
 	}
 
-	// composite color layers
-	for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ )
+	if (mIsVisible)
 	{
-		LLTexLayerInterface* layer = *iter;
-		if (layer->getRenderPass() == LLTexLayer::RP_COLOR)
+		LLGLSUIDefault gls_ui;
+		LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
+		gGL.setColorMask(true, true);
+	
+		// clear buffer area to ensure we don't pick up UI elements
 		{
 			gGL.flush();
-			success &= layer->render(x, y, width, height);
+			LLGLDisable no_alpha(GL_ALPHA_TEST);
+			gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+			gGL.color4f( 0.f, 0.f, 0.f, 1.f );
+			
+			gl_rect_2d_simple( width, height );
+			
 			gGL.flush();
 		}
-	}
 	
-	renderAlphaMaskTextures(x, y, width, height, false);
-
-	stop_glerror();
+		// composite color layers
+		for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ )
+		{
+			LLTexLayerInterface* layer = *iter;
+			if (layer->getRenderPass() == LLTexLayer::RP_COLOR)
+			{
+				gGL.flush();
+				success &= layer->render(x, y, width, height);
+				gGL.flush();
+			}
+		}
+		
+		renderAlphaMaskTextures(x, y, width, height, false);
+	
+		stop_glerror();
+	}
 
 	return success;
 }
@@ -1709,6 +1735,19 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
 	}
 }
 
+/*virtual*/ BOOL LLTexLayer::isInvisibleAlphaMask()
+{
+	if (mLocalTextureObject)
+	{
+		if (mLocalTextureObject->getID() == IMG_INVISIBLE)
+		{
+			return TRUE;
+		}
+	}
+
+	return FALSE;
+}
+
 // private helper function
 LLUUID LLTexLayer::getUUID()
 {
@@ -1898,6 +1937,23 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i)
 	}
 }
 
+/*virtual*/ BOOL LLTexLayerTemplate::isInvisibleAlphaMask()
+{
+	U32 num_wearables = updateWearableCache();
+	for (U32 i = 0; i < num_wearables; i++)
+	{
+		LLTexLayer *layer = getLayer(i);
+		if (layer)
+		{
+			 if (layer->isInvisibleAlphaMask())
+			 {
+				 return TRUE;
+			 }
+		}
+	}
+
+	return FALSE;
+}
 
 
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index cd8f27a96b..5be58f64a9 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -99,6 +99,7 @@ public:
 	virtual void			gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height) = 0;
 	BOOL					hasAlphaParams() const { return !mParamAlphaList.empty(); }
 	BOOL					isVisibilityMask() const;
+	virtual BOOL			isInvisibleAlphaMask() = 0;
 
 	LLTexLayerSet*			getLayerSet() {return mTexLayerSet;}
 
@@ -141,6 +142,8 @@ public:
 	/*virtual*/ void		gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
 	/*virtual*/ void		setHasMorph(BOOL newval);
 	/*virtual*/ void		deleteCaches();
+	/*virtual*/ BOOL		isInvisibleAlphaMask();
+
 private:
 	U32 	updateWearableCache();
 	LLTexLayer* getLayer(U32 i);
@@ -173,6 +176,7 @@ public:
 	/*virtual*/ void		gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
 	BOOL					renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color);
 	void					addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
+	/*virtual*/ BOOL		isInvisibleAlphaMask();
 
 	void					setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; }
 	LLLocalTextureObject* 	getLTO() { return mLocalTextureObject; }
@@ -272,6 +276,7 @@ public:
 	BOOL					hasComposite() const { return (mComposite.notNull()); }
 	LLVOAvatarDefines::EBakedTextureIndex getBakedTexIndex() { return mBakedTexIndex; }
 	void					setBakedTexIndex( LLVOAvatarDefines::EBakedTextureIndex index) { mBakedTexIndex = index; }
+	BOOL					isVisible() const { return mIsVisible; }
 
 public:
 	static BOOL		sHasCaches;
@@ -284,6 +289,7 @@ private:
 	LLPointer<LLTexLayerSetBuffer>	mComposite;
 	LLVOAvatarSelf*	const	mAvatar; // Backlink only; don't make this an LLPointer.
 	BOOL					mUpdatesEnabled;
+	BOOL					mIsVisible;
 
 	LLVOAvatarDefines::EBakedTextureIndex mBakedTexIndex;
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9e75d7853d..3bf8038a66 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3832,7 +3832,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
 		}
 		// Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair)
 		// TODO: 1.25 will be able to switch this logic back to calling isTextureVisible();
-		if (getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha)
+		if ((getImage(TEX_HAIR_ALPHA, 0)->getID() != IMG_INVISIBLE && getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE) || LLDrawPoolAlpha::sShowDebugAlpha)
 		{
 			num_indices += mMeshLOD[MESH_ID_HAIR]->render(mAdjustedPixelArea, first_pass, mIsDummy);
 			first_pass = FALSE;
@@ -3868,7 +3868,7 @@ U32 LLVOAvatar::renderRigid()
 		return 0;
 	}
 
-	if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy)
+	if ((isTextureVisible(TEX_EYES_ALPHA) && isTextureVisible(TEX_EYES_BAKED))  || mIsDummy)
 	{
 		num_indices += mMeshLOD[MESH_ID_EYEBALL_LEFT]->render(mAdjustedPixelArea, TRUE, mIsDummy);
 		num_indices += mMeshLOD[MESH_ID_EYEBALL_RIGHT]->render(mAdjustedPixelArea, TRUE, mIsDummy);
@@ -3898,7 +3898,7 @@ U32 LLVOAvatar::renderFootShadows()
 	
 	// Don't render foot shadows if your lower body is completely invisible.
 	// (non-humanoid avatars rule!)
-	if (!isTextureVisible(TEX_LOWER_BAKED))
+	if (!isTextureVisible(TEX_LOWER_BAKED) || ! isTextureVisible(TEX_LOWER_ALPHA))
 	{
 		return 0;
 	}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 843cba7860..f3e787ae7e 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1839,6 +1839,13 @@ ETextureIndex LLVOAvatarSelf::getBakedTE( const LLTexLayerSet* layerset ) const
 }
 
 
+void LLVOAvatarSelf::setNewBakedTexture(LLVOAvatarDefines::EBakedTextureIndex i, const LLUUID &uuid)
+{
+	ETextureIndex index = LLVOAvatarDictionary::bakedToLocalTextureIndex(i);
+	setNewBakedTexture(index, uuid);
+}
+
+
 //-----------------------------------------------------------------------------
 // setNewBakedTexture()
 // A new baked texture has been successfully uploaded and we can start using it now.
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index a1cad82eff..e376e5e9ef 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -209,6 +209,7 @@ private:
 	//--------------------------------------------------------------------
 public:
 	LLVOAvatarDefines::ETextureIndex getBakedTE(const LLTexLayerSet* layerset ) const;
+	void				setNewBakedTexture(LLVOAvatarDefines::EBakedTextureIndex i, const LLUUID &uuid);
 	void				setNewBakedTexture(LLVOAvatarDefines::ETextureIndex i, const LLUUID& uuid);
 	void				setCachedBakedTexture(LLVOAvatarDefines::ETextureIndex i, const LLUUID& uuid);
 	void				forceBakeAllTextures(bool slam_for_debug = false);
-- 
cgit v1.2.3


From c8519c5a7b41652499ead70736f0d61470ee6ce3 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 15:55:53 -0800
Subject: Code review feedback: Don't re-sort when adding to the queue: it
 isn't really necessary since we sort every time we pull off the queue.

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

(limited to 'indra/newview')

diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 924f5a2598..3c337961e1 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -487,8 +487,6 @@ void LLMediaDataClient::enqueue(const Request *request)
 	// Push the request on the priority queue
 	// Sadly, we have to const-cast because items put into the queue are not const
 	pRequestQueue->push_back(const_cast<LLMediaDataClient::Request*>(request));
-	// sort the list
-	pRequestQueue->sort(LLMediaDataClient::compareRequests);
 	LL_DEBUGS("LLMediaDataClient") << "Queue:" << (*pRequestQueue) << LL_ENDL;
 	// Start the timer if not already running
 	startQueueTimer();
-- 
cgit v1.2.3


From 6da470f189ed9f92a7e04529496e95e92d34abcb Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Tue, 24 Nov 2009 19:47:56 -0500
Subject: EXT-2818 no way to get IMG_INVISIBLE as a baked texture

reverting unnecessary changes based on code review of previous checkin.

Code for both patches reviewed by Seraph.

--HG--
branch : avatar-pipeline
---
 indra/newview/llvoavatar.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3bf8038a66..9882dcd6af 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3832,7 +3832,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
 		}
 		// Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair)
 		// TODO: 1.25 will be able to switch this logic back to calling isTextureVisible();
-		if ((getImage(TEX_HAIR_ALPHA, 0)->getID() != IMG_INVISIBLE && getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE) || LLDrawPoolAlpha::sShowDebugAlpha)
+		if (getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha)
 		{
 			num_indices += mMeshLOD[MESH_ID_HAIR]->render(mAdjustedPixelArea, first_pass, mIsDummy);
 			first_pass = FALSE;
@@ -3868,7 +3868,7 @@ U32 LLVOAvatar::renderRigid()
 		return 0;
 	}
 
-	if ((isTextureVisible(TEX_EYES_ALPHA) && isTextureVisible(TEX_EYES_BAKED))  || mIsDummy)
+	if (isTextureVisible(TEX_EYES_BAKED)  || mIsDummy)
 	{
 		num_indices += mMeshLOD[MESH_ID_EYEBALL_LEFT]->render(mAdjustedPixelArea, TRUE, mIsDummy);
 		num_indices += mMeshLOD[MESH_ID_EYEBALL_RIGHT]->render(mAdjustedPixelArea, TRUE, mIsDummy);
@@ -3898,7 +3898,7 @@ U32 LLVOAvatar::renderFootShadows()
 	
 	// Don't render foot shadows if your lower body is completely invisible.
 	// (non-humanoid avatars rule!)
-	if (!isTextureVisible(TEX_LOWER_BAKED) || ! isTextureVisible(TEX_LOWER_ALPHA))
+	if (!isTextureVisible(TEX_LOWER_BAKED))
 	{
 		return 0;
 	}
-- 
cgit v1.2.3


From a49862a4fcb2d00d1778092191321e033a693076 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 16:48:20 -0800
Subject: FIX DEV-41999: don't set home URL if "Multiple Media" Review #44

---
 indra/newview/llpanelmediasettingsgeneral.cpp | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index ad8a379cc1..9b1f71a9a9 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -387,17 +387,19 @@ void LLPanelMediaSettingsGeneral::preApply()
 //
 void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
 {
-    fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = mAutoLoop->getValue();
-    fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = mAutoPlay->getValue();
-    fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue();
-    fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue();
-    fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex();
-    //Don't fill in current URL: this is only supposed to get changed via navigate
+	fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = mAutoLoop->getValue();
+	fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = mAutoPlay->getValue();
+	fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue();
+	fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue();
+	fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex();
+	//Don't fill in current URL: this is only supposed to get changed via navigate
 	// fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
-    fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue();
-    fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue();
-    fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue();
-    fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = mWidthPixels->getValue();
+	fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue();
+	// Don't fill in the home URL if it is the special "Multiple Media" string!
+	if (LLTrans::getString("Multiple Media") != mHomeURL->getValue())
+		fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue();
+	fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue();
+	fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = mWidthPixels->getValue();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-- 
cgit v1.2.3


From ce7102d300d71b764a06cc80286d8e95ef0130ee Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 16:51:04 -0800
Subject: FIX DEV-43033 - the prim media controls were "stealing focus" and so
 would clobber any drop-downs

Reviewed by James (thanks, James!)
---
 indra/newview/llpanelprimmediacontrols.cpp                   |  2 +-
 .../skins/default/xui/en/panel_media_settings_general.xml    | 12 ++----------
 2 files changed, 3 insertions(+), 11 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 529912929d..71c1b0cbb9 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -510,7 +510,7 @@ void LLPanelPrimMediaControls::updateShape()
 				mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
 				gFocusMgr.setTopCtrl(mMediaProgressPanel);
 			}
-			else
+			else if (mMediaProgressPanel->getVisible())
 			{
 				mMediaProgressPanel->setVisible(false);
 				gFocusMgr.setTopCtrl(NULL);
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 686f4ac1d5..e00f654750 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -93,27 +93,19 @@
   </text>
   <combo_box 
    allow_text_entry="false" 
-   bottom_delta="-20" 
-   enabled="true" 
+   bottom_delta="-20"
    follows="left|top"
    height="18" 
    left="10" 
-   max_chars="20" 
-   mouse_opaque="true"
+   max_chars="20"
    name="controls" 
    width="120">
     <combo_item 
-	 type="string" 
-	 length="1" 
-	 enabled="true" 
 	 name="Standard" 
 	 value="Standard">
       Standard
     </combo_item>
     <combo_item 
-	 type="string" 
-	 length="1" 
-	 enabled="true" 
 	 name="Mini" 
 	 value="Mini">
       Mini
-- 
cgit v1.2.3


From 80f85b39378bf63741c93ffc306c8bede67ea727 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 24 Nov 2009 20:14:01 -0500
Subject: EXT-2817 : COF contents in appearanceSP are sometimes blank on
 startup

COF folder was being removed from panel because its parent is outside the panel.  Added checks so that first-level children of panel root are never to be removed.

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorypanel.cpp | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 47201b2ccc..7168c33ce2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -328,22 +328,26 @@ void LLInventoryPanel::modelChanged(U32 mask)
 				// around in the panel's directory structure (i.e. reparented).
 				if (model_item && view_item)
 				{
-					LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
-
-					// Item has been moved.
-					if (view_item->getParentFolder() != new_parent)
+					// Don't process the item if it's hanging from the root, since its
+					// model_item's parent will be NULL.
+					if (view_item->getRoot() != view_item->getParent())
 					{
-						if (new_parent != NULL)
-						{
-							// Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
-							view_item->getParentFolder()->extractItem(view_item);
-							view_item->addToFolder(new_parent, mFolders);
-						}
-						else 
+						LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
+						// Item has been moved.
+						if (view_item->getParentFolder() != new_parent)
 						{
-							// Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that 
-							// doesn't include trash).  Just remove the item's UI.
-							view_item->destroyView();
+							if (new_parent != NULL)
+							{
+								// Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
+								view_item->getParentFolder()->extractItem(view_item);
+								view_item->addToFolder(new_parent, mFolders);
+							}
+							else 
+							{
+								// Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that 
+								// doesn't include trash).  Just remove the item's UI.
+								view_item->destroyView();
+							}
 						}
 					}
 				}
-- 
cgit v1.2.3


From 8fb121bf2da6e144faece9ea18fc67358e9aecd6 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 17:17:08 -0800
Subject: DEV-42130 - moved progress bar to below media controls, made it
 half-height per recommendation in DEV-42130

---
 .../default/xui/en/panel_prim_media_controls.xml   | 77 +++++++++++-----------
 1 file changed, 38 insertions(+), 39 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 0aa05bc0f9..2e39236f65 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -3,7 +3,7 @@
 	follows="left|right|top|bottom"
 	name="MediaControls"
 	background_visible="false"
-	height="160"
+	height="192"
 	layout="topleft"
 	mouse_opaque="false"
 	width="800">
@@ -16,44 +16,6 @@
 	  layout="topleft"
 	  mouse_opaque="false"
 	  top="20" />
-  <layout_stack
-	  follows="left|right|bottom"
-	  height="32"
-	  layout="topleft"
-	  animate="false"
-	  left="0"
-	  orientation="horizontal"
-	  top="96">
-	<!-- outer layout_panels center the inner one -->
-	<layout_panel
-		width="0"
-		layout="topleft"
-		user_resize="false" />
-	<panel
-		name="media_progress_indicator"
-		height="22"
-		layout="topleft"
-		visible="false"
-		left="0"
-		top="0"
-		auto_resize="false"
-		user_resize="false"
-		min_width="100"
-		width="200">
-	  <progress_bar
-		  name="media_progress_bar"
-		  color_bar="1 1 1 0.96"
-		  follows="left|right|top"
-		  height="16"
-		  layout="topleft"
-		  left="0"
-		  tool_tip="Media is Loading"/>
-	</panel>
-	<layout_panel
-		width="0"
-		layout="topleft"
-		user_resize="false" />
-  </layout_stack>
   <layout_stack
 	  name="media_controls"
 	  follows="left|right"
@@ -657,4 +619,41 @@ function="MediaCtrl.CommitURL" />
 		layout="topleft"
 		user_resize="false" />
   </layout_stack>
+  <layout_stack
+	  follows="left|right|bottom"
+	  height="32"
+	  layout="topleft"
+	  animate="false"
+	  left="0"
+	  orientation="horizontal"
+	  top="150">
+	<!-- outer layout_panels center the inner one -->
+	<layout_panel
+		width="0"
+		layout="topleft"
+		user_resize="false" />
+	<panel
+		name="media_progress_indicator"
+		height="22"
+		layout="topleft"
+		left="0"
+		top="0"
+		auto_resize="false"
+		user_resize="false"
+		min_width="100"
+		width="200">
+	  <progress_bar
+		  name="media_progress_bar"
+		  color_bar="1 1 1 0.96"
+		  follows="left|right|top"
+		  height="8"
+		  layout="topleft"
+		  left="0"
+		  tool_tip="Media is Loading"/>
+	</panel>
+	<layout_panel
+		width="0"
+		layout="topleft"
+		user_resize="false" />
+  </layout_stack>
 </panel>
-- 
cgit v1.2.3


From 06fd219245e4540a79924146c889bcd11b5ffc80 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 24 Nov 2009 20:39:28 -0500
Subject: EXT2825 : Clicking on Outfit Opener in AppearanceSP should open
 outfits accordion

--HG--
branch : avatar-pipeline
---
 indra/newview/llsidepanelappearance.cpp | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 8007e0fcec..d5f01418c6 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -32,6 +32,7 @@
 #include "llviewerprecompiledheaders.h"
 #include "llsidepanelappearance.h"
 
+#include "llaccordionctrltab.h"
 #include "llagent.h"
 #include "llagentwearables.h"
 #include "llappearancemgr.h"
@@ -189,16 +190,22 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked()
 		return;
 	if (!outfit_link->getIsLinkType())
 		return;
-	LLInventoryPanel *inventory_panel = mPanelOutfitsInventory->getActivePanel();
-	if (inventory_panel)
+
+	LLAccordionCtrlTab* tab_outfits = mPanelOutfitsInventory->findChild<LLAccordionCtrlTab>("tab_outfits");
+	if (tab_outfits)
 	{
-		LLFolderView *folder = inventory_panel->getRootFolder();
-		LLFolderViewItem *outfit_folder = folder->getItemByID(outfit_link->getLinkedUUID());
-		if (outfit_folder)
+		tab_outfits->changeOpenClose(FALSE);
+		LLInventoryPanel *inventory_panel = tab_outfits->findChild<LLInventoryPanel>("outfitslist_accordionpanel");
+		if (inventory_panel)
 		{
-			outfit_folder->setOpen(!outfit_folder->isOpen());
-			folder->setSelectionFromRoot(outfit_folder,TRUE);
-			folder->scrollToShowSelection();
+			LLFolderView *folder = inventory_panel->getRootFolder();
+			LLFolderViewItem *outfit_folder = folder->getItemByID(outfit_link->getLinkedUUID());
+			if (outfit_folder)
+			{
+				outfit_folder->setOpen(!outfit_folder->isOpen());
+				folder->setSelectionFromRoot(outfit_folder,TRUE);
+				folder->scrollToShowSelection();
+			}
 		}
 	}
 }
-- 
cgit v1.2.3


From 0b200c1a3a03985b0dac897d33f70abf12755b7c Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 24 Nov 2009 18:25:26 -0800
Subject: Artwork for Stop and Zoom Out for the prim media controls

---
 indra/newview/skins/default/textures/icons/Stop_Off.png   | Bin 0 -> 148 bytes
 indra/newview/skins/default/textures/icons/UnZoom_Off.png | Bin 0 -> 423 bytes
 indra/newview/skins/default/textures/textures.xml         |   6 ++++++
 .../skins/default/xui/en/panel_prim_media_controls.xml    |   6 ++----
 4 files changed, 8 insertions(+), 4 deletions(-)
 create mode 100755 indra/newview/skins/default/textures/icons/Stop_Off.png
 create mode 100755 indra/newview/skins/default/textures/icons/UnZoom_Off.png

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/textures/icons/Stop_Off.png b/indra/newview/skins/default/textures/icons/Stop_Off.png
new file mode 100755
index 0000000000..3ee215d36f
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Stop_Off.png differ
diff --git a/indra/newview/skins/default/textures/icons/UnZoom_Off.png b/indra/newview/skins/default/textures/icons/UnZoom_Off.png
new file mode 100755
index 0000000000..c794113755
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/UnZoom_Off.png differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 99f6fc5cb3..f19f480d35 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -490,6 +490,9 @@ with the same filename but different name
   <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true" />
   <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true" />
 
+  <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="false" />
+  <texture name="Stop_Over" file_name="icons/Stop_Over.png" preload="false" />
+  <texture name="Stop_Press" file_name="icons/Stop_Press.png" preload="false" />
   <texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" />
   <texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" />
   <texture name="StopReload_Press" file_name="icons/StopReload_Press.png" preload="false" />
@@ -607,6 +610,9 @@ with the same filename but different name
   <texture name="Zoom_Off" file_name="icons/Zoom_Off.png" preload="false" />
   <texture name="Zoom_Over" file_name="icons/Zoom_Over.png" preload="false" />
   <texture name="Zoom_Press" file_name="icons/Zoom_Press.png" preload="false" />
+  <texture name="UnZoom_Off" file_name="icons/UnZoom_Off.png" preload="false" />
+  <texture name="UnZoom_Over" file_name="icons/UnZoom_Over.png" preload="false" />
+  <texture name="UnZoom_Press" file_name="icons/UnZoom_Press.png" preload="false" />
 
   <!--WARNING OLD ART *do not use*-->
 
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 2e39236f65..af4c01185a 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -114,9 +114,8 @@
 		top="2"
 		min_width="22"
 		width="22">
-	  <!-- The stop button here is temporary artwork -->
 	  <button
-		  image_overlay="media_btn_stoploading.png"
+		  image_overlay="Stop_Off"
 		  image_disabled="PushButton_Disabled"
 		  image_disabled_selected="PushButton_Disabled"
 		  image_selected="PushButton_Selected"
@@ -571,9 +570,8 @@ function="MediaCtrl.CommitURL" />
 		layout="topleft"
 		min_width="21"
 		width="21" >
-	  <!-- There is no "Zoom out" icon, so we use this temporarily -->
 	  <button
-		  image_overlay="ForwardArrow_Off"
+		  image_overlay="UnZoom_Off"
 		  image_disabled="PushButton_Disabled"
 		  image_disabled_selected="PushButton_Disabled"
 		  image_selected="PushButton_Selected"
-- 
cgit v1.2.3


From 9b9c3f03ac581d312ad61f433877979fba0614bb Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 24 Nov 2009 21:58:08 -0500
Subject: EXT-2386 : The very first time you log in as a new account, your
 inventory sidepanel is blank

Changed the way that we're generating initial views for inventory panels.  Instead of waiting for a notification, we check on idle and generate the views whenever we first see that the inventory has become usable.

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorypanel.cpp | 22 ++++++++++++++++++----
 indra/newview/llinventorypanel.h   |  2 ++
 2 files changed, 20 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 7168c33ce2..0c893dddd6 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -156,6 +156,8 @@ BOOL LLInventoryPanel::postBuild()
 		initializeViews();
 	}
 
+	gIdleCallbacks.addFunction(onIdle, (void*)this);
+
 	if (mSortOrderSetting != INHERIT_SORT_ORDER)
 	{
 		setSortOrder(gSavedSettings.getU32(mSortOrderSetting));
@@ -255,13 +257,11 @@ void LLInventoryPanel::modelChanged(U32 mask)
 
 	bool handled = false;
 
-	// inventory just initialized, do complete build
-	if ((mask & LLInventoryObserver::ADD) && mInventory->isInventoryUsable() && gInventory.getChangedIDs().empty() && !mViewsInitialized)
+	if (!mViewsInitialized)
 	{
-		initializeViews();
 		return;
 	}
-
+	
 	if (mask & LLInventoryObserver::LABEL)
 	{
 		handled = true;
@@ -371,6 +371,20 @@ void LLInventoryPanel::modelChanged(U32 mask)
 	}
 }
 
+// static
+void LLInventoryPanel::onIdle(void *userdata)
+{
+	LLInventoryPanel *self = (LLInventoryPanel*)userdata;
+	// inventory just initialized, do complete build
+	if (!self->mViewsInitialized && gInventory.isInventoryUsable())
+	{
+		self->initializeViews();
+	}
+	if (self->mViewsInitialized)
+	{
+		gIdleCallbacks.deleteFunction(onIdle, (void*)self);
+	}
+}
 
 void LLInventoryPanel::initializeViews()
 {
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 5b1104936d..fd23b375fa 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -160,6 +160,8 @@ public:
 	void openSelected();
 	void unSelectAll()	{ mFolders->setSelection(NULL, FALSE, FALSE); }
 	
+	static void onIdle(void* user_data);
+
 private:
 
 	// Given the id and the parent, build all of the folder views.
-- 
cgit v1.2.3


From c5ef834606b272ad4d10ee73b916773dc7fa66d3 Mon Sep 17 00:00:00 2001
From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com>
Date: Wed, 25 Nov 2009 11:21:08 -0500
Subject: Fix for EXT-2667 - making sure inv_item isn't null

---
 indra/newview/llinventorybridge.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index a6a5ecb8e7..86f691dda2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2769,7 +2769,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 										BOOL drop)
 {
 	LLInventoryModel* model = getInventoryModel();
-	if(!model) return FALSE;
+	if(!model || !inv_item) return FALSE;
 
 	// cannot drag into library
 	if(!isAgentInventory())
-- 
cgit v1.2.3


From 73f909f7cd128870a7c1df50c0dadfbcbd152b74 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Wed, 25 Nov 2009 08:45:54 -0800
Subject: Add Power On/Off icons

---
 indra/newview/skins/default/textures/textures.xml | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index f19f480d35..3576b6ed77 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -613,6 +613,12 @@ with the same filename but different name
   <texture name="UnZoom_Off" file_name="icons/UnZoom_Off.png" preload="false" />
   <texture name="UnZoom_Over" file_name="icons/UnZoom_Over.png" preload="false" />
   <texture name="UnZoom_Press" file_name="icons/UnZoom_Press.png" preload="false" />
+  <texture name="PowerOn_Off" file_name="icons/PowerOn_Off.png" preload="false" />
+  <texture name="PowerOn_Over" file_name="icons/PowerOn_Over.png" preload="false" />
+  <texture name="PowerOn_Press" file_name="icons/PowerOn_Press.png" preload="false" />
+  <texture name="PowerOff_Off" file_name="icons/PowerOff_Off.png" preload="false" />
+  <texture name="PowerOff_Over" file_name="icons/PowerOff_Over.png" preload="false" />
+  <texture name="PowerOff_Press" file_name="icons/PowerOff_Press.png" preload="false" />
 
   <!--WARNING OLD ART *do not use*-->
 
-- 
cgit v1.2.3