summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:06 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:06 +0300
commite00edbeb4a7edfe4f190ac7bf2197aa8240e50c6 (patch)
tree25db350e573224fc2900c1e760f7cf429c599abe /indra/newview/llinventoryfilter.cpp
parent3ad10e3075840b442f3a8f4593b4b4f10bad48e0 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-522-maint
# Conflicts: # doc/contributions.txt
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index c972b1dab7..cab7b204a8 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -75,6 +75,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
: mName(p.name),
mFilterModified(FILTER_NONE),
mEmptyLookupMessage("InventoryNoMatchingItems"),
+ mDefaultEmptyLookupMessage(""),
mFilterOps(p.filter_ops),
mBackupFilterOps(mFilterOps),
mFilterSubString(p.substring),
@@ -1442,12 +1443,24 @@ void LLInventoryFilter::setEmptyLookupMessage(const std::string& message)
mEmptyLookupMessage = message;
}
+void LLInventoryFilter::setDefaultEmptyLookupMessage(const std::string& message)
+{
+ mDefaultEmptyLookupMessage = message;
+}
+
std::string LLInventoryFilter::getEmptyLookupMessage() const
{
- LLStringUtil::format_map_t args;
- args["[SEARCH_TERM]"] = LLURI::escape(getFilterSubStringOrig());
+ if (isDefault() && !mDefaultEmptyLookupMessage.empty())
+ {
+ return LLTrans::getString(mDefaultEmptyLookupMessage);
+ }
+ else
+ {
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(getFilterSubStringOrig());
- return LLTrans::getString(mEmptyLookupMessage, args);
+ return LLTrans::getString(mEmptyLookupMessage, args);
+ }
}