From 316d8fc875d54bfcc7e7eb8d215a4810947bcb71 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 20 Jun 2012 14:58:02 -0700
Subject: CHUI-101 WIP Make LLFolderView general purpose fixed final build
 errors

---
 indra/newview/llfolderview.cpp      | 2 +-
 indra/newview/llfolderviewmodel.h   | 1 +
 indra/newview/llinventoryfilter.cpp | 3 ++-
 indra/newview/llinventoryfilter.h   | 6 +++++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 78f4bc1119..2bc6f26c85 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -183,7 +183,7 @@ LLFolderView::LLFolderView(const Params& p)
 	mNeedsAutoRename(FALSE),
 	mDebugFilters(FALSE),
 	mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME),	// This gets overridden by a pref immediately
-	mFilter(),
+	mFilter(new LLInventoryFilter(LLInventoryFilter::Params().name(p.title))),
 	mShowSelectionContext(FALSE),
 	mShowSingleSelection(FALSE),
 	mArrangeGeneration(0),
diff --git a/indra/newview/llfolderviewmodel.h b/indra/newview/llfolderviewmodel.h
index 631e3eec1c..946943530a 100644
--- a/indra/newview/llfolderviewmodel.h
+++ b/indra/newview/llfolderviewmodel.h
@@ -88,6 +88,7 @@ public:
 	virtual bool 				isActive() const = 0;
 	virtual bool 				isModified() const = 0;
 	virtual void 				clearModified() = 0;
+	virtual const std::string& 	getName() const = 0;
 	virtual const std::string& 	getFilterText() = 0;
 	//RN: this is public to allow system to externally force a global refilter
 	virtual void 				setModified(EFilterModified behavior = FILTER_RESTART) = 0;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 9c9b04d03d..c13bb5123e 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -65,7 +65,8 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p)
 /// Class LLInventoryFilter
 ///----------------------------------------------------------------------------
 LLInventoryFilter::LLInventoryFilter(const Params& p)
-:	mFilterModified(FILTER_NONE),
+:	mName(p.name),
+	mFilterModified(FILTER_NONE),
 	mEmptyLookupMessage("InventoryNoMatchingItems"),
     mFilterOps(p.filter_ops),
 	mOrder(p.sort_order),
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 175a16c401..5b92c21a85 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -131,13 +131,15 @@ public:
 							
 	struct Params : public LLInitParam::Block<Params>
 	{
+		Optional<std::string>		name;
 		Optional<FilterOps::Params>	filter_ops;
 		Optional<std::string>		substring;
 		Optional<U32>				sort_order;
 		Optional<bool>				since_logoff;
 
 		Params()
-		:	filter_ops(""),
+		:	name("name"),
+			filter_ops(""),
 			substring("substring"),
 			sort_order("sort_order"),
 			since_logoff("since_logoff")
@@ -220,6 +222,7 @@ public:
 	bool 				isModified() const;
 	bool 				isSinceLogoff() const;
 	void 				clearModified();
+	const std::string& 	getName() const { return mName; }
 	const std::string& 	getFilterText();
 	//RN: this is public to allow system to externally force a global refilter
 	void 				setModified(EFilterModified behavior = FILTER_RESTART);
@@ -265,6 +268,7 @@ private:
 
 	std::string				mFilterSubString;
 	std::string				mFilterSubStringOrig;
+	const std::string		mName;
 
 	S32						mLastSuccessGeneration;
 	S32						mLastFailGeneration;
-- 
cgit v1.2.3