From bc07bc526cd9492e488380edcc5a6db102fad2d9 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Mon, 31 Aug 2020 21:27:37 +0300
Subject: [PATCH] SL-13852 Add visibility options to inventory search results

---
 indra/llui/lllineeditor.h                     |   3 +
 indra/llui/llsearcheditor.cpp                 |  22 ++++-
 indra/llui/llsearcheditor.h                   |  20 ++++-
 indra/newview/llfolderviewmodelinventory.h    |   1 +
 indra/newview/llinventoryfilter.cpp           |  85 +++++++++++++++++-
 indra/newview/llinventoryfilter.h             |  17 +++-
 indra/newview/llpanelmaininventory.cpp        |  35 ++++++++
 indra/newview/llpanelmaininventory.h          |   2 +
 .../icons/Inv_Toolbar_SearchVisibility.png    | Bin 0 -> 756 bytes
 .../skins/default/textures/textures.xml       |   3 +
 .../widgets/TextField_Search_Highlight.png    | Bin 0 -> 16287 bytes
 .../en/menu_inventory_search_visibility.xml   |  44 +++++++++
 .../default/xui/en/panel_main_inventory.xml   |  40 +++++----
 .../default/xui/en/widgets/filter_editor.xml  |   4 +-
 .../default/xui/en/widgets/search_editor.xml  |   4 +-
 15 files changed, 258 insertions(+), 22 deletions(-)
 create mode 100644 indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
 create mode 100644 indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
 create mode 100644 indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml

diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index aa5779d45f6..f84625bea7a 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -283,6 +283,9 @@ class LLLineEditor
 
 	void			resetContextMenu() { setContextMenu(NULL); };
 
+	void			setBgImage(LLPointer<LLUIImage> image) { mBgImage = image; }
+	void			setBgImageFocused(LLPointer<LLUIImage> image) { mBgImageFocused = image; }
+
 private:
 	// private helper methods
 
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 1fdd05a11ca..bafeef41fb5 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -34,7 +34,11 @@
 LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
 :	LLUICtrl(p),
 	mSearchButton(NULL),
-	mClearButton(NULL)
+	mClearButton(NULL),
+	mEditorImage(p.background_image),
+	mEditorImageFocused(p.background_image_focused),
+	mEditorSearchImage(p.background_image_highlight),
+	mHighlightTextField(p.highlight_text_field)
 {
 	S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height;
 	S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad;
@@ -57,6 +61,8 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
 	// Set up line editor.
 	LLLineEditor::Params line_editor_params(p);
 	line_editor_params.name("filter edit box");
+	line_editor_params.background_image(p.background_image);
+	line_editor_params.background_image_focused(p.background_image_focused);
 	line_editor_params.rect(getLocalRect());
 	line_editor_params.follows.flags(FOLLOWS_ALL);
 	line_editor_params.text_pad_left(text_pad_left);
@@ -104,6 +110,20 @@ void LLSearchEditor::draw()
 	if (mClearButton)
 		mClearButton->setVisible(!mSearchEditor->getWText().empty());
 
+	if (mHighlightTextField)
+	{	
+		if (!mSearchEditor->getWText().empty())
+		{
+			mSearchEditor->setBgImage(mEditorSearchImage);
+			mSearchEditor->setBgImageFocused(mEditorSearchImage);
+		}
+		else
+		{
+			mSearchEditor->setBgImage(mEditorImage);
+			mSearchEditor->setBgImageFocused(mEditorImageFocused);
+		}
+	}
+
 	LLUICtrl::draw();
 }
 
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
index 3b128682256..c0f3c1d60cb 100644
--- a/indra/llui/llsearcheditor.h
+++ b/indra/llui/llsearcheditor.h
@@ -47,14 +47,23 @@ class LLSearchEditor : public LLUICtrl
 		Optional<LLButton::Params>	search_button, 
 									clear_button;
 		Optional<bool>				search_button_visible, 
-									clear_button_visible;
+									clear_button_visible,
+									highlight_text_field;
 		Optional<commit_callback_t> keystroke_callback;
 
+		Optional<LLUIImage*>		background_image,
+									background_image_focused,
+									background_image_highlight;
+
 		Params()
 		:	search_button("search_button"),
 			search_button_visible("search_button_visible"),
 			clear_button("clear_button"), 
-			clear_button_visible("clear_button_visible")
+			clear_button_visible("clear_button_visible"),
+			highlight_text_field("highlight_text_field"),
+			background_image("background_image"),
+			background_image_focused("background_image_focused"),
+			background_image_highlight("background_image_highlight")
 		{}
 	};
 
@@ -93,6 +102,13 @@ class LLSearchEditor : public LLUICtrl
 	LLLineEditor* mSearchEditor;
 	LLButton* mSearchButton;
 	LLButton* mClearButton;
+
+	LLPointer<LLUIImage> mEditorImage;
+	LLPointer<LLUIImage> mEditorImageFocused;
+	LLPointer<LLUIImage> mEditorSearchImage;
+	LLPointer<LLUIImage> mEditorSearchImageFocused;
+
+	bool mHighlightTextField;
 };
 
 #endif  // LL_SEARCHEDITOR_H
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 06a908cccc8..51b98339c42 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -45,6 +45,7 @@ class LLFolderViewModelItemInventory
 	virtual LLFolderType::EType getPreferredType() const = 0;
 	virtual void showProperties(void) = 0;
 	virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make   into pure virtual.
+	virtual BOOL isAgentInventory() const { return FALSE; }
 	virtual BOOL isUpToDate() const = 0;
 	virtual bool hasChildren() const = 0;
 	virtual LLInventoryType::EType getInventoryType() const = 0;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 8f18de0210e..1b99c90d5cc 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -63,7 +63,8 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p)
 	mPermissions(p.permissions),
 	mFilterTypes(p.types),
 	mFilterUUID(p.uuid),
-	mFilterLinks(p.links)
+	mFilterLinks(p.links),
+	mSearchVisibility(0xffffFFFFffffFFFFULL)
 {
 }
 
@@ -154,6 +155,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
 	passed = passed && checkAgainstPermissions(listener);
 	passed = passed && checkAgainstFilterLinks(listener);
 	passed = passed && checkAgainstCreator(listener);
+	passed = passed && checkAgainstSearchVisibility(listener);
 
 	return passed;
 }
@@ -550,6 +552,27 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory
 	}
 }
 
+bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const
+{
+	if (!listener || !hasFilterString()) return TRUE;
+
+	const LLUUID object_id = listener->getUUID();
+	const LLInventoryObject *object = gInventory.getObject(object_id);
+	if (!object) return TRUE;
+
+	const BOOL is_link = object->getIsLinkType();
+	if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0))
+		return FALSE;
+
+	if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0))
+		return FALSE;
+
+	if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0))
+		return FALSE;
+
+	return TRUE;
+}
+
 const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
 {
 	return mFilterSubString;
@@ -718,6 +741,61 @@ void LLInventoryFilter::setFilterMarketplaceListingFolders(bool select_only_list
     }
 }
 
+
+void LLInventoryFilter::toggleSearchVisibilityLinks()
+{
+	bool hide_links = mFilterOps.mSearchVisibility & VISIBILITY_LINKS;
+	if (hide_links)
+	{
+		mFilterOps.mSearchVisibility &= ~VISIBILITY_LINKS;
+	}
+	else
+	{
+		mFilterOps.mSearchVisibility |= VISIBILITY_LINKS;
+	}
+
+	if (hasFilterString())
+	{
+		setModified(hide_links ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+	}
+}
+
+void LLInventoryFilter::toggleSearchVisibilityTrash()
+{
+	bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH;
+	if (hide_trash)
+	{
+		mFilterOps.mSearchVisibility &= ~VISIBILITY_TRASH;
+	}
+	else
+	{
+		mFilterOps.mSearchVisibility |= VISIBILITY_TRASH;
+	}
+
+	if (hasFilterString())
+	{
+		setModified(hide_trash ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+	}
+}
+
+void LLInventoryFilter::toggleSearchVisibilityLibrary()
+{
+	bool hide_library = mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY;
+	if (hide_library)
+	{
+		mFilterOps.mSearchVisibility &= ~VISIBILITY_LIBRARY;
+	}
+	else
+	{
+		mFilterOps.mSearchVisibility |= VISIBILITY_LIBRARY;
+	}
+
+	if (hasFilterString())
+	{
+		setModified(hide_library ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE);
+	}
+}
+
 void LLInventoryFilter::setFilterNoMarketplaceFolder()
 {
     mFilterOps.mFilterTypes |= FILTERTYPE_NO_MARKETPLACE_ITEMS;
@@ -1349,6 +1427,11 @@ U64 LLInventoryFilter::getFilterSettingsTypes() const
     return mFilterOps.mFilterSettingsTypes;
 }
 
+U64 LLInventoryFilter::getSearchVisibilityTypes() const
+{
+	return mFilterOps.mSearchVisibility;
+}
+
 bool LLInventoryFilter::hasFilterString() const
 {
 	return mFilterSubString.size() > 0;
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index be02ee3623b..caba8315c4a 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -99,6 +99,14 @@ class LLInventoryFilter : public LLFolderViewFilter
 		FILTERCREATOR_OTHERS
 	};
 
+	enum ESearchVisibility
+	{
+		VISIBILITY_NONE = 0,
+		VISIBILITY_TRASH = 0x1 << 0,
+		VISIBILITY_LIBRARY = 0x1 << 1,
+		VISIBILITY_LINKS	= 0x1 << 2
+	};
+
 	struct FilterOps
 	{
 		struct DateRange : public LLInitParam::Block<DateRange>
@@ -154,6 +162,7 @@ class LLInventoryFilter : public LLFolderViewFilter
 						mFilterWearableTypes,
                         mFilterSettingsTypes, // for _SETTINGS
 						mFilterLinks,
+						mSearchVisibility,
 						mFilterCategoryTypes; // For _CATEGORY
 		LLUUID      	mFilterUUID; 		  // for UUID
 
@@ -193,7 +202,8 @@ class LLInventoryFilter : public LLFolderViewFilter
 	U64 				getFilterObjectTypes() const;
 	U64					getFilterCategoryTypes() const;
 	U64					getFilterWearableTypes() const;
-    U64                 getFilterSettingsTypes() const;
+	U64					getFilterSettingsTypes() const;
+	U64					getSearchVisibilityTypes() const;
 
 	bool 				isFilterObjectTypesWith(LLInventoryType::EType t) const;
 	void 				setFilterObjectTypes(U64 types);
@@ -213,6 +223,10 @@ class LLInventoryFilter : public LLFolderViewFilter
 	ESearchType			getSearchType() { return mSearchType; }
 	void 				setFilterCreator(EFilterCreatorType type);
 
+	void				toggleSearchVisibilityLinks();
+	void				toggleSearchVisibilityTrash();
+	void				toggleSearchVisibilityLibrary();
+
 	void 				setFilterSubString(const std::string& string);
 	const std::string& 	getFilterSubString(BOOL trim = FALSE) const;
 	const std::string& 	getFilterSubStringOrig() const { return mFilterSubStringOrig; } 
@@ -309,6 +323,7 @@ class LLInventoryFilter : public LLFolderViewFilter
 	bool 				checkAgainstPermissions(const LLInventoryItem* item) const;
 	bool 				checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const;
 	bool 				checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const;
+	bool				checkAgainstSearchVisibility(const class LLFolderViewModelItemInventory* listener) const;
 	bool				checkAgainstClipboard(const LLUUID& object_id) const;
 
 	FilterOps				mFilterOps;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 89682d95761..f845e9b056a 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -115,6 +115,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
 	  mSavedFolderState(NULL),
 	  mFilterText(""),
 	  mMenuGearDefault(NULL),
+	  mMenuVisibility(NULL),
 	  mMenuAddHandle(),
 	  mNeedUploadCost(true)
 {
@@ -238,6 +239,7 @@ BOOL LLPanelMainInventory::postBuild()
 	}
 
 	mGearMenuButton = getChild<LLMenuButton>("options_gear_btn");
+	mVisibilityMenuButton = getChild<LLMenuButton>("options_visibility_btn");
 
 	initListCommandsHandlers();
 
@@ -1174,6 +1176,9 @@ void LLPanelMainInventory::initListCommandsHandlers()
 	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 	mMenuAddHandle = menu->getHandle();
 
+	mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+	mVisibilityMenuButton->setMenu(mMenuVisibility);
+
 	// Update the trash button when selected item(s) get worn or taken off.
 	LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this));
 }
@@ -1363,6 +1368,21 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
 		}
 		LLFloaterReg::showInstance("linkreplace", params);
 	}
+
+	if (command_name == "toggle_search_trash")
+	{
+		mActivePanel->getFilter().toggleSearchVisibilityTrash();
+	}
+
+	if (command_name == "toggle_search_library")
+	{
+		mActivePanel->getFilter().toggleSearchVisibilityLibrary();
+	}
+
+	if (command_name == "include_links")
+	{
+		mActivePanel->getFilter().toggleSearchVisibilityLinks();
+	}		
 }
 
 void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility )
@@ -1508,6 +1528,21 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
 		return sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP;
 	}
 
+	if (command_name == "toggle_search_trash")
+	{
+		return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_TRASH) != 0;
+	}
+
+	if (command_name == "toggle_search_library")
+	{
+		return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LIBRARY) != 0;
+	}
+
+	if (command_name == "include_links")
+	{
+		return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LINKS) != 0;	
+	}	
+
 	return FALSE;
 }
 
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index c0b4a7b6fcf..903b33bdbf7 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -171,7 +171,9 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
 private:
 	LLDragAndDropButton*		mTrashButton;
 	LLToggleableMenu*			mMenuGearDefault;
+	LLToggleableMenu*			mMenuVisibility;
 	LLMenuButton*				mGearMenuButton;
+	LLMenuButton*				mVisibilityMenuButton;
 	LLHandle<LLView>			mMenuAddHandle;
 
 	bool						mNeedUploadCost;
diff --git a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png
new file mode 100644
index 0000000000000000000000000000000000000000..048da25c9286bfb85c8d20be17d81e4d81b3df73
GIT binary patch
literal 756
zcmV<Q0t@|#P)<h;3K|Lk000e1NJLTq000>P000UI1^@s6L96vv0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!mPtfGRCwBAjEszAC@n2zxPALJ!>d=X
z7=HZt!Jw?Htn1+5;4UaADDn2~+vkT5AKnR+zrxDO%Ala20LBw0Okh~BU;zU$fCWS_
zF)=ZG`}U3D`}gk*78Vx1Kpg+~?_c&8FJAl>5D-xJ_V%_ocI?<fAl?E}15!^4U;%0P
z^5qKy7Z(>_c6RnmHa0e{l`B_ve*OCO7?92L=g*%n5)u+NUS3|M`uh4&`}glp1Im42
zWMqUJVr^~xAD0D3j~-=YdHnb>12Z$TbXZu}jPvKu@18bo+9aUC4D;vDUkg;j2E;$&
z;^IQruU~(prlzJKFfedAF!<7+JbCgAW<f?q22Njq<e8F^l3b0Ajb|)dwrs+jIddj)
zaBwgHEn0T+<jKRixw*clPMtc@)z!6tpP!#$!-fqLHg4QF#n8}jW?EXBH`E-)88c>J
zwE!y4$fT{UtpbYBn>TNs6B83-;O6FL;N;}wee>qc4NyY(@ZrNP5fKp~c6N4#PoF+9
zoH=vm1c(g`I#nd|7?&?!j$#3b5A-1<OifHo7*3ox;rRdm|IK^$?6Jzq%3`Rhs?q`R
zU%!4mA4E4dH|qf7gkkmS)fOQB#fujm?d|OufNT`(;o<Rr;lhRgK{T>Bi;9X0!>wDl
z_5;KCOK@;-osyE$1)w+UfXUNWUS8hd>C>kdfGLf!r>Cb`Q&ZCb7?F)Y{uwzrIgH@h
zzI{8Rr>EzC5RH+9MMXs!P6NTackhDT-QDXuJ3BW4gX$g7f|qJ)YK1W|F+xB`T$((2
zaxf1M&o7Ygky97CMOgC*&}9rlLP89{RP}4knl;tx>gwje%;*G+U=d*QzOiG+j(u0I
mTsa9$g<y3c^`roR00RK(5l5;ypK8?r0000<MNUMnLSTXkaAE`i

literal 0
HcmV?d00001

diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 7325d836d28..1302edda7a7 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -333,6 +333,8 @@ with the same filename but different name
   <texture name="Inv_Unknown" file_name="icons/Inv_UnknownObject.png" preload="false" />
   <texture name="Inv_VersionFolderClosed" file_name="icons/Inv_VersionFolderClosed.png" preload="false" />
   <texture name="Inv_VersionFolderOpen" file_name="icons/Inv_VersionFolderOpen.png" preload="false" />
+
+  <texture name="Inv_Toolbar_SearchVisibility" file_name="icons/Inv_Toolbar_SearchVisibility.png" preload="false" />
   
   <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/>
   <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/>
@@ -648,6 +650,7 @@ with the same filename but different name
   <texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
   <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
   <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+  <texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
 
 
   <texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" />
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png
new file mode 100644
index 0000000000000000000000000000000000000000..e3944289c6f865ad4a4f57223bba9bd8ef43219d
GIT binary patch
literal 16287
zcmeI3dsGuw8o&p!RZ&~2wkQV=A?k`P$z<{*LlQKg1tACs3fmQ(OeQcj$;8ZH0t#AR
z)YjtGwV+gc>Uy-RTdZ{}R$CwSSs%N$Dtk@^l*KAOTET9QR8iQOgh#l*th?==Jw0dU
z9GLm;cfaqu^ZV}o?&OcVIyL3x;X$E65CjcROo&g1paAv}3K{$~`~Ta&zkQFr4RI!9
z(-1UtB=;8pRcsm!K`|@Ij4US0l#Jq(U5Z&KGa>cZot!PCi}g4$d_KX5%tS8f(2JWs
zJ1iEF7QJ}3$|N&6<A^*mq0mLlEKJG33+Llni#XO0r1PMx13STBB9GnXpiz%r?DdPX
z&s;Ms7J0ic^Y!8>TtHElDOD6lxd@R;s*>O`IU>?%rHD$YMUW_wT!tuML<Y;X5(Gh&
z8Wd5BIxevxh<(zzELJo<ep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GB)xOVT%s38&6$Jl!rF{!rddo*#xUalo>U3{gzCjUnwJR)<=(1>AY<t>px
z#+@a^#zn@#%Uc&8`re3XX1pDot`AyS_xbt8nj3qfVhi8Xyq7k9MaJ3(N&Cu)?Be5@
znRD73{v2NX+q&Ju-dGvj@=D$AH4M5rEi-@fodbt9p1tnKdHw2vdzPA{Tfq&kkcNGZ
zZ(aM}J+O;%K~>vHcf-A(PMlr6DCw0L!}QmK%OBott={I*6{lVNBnGn0dUfE=F=1iD
zh`)TZc2!A9$xZh>W9{|RRUzdgTgq-UHeP$<kB=&*Z)=0*(d=}oOWBs*viytsy;)HU
z@7F%KGyB$NDB^CxjaYZv!)mroJ$hJ965Azz&c4^u!zb?_5f%2#o2yr^UKKC?T6)$s
zm!hbNnaiI0q20B6MAYV#+#eo1GLIjzKSr-Vxb4n??24v&gOa9<J+&jCeoT1yvr?&4
z&5rBXDr{i##UIO4q>*Ohiy@7*ql}}A4=;H+ZT+dDqM{{#J$KGFAhLe)M_1<$Jrbbu
zR6|kkOnY$qJlDA*@cqF@UVN+kr?tlOhuIVN?d^fkw(&U^Hk`O`<&MxNPECp5Wt_L{
EUr1<A5dZ)H

literal 0
HcmV?d00001

diff --git a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
new file mode 100644
index 00000000000..46193f4a7a9
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ bottom="806"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="menu_search_visibility"
+ visible="false">
+  <menu_item_check
+   label="Search Trash"
+   layout="topleft"
+   name="search_trash">
+    <on_click
+     function="Inventory.GearDefault.Custom.Action"
+     parameter="toggle_search_trash" />
+    <on_check
+     function="Inventory.GearDefault.Check"
+     parameter="toggle_search_trash" />
+  </menu_item_check>
+  <menu_item_check
+   label="Search Library"
+   layout="topleft"
+   name="search_library">
+    <on_click
+     function="Inventory.GearDefault.Custom.Action"
+     parameter="toggle_search_library" />
+    <on_check
+     function="Inventory.GearDefault.Check"
+     parameter="toggle_search_library" />
+  </menu_item_check>
+  <menu_item_separator
+   layout="topleft" />
+  <menu_item_check
+   label="Include links"
+   layout="topleft"
+   name="include_links">
+    <on_click
+     function="Inventory.GearDefault.Custom.Action"
+     parameter="include_links" />
+    <on_check
+     function="Inventory.GearDefault.Check"
+     parameter="include_links" />         
+  </menu_item_check>    
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 2745b9d3021..7bd5c9b548e 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -32,30 +32,20 @@
     		 left="12"
 		     name="ItemcountText"
 		     font="SansSerifMedium"
-		     text_color="EmphasisColor"
+		     text_color="InventoryItemLinkColor"
 		     use_ellipses="true"
 		     top_pad="0"
 		     width="300">
     Items:
   </text>
-  <filter_editor
-   text_pad_left="10"
-   follows="left|top|right"
+  <combo_box
    height="23"
-   label="Enter search text"
    layout="topleft"
    left="10"
-   max_length_chars="300"
-   name="inventory search editor"
    top="18"
-   width="208" />
-  <combo_box
-   height="23"
-   layout="topleft"
-   left_pad="4"
    name="search_type"
-   follows="top|right"
-   width="90">
+   follows="top|left"
+   width="88">
     <item
      label="Name"
      name="Name"
@@ -72,7 +62,27 @@
      label="UUID"
      name="UUID"
      value="search_by_UUID"/>
-    </combo_box>
+  </combo_box>
+  <menu_button
+   follows="top|left"
+   tool_tip="Show search visibility options"
+   height="23"
+   image_overlay="Inv_Toolbar_SearchVisibility"
+   layout="topleft"
+   left_pad="3"
+   name="options_visibility_btn"
+   width="31" />
+  <filter_editor
+   text_pad_left="10"
+   follows="left|top|right"
+   height="23"
+   label="Enter search text"
+   layout="topleft"
+   left_pad="3"
+   max_length_chars="300"
+   highlight_text_field="true"
+   name="inventory search editor"
+   width="177" />
   <tab_container
      follows="all"
      halign="center"
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 2cc4abdd303..1c4822b8d5b 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -6,9 +6,11 @@
   text_pad_left="7"
   select_on_focus="true"
   text_tentative_color="TextFgTentativeColor"
+  highlight_text_field="false"
   background_image="TextField_Search_Off"
   background_image_disabled="TextField_Search_Disabled"
-  background_image_focused="TextField_Search_Active">
+  background_image_focused="TextField_Search_Active"
+  background_image_highlight="TextField_Search_Highlight">
   <search_button label=""
     top_pad="4"
     left_pad="4"
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index faa0404b354..dc5a07bf4f4 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -7,9 +7,11 @@
   text_pad_right="6" 
   select_on_focus="true"
   text_tentative_color="TextFgTentativeColor"
+  highlight_text_field="false"
   background_image="TextField_Search_Off"
   background_image_disabled="TextField_Search_Disabled"
-  background_image_focused="TextField_Search_Active" >
+  background_image_focused="TextField_Search_Active"
+  background_image_highlight="TextField_Search_Highlight">
   <search_button 
     top_pad="4"
     left_pad="4" 
-- 
GitLab