summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-08 18:19:39 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-08 18:19:39 -0500
commit947260880713f0bd65b03f796f782b167127e294 (patch)
tree36893c245769dff1e93e63740e4d16e19e21de6b
parentc130f5d4c9ea6ffb423f05d965168d10c6c99c05 (diff)
EXT-3256 : Show help message in Favorites bar if empty
--HG-- branch : avatar-pipeline
-rw-r--r--indra/newview/llfolderview.cpp2
-rw-r--r--indra/newview/llinventoryfilter.cpp14
-rw-r--r--indra/newview/llinventoryfilter.h21
-rw-r--r--indra/newview/llpanellandmarks.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
5 files changed, 30 insertions, 10 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 4e77b42187..7cf0104075 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -890,7 +890,7 @@ void LLFolderView::draw()
}
else
{
- mStatusText = LLTrans::getString("InventoryNoMatchingItems");
+ mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage());
font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
}
}
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 38803b4b8b..81b10f5a62 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -63,7 +63,8 @@ LLInventoryFilter::FilterOps::FilterOps() :
LLInventoryFilter::LLInventoryFilter(const std::string& name)
: mName(name),
mModified(FALSE),
- mNeedTextRebuild(TRUE)
+ mNeedTextRebuild(TRUE),
+ mEmptyLookupMessage("InventoryNoMatchingItems")
{
mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately
@@ -861,3 +862,14 @@ S32 LLInventoryFilter::getMustPassGeneration() const
{
return mMustPassGeneration;
}
+
+void LLInventoryFilter::setEmptyLookupMessage(const std::string& message)
+{
+ mEmptyLookupMessage = message;
+}
+
+const std::string& LLInventoryFilter::getEmptyLookupMessage() const
+{
+ return mEmptyLookupMessage;
+
+}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 8cac173fd8..5ca77cb26a 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -74,13 +74,6 @@ public:
virtual ~LLInventoryFilter();
// +-------------------------------------------------------------------+
- // + Execution And Results
- // +-------------------------------------------------------------------+
- BOOL check(const LLFolderViewItem* item);
- BOOL checkAgainstFilterType(const LLFolderViewItem* item);
- std::string::size_type getStringMatchOffset() const;
-
- // +-------------------------------------------------------------------+
// + Parameters
// +-------------------------------------------------------------------+
void setFilterObjectTypes(U64 types);
@@ -104,12 +97,25 @@ public:
void setHoursAgo(U32 hours);
U32 getHoursAgo() const;
+ // +-------------------------------------------------------------------+
+ // + Execution And Results
+ // +-------------------------------------------------------------------+
+ BOOL check(const LLFolderViewItem* item);
+ BOOL checkAgainstFilterType(const LLFolderViewItem* item);
+ std::string::size_type getStringMatchOffset() const;
+
+ // +-------------------------------------------------------------------+
+ // + Presentation
+ // +-------------------------------------------------------------------+
void setShowFolderState( EFolderShow state);
EFolderShow getShowFolderState() const;
void setSortOrder(U32 order);
U32 getSortOrder() const;
+ void setEmptyLookupMessage(const std::string& message);
+ const std::string& getEmptyLookupMessage() const;
+
// +-------------------------------------------------------------------+
// + Status
// +-------------------------------------------------------------------+
@@ -188,6 +194,7 @@ private:
BOOL mModified;
BOOL mNeedTextRebuild;
std::string mFilterText;
+ std::string mEmptyLookupMessage;
};
#endif
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index ebde902e81..975219458f 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -327,7 +327,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel()
mFavoritesInventoryPanel = getChild<LLInventorySubTreePanel>("favorites_list");
initLandmarksPanel(mFavoritesInventoryPanel);
-
+ mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems");
initAccordion("tab_favorites", mFavoritesInventoryPanel);
}
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 3b32912fbf..3c9ceb6585 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1805,6 +1805,7 @@ Clears (deletes) the media and all params from the given face.
<!-- inventory -->
<string name="InventoryNoMatchingItems">No matching items found in inventory.</string>
+ <string name="FavoritesNoMatchingItems">Drag and drop a landmark here to add to your favorites.</string>
<string name="InventoryNoTexture">
You do not have a copy of
this texture in your inventory