From ca56ac217900e1fbbc56b04bd52704117b2d348c Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Thu, 10 Dec 2009 15:11:02 -0500
Subject: EXT-3329 : Able to delete system folder is confusing - disable from
 non-god mode

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

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3746e9cfeb..1aad8fbb3a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1408,13 +1408,14 @@ BOOL LLFolderBridge::isItemRemovable()
 	{
 		return FALSE;
 	}
+
 	// Allow protected types to be removed, but issue a warning.
-	/*
-	if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
+	// Restrict to god mode so users don't inadvertently mess up their inventory.
+	if(LLFolderType::lookupIsProtectedType(category->getPreferredType()) &&
+	   !gAgent.isGodlike())
 	{
 		return FALSE;
 	}
-	*/
 
 	LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
 	LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL);
-- 
cgit v1.2.3


From 3cb997a50475f4de54090f3e3a4490aac9e6d218 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Thu, 10 Dec 2009 15:15:33 -0500
Subject: EXT-3314 : Remove save/cancel from inventory item properties
 sidepanel and have changes apply instantly

The ItemInfoSP now works just like the old properties floaters in terms of how edits and commits are handled.

--HG--
branch : avatar-pipeline
---
 indra/newview/llsidepaneliteminfo.cpp              | 25 ++++++++++++++------
 .../skins/default/xui/en/sidepanel_item_info.xml   | 27 ----------------------
 2 files changed, 18 insertions(+), 34 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 449bdefb8f..25518d87d6 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -109,19 +109,30 @@ BOOL LLSidepanelItemInfo::postBuild()
 {
 	LLSidepanelInventorySubpanel::postBuild();
 
-	// build the UI
-	// item name & description
 	childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
-	//getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
+	getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
 	childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
-	//getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
-
+	getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
 	// Creator information
 	getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickCreator,this));
-
 	// owner information
 	getChild<LLUICtrl>("BtnOwner")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onClickOwner,this));
-
+	// acquired date
+	// owner permissions
+	// Permissions debug text
+	// group permissions
+	getChild<LLUICtrl>("CheckShareWithGroup")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
+	// everyone permissions
+	getChild<LLUICtrl>("CheckEveryoneCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
+	// next owner permissions
+	getChild<LLUICtrl>("CheckNextOwnerModify")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
+	getChild<LLUICtrl>("CheckNextOwnerCopy")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
+	getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
+	// Mark for sale or not, and sale info
+	getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
+	getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleType, this));
+	// "Price" label for edit
+	getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
 	refresh();
 	return TRUE;
 }
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index d006fd0700..cabceefa7e 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -480,31 +480,4 @@
 			Price: L$
 	    </text-->
 	</panel>
-    <panel
-		 height="25"
-		 layout="bottomright"
-		 help_topic="button_tab"
-		 name="button_panel"
-		 left="5"
-		 bottom="5"
-		 width="313">
-	    <button
-		     follows="bottom|right"
-		     height="25"
-		     label="Cancel"
-		     layout="topleft"
-		     name="cancel_btn"
-		     right="-1"
-		     top="0"
-		     width="70" />
-	    <button
-		     follows="bottom|right"
-		     height="25"
-		     label="Save"
-		     layout="topleft"
-		     name="save_btn"
-		     left_pad="-135"
-		     top="0"
-		     width="60" />
-	</panel>
 </panel>
-- 
cgit v1.2.3


From 5b1c92ebb04a6d4d70a89a81e6f5c0af77733d51 Mon Sep 17 00:00:00 2001
From: Erica <erica@lindenlab.com>
Date: Fri, 11 Dec 2009 11:24:31 -0800
Subject: EXT-906 Update inventory properties floater with new permissions
 layout

---
 .../skins/default/xui/en/sidepanel_item_info.xml   | 313 +++++++++++----------
 1 file changed, 167 insertions(+), 146 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index db8a844eb0..6f8a1c0dfc 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -6,7 +6,7 @@
 	 name="item properties"
 	 help_topic="item_properties"
 	 save_rect="true"
-	 title="Inventory Item Properties"
+	 title="Object Profile"
 	 width="333">
 	<panel.string
 		 name="unknown">
@@ -39,27 +39,39 @@
 	     top="4"
 	     width="18" />
     <button
-	     follows="top|right"
-	     height="25"
-	     image_overlay="BackArrow_Off"
-	     layout="topleft"
-	     name="back_btn"
-	     picture_style="true"
-	     right="-5"
-	     tab_stop="false"
-	     top="0"
-	     width="25" />
+     follows="top|right"
+     height="23"
+     image_overlay="BackArrow_Off"
+     layout="topleft"
+     left="10"
+     name="back_btn"
+     tab_stop="false"
+     top="0"
+     width="23" />
+    <text
+     follows="top|left|right"
+     font="SansSerifHuge"
+     height="26"
+     layout="topleft"
+     left_pad="10"
+     name="title"
+     text_color="LtGray"
+     top="0"
+     use_ellipses="true"
+     value="Object Profile"
+     width="275" />
 	<panel
          follows="all"
          height="500"
          label=""
          layout="topleft"
-         left="5"
+         left="10"
          help_topic=""
          top="30"
-		 border="1"
-         width="313">
-	    <text	 	 	 
+         width="313"
+   background_visible="true"
+   bg_alpha_color="DkGray2">
+	    <text
 		     type="string"
 		     length="1"
 		     follows="left|top"
@@ -67,7 +79,7 @@
 		     layout="topleft"
 		     left="5"
 		     name="LabelItemNameTitle"
-		     top="5"
+		     top="10"
 		     width="78">
 	        Name:
 	    </text>
@@ -75,7 +87,7 @@
 		     border_style="line"
 		     border_thickness="1"
 	    	 follows="left|top|right"
-		     height="16"
+		     height="20"
 		     layout="topleft"
 	    	 left_delta="78"
 		     max_length="63"
@@ -90,7 +102,7 @@
 		     layout="topleft"
     		 left="5"
 		     name="LabelItemDescTitle"
-    		 top_delta="20"
+    		 top_pad="10"
 	    	 width="78">
 	        Description:
 	    </text>
@@ -98,88 +110,106 @@
 		     border_style="line"
     		 border_thickness="1"
 	    	 follows="left|top|right"
-	    	 height="16"
+	    	 height="23"
 		     layout="topleft"
     		 left_delta="78"
 		     max_length="127"
     		 name="LabelItemDesc"
-	    	 top_delta="0"
+	    	 top_delta="-5"
 	    	 width="225" />
 	    <text
 		     type="string"
 		     length="1"
 		     follows="left|top"
-		     height="16"
+		     height="23"
 		     layout="topleft"
-		     left="10"
+    		 left="5"
 		     name="LabelCreatorTitle"
-		     top="65"
+top_pad="10"
 		     width="78">
 	        Creator:
     	</text>
+	        <avatar_icon
+     follows="top|left"
+     height="20"
+     default_icon_name="Generic_Person"
+     layout="topleft"
+     left_pad="0"
+		     top_delta="-6"
+     mouse_opaque="true"
+     width="20" />
 	    <text
 		     type="string"
-		     length="1"
-		     follows="left|top"
-		     height="16"
-		     layout="topleft"
-		     left_delta="78"
+     follows="left|right"
+     font="SansSerifSmall"
+     height="15"
+     layout="topleft"
+     left_pad="5"
 		     name="LabelCreatorName"
-		     top_delta="0"
+		     top_delta="6"
 		     width="140">
 	        Nicole Linden
 	     </text>
 	     <button
 			 follows="top|right"
-			 height="16"
-			 label="Profile..."
+			 height="23"
+			 label="Profile"
 			 layout="topleft"
-			 left_delta="144"
+			 right="-1"
 			 name="BtnCreator"
-			 top_delta="0"
+			 top_delta="-6"
 			 width="78" />
 	     <text
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="16"
+			 height="23"
 			 layout="topleft"
-			 left="10"
+    		 left="5"
 			 name="LabelOwnerTitle"
-			 top="85"
+top_pad="5"
 			 width="78">
 			    Owner:
 	     </text>
+	     <avatar_icon
+     follows="top|left"
+     height="20"
+     default_icon_name="Generic_Person"
+     layout="topleft"
+     left_pad="0"
+		     top_delta="-6"
+     mouse_opaque="true"
+     width="20" />
 	     <text
 			 type="string"
-			 length="1"
-			 follows="left|top"
-			 height="16"
-			 layout="topleft"
-			 left_delta="78"
+     follows="left|right"
+     font="SansSerifSmall"
+     height="15"
+     layout="topleft"
+     left_pad="5"
 			 name="LabelOwnerName"
-			 top_delta="0"
+			 top_delta="6"
 			 width="140">
 			    Thrax Linden
 	     </text>
 	     <button
 			 follows="top|right"
-			 height="16"
-			 label="Profile..."
+			 height="23"
+			 label="Profile"
 			 layout="topleft"
-			 left_delta="144"
+			 right="-1"
 			 name="BtnOwner"
-			 top_delta="0"
+			 top_delta="-3"
 			 width="78" />
 	     <text
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="16"
+			 height="23"
 			 layout="topleft"
-			 left="10"
+    		 left="5"
 			 name="LabelAcquiredTitle"
-			 top="105"
+top_pad="10"
 			 width="78">
 			Acquired:
 	     </text>
@@ -187,7 +217,7 @@
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="16"
+			 height="23"
 			 layout="topleft"
 			 left_delta="78"
 			 name="LabelAcquiredDate"
@@ -195,134 +225,146 @@
 			 width="222">
 			Wed May 24 12:50:46 2006
 	    </text>
-	    <text
-			 type="string"
-			 length="1"
-			 follows="left|top"
-			 height="10"
-			 layout="topleft"
-			 left="10"
-			 name="OwnerLabel"
-			 top="125"
-			 width="78">
-			You:
-	    </text>
+	 <panel
+         border="false"
+         follows="left|top"
+         layout="topleft"
+         mouse_opaque="false"
+         background_visible="true"
+         bg_alpha_color="DkGray"
+         name="perms_inv"
+         left="0"
+         top_pad="25"
+         height="155"
+         width="313">
+	  <text
+             type="string"
+             length="1"
+             left="10"
+             top_pad="13"
+             text_color="EmphasisColor"
+	     height="15"
+             follows="left|top|right"
+             layout="topleft"
+             name="perm_modify"
+             width="200">
+                You can:
+            </text>
 	    <check_box
-			 height="16"
-			 label="Edit"
+			 height="18"
+			 label="Modify"
 			 layout="topleft"
-			 left_pad="5"
+			 left="20"
 			 name="CheckOwnerModify"
-			 top_delta="0"
-			 width="78" />
+			 top_pad="0"
+			 width="90" />
 	    <check_box
-			 height="16"
+			 height="18"
 			 label="Copy"
 			 layout="topleft"
-			 left_delta="0"
+			 left_pad="0"
 			 name="CheckOwnerCopy"
-			 top_pad="5"
-			 width="88" />
+			 width="90" />
 	    <check_box
-			 height="16"
-			 label="Resell"
+			 height="18"
+			 label="Transfer"
 			 layout="topleft"
-			 left_delta="0"
+			 left_pad="0"
 			 name="CheckOwnerTransfer"
-			 top_pad="5"
 			 width="106" />
 	    <text
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="10"
+			 height="16"
 			 layout="topleft"
 			 left="10"
 			 name="AnyoneLabel"
-			 top_pad="5"
-			 width="78">
+			 top_pad="8"
+			 width="100">
 			Anyone:
 	    </text>
 	    <check_box
-			 height="16"
+			 height="18"
 			 label="Copy"
 			 layout="topleft"
-			 left_pad="5"
+			 left_pad="0"
 			 name="CheckEveryoneCopy"
-			 top_delta="0"
-			 width="130" />
+			 top_delta="-2"
+			 width="150" />
     	<text
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="10"
+			 height="16"
 			 layout="topleft"
 			 left="10"
 			 name="GroupLabel"
-			 top_pad="5"
-			 width="78">
+			 top_pad="8"
+			 width="100">
 			Group:
     	</text>
 	    <check_box
-			 height="16"
+			 height="18"
 			 label="Share"
 			 layout="topleft"
-			 left_pad="5"
+			 left_pad="0"
+			 top_delta="-2"
 			 name="CheckShareWithGroup"
-			 top_delta="5"
-			 width="106" />
+			 tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+			 width="150" />
 	    <text
 			 type="string"
 			 length="1"
 			 follows="left|top"
-			 height="25"
+			 height="16"
 			 layout="topleft"
 			 left="10"
 			 name="NextOwnerLabel"
-			 top_pad="5"
-			 width="78"
+			 top_pad="8"
+			 width="200"
 			 word_wrap="true">
 			Next owner:
 	    </text>
 	    <check_box
-			 height="16"
-			 label="Edit"
+			 height="18"
+			 label="Modify"
 			 layout="topleft"
-			 left_pad="5"
+			 left="20"
+			 top_pad="0"
 			 name="CheckNextOwnerModify"
-			 top_delta="0"
-			 width="78" />
+			 width="90" />
 	    <check_box
-			 height="16"
+			 height="18"
 			 label="Copy"
 			 layout="topleft"
-			 left_delta="0"
+			 left_pad="0"
 			 name="CheckNextOwnerCopy"
-			 top_pad="5"
-			 width="88" />
+			 width="90" />
 	    <check_box
-			 height="16"
-			 label="Resell"
+			 height="18"
+			 label="Transfer"
 			 layout="topleft"
-			 left_delta="0"
+			 left_pad="0"
 			 name="CheckNextOwnerTransfer"
-			 top_pad="5"
+			 tool_tip="Next owner can give away or resell this object"
 			 width="106" />
+	    </panel>
 	    <check_box
-			 height="16"
+			 height="18"
 			 label="For Sale"
 			 layout="topleft"
-			 left="10"
+			 left="20"
 			 name="CheckPurchase"
-			 top_pad="5"
-			 width="78" />
+			 top_pad="20"
+			 width="100" />
 		<combo_box
-			 height="19"
-			 left_pad="5"
+			 height="23"
+			 left_pad="0"
 			 layout="topleft"
 			 follows="left|top"
 			 name="combobox sale copy"
-			 width="110">
+			 width="170">
 			<combo_box.item
 			     label="Copy"
 			     name="Copy"
@@ -338,26 +380,14 @@
 			    increment="1"
 			    control_name="Edit Cost"
 			    name="Edit Cost"
-			    label="Price:"
-			    label_width="100"
-			    left="10"
-			    width="192"
+			    label="Price: L$"
+			    label_width="75"
+			    left="120"
+			    width="170"
 			    min_val="1"
-			    height="19"
+			    height="23"
 			    max_val="999999999"
-			    top_pad="5"/>
-	    <text
-			    type="string"
-			    length="1"
-			    height="15"
-			    follows="left|top"
-			    layout="topleft"
-			    left_delta="82"
-			    name="CurrencySymbol"
-			    top_delta="1"
-			    width="18">
-			L$
-	    </text>
+			    top_pad="10"/>
 	    <!--line_editor
 			 border_style="line"
 			 border_thickness="1"
@@ -489,14 +519,14 @@
 		 bottom="5"
 		 width="313">
 	    <button
-		     follows="bottom|left"
+		     follows="bottom|right"
 		     height="25"
-		     label="Edit"
+		     label="Save"
 		     layout="topleft"
-		     left="0"
-		     name="edit_btn"
+		     name="save_btn"
 		     top="0"
-		     width="50" />
+		     right="-110"
+		     width="100" />
 	    <button
 		     follows="bottom|right"
 		     height="25"
@@ -504,16 +534,7 @@
 		     layout="topleft"
 		     name="cancel_btn"
 		     right="-1"
-		     top="0"
-		     width="70" />
-	    <button
-		     follows="bottom|right"
-		     height="25"
-		     label="Save"
-		     layout="topleft"
-		     name="save_btn"
-		     left_pad="-135"
-		     top="0"
-		     width="60" />
+		     left_pad="10"
+		     width="100" />
 	</panel>
 </panel>
-- 
cgit v1.2.3


From d2b72fe0184fb92f4a79eebd242825fbcc5f32e9 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Fri, 11 Dec 2009 15:57:41 -0500
Subject: EXT-3373 : Favorites folder disappears after canceling filter

Doing a more robust check to see if folders need to be refreshed.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderview.cpp      | 11 ++++++++---
 indra/newview/llfolderviewitem.cpp  | 27 ++++++++++++++-------------
 indra/newview/llfolderviewitem.h    | 13 ++++++++-----
 indra/newview/llinventoryfilter.cpp | 32 ++++++++++++++++----------------
 indra/newview/llpanellandmarks.cpp  | 19 +++++++++++++++----
 5 files changed, 61 insertions(+), 41 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 1c5d7ae9b9..321982ceb6 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -411,7 +411,12 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
 			folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders?
 									(folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
 		}
-		if (folderp->getVisible())
+
+		// Need to call arrange regardless of visibility, since children's visibility
+		// might need to be changed too (e.g. even though a folder is invisible, its
+		// children also need to be set invisible for state-tracking purposes, e.g.
+		// llfolderviewitem::filter).
+		// if (folderp->getVisible())
 		{
 			S32 child_height = 0;
 			S32 child_width = 0;
@@ -479,13 +484,13 @@ void LLFolderView::filter( LLInventoryFilter& filter )
 
 	if (getCompletedFilterGeneration() < filter.getCurrentGeneration())
 	{
-		mFiltered = FALSE;
+		mPassedFilter = FALSE;
 		mMinWidth = 0;
 		LLFolderViewFolder::filter(filter);
 	}
 	else
 	{
-		mFiltered = TRUE;
+		mPassedFilter = TRUE;
 	}
 }
 
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 5bef306485..220fd75191 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -121,7 +121,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
 	mHasVisibleChildren(FALSE),
 	mIndentation(0),
 	mNumDescendantsSelected(0),
-	mFiltered(FALSE),
+	mPassedFilter(FALSE),
 	mLastFilterGeneration(-1),
 	mStringMatchOffset(std::string::npos),
 	mControlLabelRotation(0.f),
@@ -223,17 +223,17 @@ BOOL LLFolderViewItem::potentiallyVisible()
 
 BOOL LLFolderViewItem::getFiltered() 
 { 
-	return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); 
+	return mPassedFilter && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration(); 
 }
 
 BOOL LLFolderViewItem::getFiltered(S32 filter_generation) 
 {
-	return mFiltered && mLastFilterGeneration >= filter_generation;
+	return mPassedFilter && mLastFilterGeneration >= filter_generation;
 }
 
 void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation)
 {
-	mFiltered = filtered;
+	mPassedFilter = filtered;
 	mLastFilterGeneration = filter_generation;
 }
 
@@ -423,19 +423,20 @@ S32 LLFolderViewItem::getItemHeight()
 
 void LLFolderViewItem::filter( LLInventoryFilter& filter)
 {
-	BOOL filtered = mListener && filter.check(this);
+	const BOOL previous_passed_filter = mPassedFilter;
+	const BOOL passed_filter = mListener && filter.check(this);
 
-	// if our visibility will change as a result of this filter, then
+	// If our visibility will change as a result of this filter, then
 	// we need to be rearranged in our parent folder
-	if (getVisible() != filtered)
+	if (mParentFolder)
 	{
-		if (mParentFolder)
-		{
+		if (getVisible() != passed_filter)
+			mParentFolder->requestArrange();
+		if (passed_filter != previous_passed_filter)
 			mParentFolder->requestArrange();
-		}
 	}
 
-	setFiltered(filtered, filter.getCurrentGeneration());
+	setFiltered(passed_filter, filter.getCurrentGeneration());
 	mStringMatchOffset = filter.getStringMatchOffset();
 	filter.decrementFilterCount();
 
@@ -1237,7 +1238,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter)
 	if (getLastFilterGeneration() < filter_generation)
 	{
 		if (getLastFilterGeneration() >= must_pass_generation &&		// folder has been compared to a valid precursor filter
-			!mFiltered)													// and did not pass the filter
+			!mPassedFilter)													// and did not pass the filter
 		{
 			// go ahead and flag this folder as done
 			mLastFilterGeneration = filter_generation;			
@@ -1375,7 +1376,7 @@ void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
 {
 	// if this folder is now filtered, but wasn't before
 	// (it just passed)
-	if (filtered && !mFiltered)
+	if (filtered && !mPassedFilter)
 	{
 		// reset current height, because last time we drew it
 		// it might have had more visible items than now
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 0ea031108b..24c401ec49 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -120,6 +120,9 @@ public:
 	static const F32 FOLDER_CLOSE_TIME_CONSTANT;
 	static const F32 FOLDER_OPEN_TIME_CONSTANT;
 
+	// Mostly for debugging printout purposes.
+	const std::string& getSearchableLabel() { return mSearchableLabel; }
+
 protected:
 	friend class LLUICtrlFactory;
 	friend class LLFolderViewEventListener;
@@ -148,7 +151,7 @@ protected:
 	BOOL						mHasVisibleChildren;
 	S32							mIndentation;
 	S32							mNumDescendantsSelected;
-	BOOL						mFiltered;
+	BOOL						mPassedFilter;
 	S32							mLastFilterGeneration;
 	std::string::size_type		mStringMatchOffset;
 	F32							mControlLabelRotation;
@@ -156,8 +159,8 @@ protected:
 	BOOL						mDragAndDropTarget;
 	LLUIImagePtr				mArrowImage;
 	LLUIImagePtr				mBoxImage;
-	BOOL                            mIsLoading;
-	LLTimer                         mTimeSinceRequestStart;
+	BOOL                        mIsLoading;
+	LLTimer                     mTimeSinceRequestStart;
 	bool						mDontShowInHierarchy;
 
 	// helper function to change the selection from the root.
@@ -202,7 +205,7 @@ public:
 	virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
 	virtual S32 getItemHeight();
 	void setDontShowInHierarchy(bool dont_show) { mDontShowInHierarchy = dont_show; }
-	bool getDontShowInHierarchy() { return mDontShowInHierarchy; }
+	bool getDontShowInHierarchy() const { return mDontShowInHierarchy; }
 
 	// applies filters to control visibility of inventory items
 	virtual void filter( LLInventoryFilter& filter);
@@ -328,7 +331,7 @@ public:
 		EAcceptance* accept,
 		std::string& tooltip_msg);
 
- private:
+private:
 	static std::map<U8, LLFontGL*> sFonts; // map of styles to fonts
 };
 
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 81b10f5a62..522edd0cb5 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -40,6 +40,7 @@
 #include "llinventorymodel.h"	// gInventory.backgroundFetchActive()
 #include "llviewercontrol.h"
 #include "llviewerinventory.h"
+#include "llfolderview.h"
 
 // linden library includes
 #include "lltrans.h"
@@ -329,7 +330,6 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
 		mFilterSubString = string;
 		LLStringUtil::toUpper(mFilterSubString);
 		LLStringUtil::trimHead(mFilterSubString);
-
 		if (less_restrictive)
 		{
 			setModified(FILTER_LESS_RESTRICTIVE);
@@ -512,21 +512,21 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
 		// if not keeping current filter results, update last valid as well
 		switch(mFilterBehavior)
 		{
-		case FILTER_RESTART:
-			mMustPassGeneration = mFilterGeneration;
-			mMinRequiredGeneration = mFilterGeneration;
-			break;
-		case FILTER_LESS_RESTRICTIVE:
-			mMustPassGeneration = mFilterGeneration;
-			break;
-		case FILTER_MORE_RESTRICTIVE:
-			mMinRequiredGeneration = mFilterGeneration;
-			// must have passed either current filter generation (meaningless, as it hasn't been run yet)
-			// or some older generation, so keep the value
-			mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
-			break;
-		default:
-			llerrs << "Bad filter behavior specified" << llendl;
+			case FILTER_RESTART:
+				mMustPassGeneration = mFilterGeneration;
+				mMinRequiredGeneration = mFilterGeneration;
+				break;
+			case FILTER_LESS_RESTRICTIVE:
+				mMustPassGeneration = mFilterGeneration;
+				break;
+			case FILTER_MORE_RESTRICTIVE:
+				mMinRequiredGeneration = mFilterGeneration;
+				// must have passed either current filter generation (meaningless, as it hasn't been run yet)
+				// or some older generation, so keep the value
+				mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
+				break;
+			default:
+				llerrs << "Bad filter behavior specified" << llendl;
 		}
 	}
 	else
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index c85fab2092..4b5ff1732d 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -328,6 +328,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel()
 
 	initLandmarksPanel(mFavoritesInventoryPanel);
 	mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems");
+
 	initAccordion("tab_favorites", mFavoritesInventoryPanel);
 }
 
@@ -389,6 +390,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis
 	}
 
 	root_folder->setParentLandmarksPanel(this);
+	inventory_list->saveFolderState();
 }
 
 void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list)
@@ -991,21 +993,30 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark)
 //////////////////////////////////////////////////////////////////////////
 static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string)
 {
-	// Open the immediate children of the root folder, since those
-	// are invisible in the UI and thus must always be open.
-	inventory_list->getRootFolder()->openTopLevelFolders();
-
+	// When search is cleared, restore the old folder state.
 	if (string == "")
 	{
 		inventory_list->setFilterSubString(LLStringUtil::null);
+		// Re-open folders that were open before
+		inventory_list->restoreFolderState();
 	}
 
+	// Open the immediate children of the root folder, since those
+	// are invisible in the UI and thus must always be open.
+	inventory_list->getRootFolder()->openTopLevelFolders();
+
 	if (inventory_list->getFilterSubString().empty() && string.empty())
 	{
 		// current filter and new filter empty, do nothing
 		return;
 	}
 
+	// save current folder open state if no filter currently applied
+	if (inventory_list->getRootFolder()->getFilterSubString().empty())
+	{
+		inventory_list->saveFolderState();
+	}
+
 	// Set new filter string
 	inventory_list->setFilterSubString(string);
 
-- 
cgit v1.2.3


From ae8c1d1ea87b524797b2986f853745c0a124246c Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 11 Dec 2009 18:49:29 -0500
Subject: For EXT-3264: Missing separators in inventory context menus - restore

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp                |  4 +--
 .../skins/default/xui/en/menu_inventory.xml        | 33 +++++++++++++++-------
 2 files changed, 25 insertions(+), 12 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0ec019c4f9..4abe93322a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2506,8 +2506,8 @@ void LLFolderBridge::folderOptionsMenu()
 			mItems.push_back(std::string("Wear As Ensemble"));
 		}
 		mItems.push_back(std::string("Remove From Outfit"));
-		if (is_sidepanel)
-			mItems.push_back(std::string("Outfit Separator"));
+
+		mItems.push_back(std::string("Outfit Separator"));
 	}
 	hide_context_entries(*mMenu, mItems, disabled_items);
 
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 660e3858ac..06da622553 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -339,6 +339,9 @@
          function="Inventory.DoToSelected"
          parameter="open" />
     </menu_item_call>
+    <menu_item_separator
+     layout="topleft"
+     name="Folder Wearables Separator" />
     <menu_item_call
      label="Replace Current Outfit"
      layout="topleft"
@@ -359,13 +362,13 @@
      label="Remove From Current Outfit"
      layout="topleft"
      name="Remove From Outfit">
+    <menu_item_separator
+     layout="topleft"
+     name="Outfit Separator" />
         <menu_item_call.on_click
          function="Inventory.DoToSelected"
          parameter="removefromoutfit" />
     </menu_item_call>
-    <menu_item_separator
-     layout="topleft"
-     name="Outfit Separator" />
     <menu_item_call
      label="Purge Item"
      layout="topleft"
@@ -423,7 +426,8 @@
          parameter="copy_uuid" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Copy Separator" />
     <menu_item_call
      label="Copy"
      layout="topleft"
@@ -449,7 +453,8 @@
          parameter="paste_link" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Paste Separator" />
     <menu_item_call
      label="Remove Link"
      layout="topleft"
@@ -500,7 +505,8 @@
          parameter="about" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Animation Separator" />
     <menu_item_call
      label="Play in World"
      layout="topleft"
@@ -518,7 +524,8 @@
          parameter="playlocal" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Send Instant Message Separator" />
     <menu_item_call
      label="Send Instant Message"
      layout="topleft"
@@ -544,7 +551,8 @@
          parameter="selected" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Gesture Separator" />
     <menu_item_call
      label="Activate"
      layout="topleft"
@@ -562,7 +570,8 @@
          parameter="deactivate" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Texture Separator" />
     <menu_item_call
      label="Save As"
      layout="topleft"
@@ -572,7 +581,8 @@
          parameter="save_as" />
     </menu_item_call>
     <menu_item_separator
-     layout="topleft" />
+     layout="topleft" 
+     name="Attach Separator"/>
     <menu_item_call
      label="Detach From Yourself"
      layout="topleft"
@@ -608,6 +618,9 @@
      label="Attach To HUD"
      layout="topleft"
      name="Attach To HUD" />
+    <menu_item_separator
+     layout="topleft" 
+     name="Wearable Separator"/>
     <menu_item_call
      label="Edit"
      layout="topleft"
-- 
cgit v1.2.3


From 88b73b1146e39cc9fe150fe82870c811545a507a Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 14 Dec 2009 09:34:42 -0500
Subject: For EXT-3264: Missing separators in inventory context menus - restore

--HG--
branch : avatar-pipeline
---
 indra/newview/skins/default/xui/en/menu_inventory.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 06da622553..0f400777b8 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -362,13 +362,13 @@
      label="Remove From Current Outfit"
      layout="topleft"
      name="Remove From Outfit">
-    <menu_item_separator
-     layout="topleft"
-     name="Outfit Separator" />
         <menu_item_call.on_click
          function="Inventory.DoToSelected"
          parameter="removefromoutfit" />
     </menu_item_call>
+    <menu_item_separator
+     layout="topleft"
+     name="Outfit Separator" />
     <menu_item_call
      label="Purge Item"
      layout="topleft"
-- 
cgit v1.2.3