summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-09-02 15:23:17 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-09-02 15:23:17 +0300
commit02166bcf2a7bccb6fecacbbb88d48b265506be41 (patch)
tree2898320f5f55e202cf48ba828e7edb5b47d526c3 /indra/newview
parent18428e768d53f97694104d49da8ef4287568edda (diff)
SL-13890 Show appropriate message for empty 'Marketplace Listings' tabs
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp3
-rw-r--r--indra/newview/llinventoryfilter.cpp19
-rw-r--r--indra/newview/llinventoryfilter.h2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
4 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 889d017389..524162ba51 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -103,14 +103,17 @@ void LLPanelMarketplaceListings::buildAllPanels()
panel = buildInventoryPanel("Active Items", "panel_marketplace_listings_listed.xml");
panel->getFilter().setFilterMarketplaceActiveFolders();
panel->getFilter().setEmptyLookupMessage("MarketplaceNoMatchingItems");
+ panel->getFilter().setDefaultEmptyLookupMessage("MarketplaceNoListing");
panel->getFilter().markDefault();
panel = buildInventoryPanel("Inactive Items", "panel_marketplace_listings_unlisted.xml");
panel->getFilter().setFilterMarketplaceInactiveFolders();
panel->getFilter().setEmptyLookupMessage("MarketplaceNoMatchingItems");
+ panel->getFilter().setDefaultEmptyLookupMessage("MarketplaceNoListing");
panel->getFilter().markDefault();
panel = buildInventoryPanel("Unassociated Items", "panel_marketplace_listings_unassociated.xml");
panel->getFilter().setFilterMarketplaceUnassociatedFolders();
panel->getFilter().setEmptyLookupMessage("MarketplaceNoMatchingItems");
+ panel->getFilter().setDefaultEmptyLookupMessage("MarketplaceNoListing");
panel->getFilter().markDefault();
// Set the tab panel
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 745b953996..6e46713e04 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -74,6 +74,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
: mName(p.name),
mFilterModified(FILTER_NONE),
mEmptyLookupMessage("InventoryNoMatchingItems"),
+ mDefaultEmptyLookupMessage(""),
mFilterOps(p.filter_ops),
mBackupFilterOps(mFilterOps),
mFilterSubString(p.substring),
@@ -1409,12 +1410,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);
+ }
}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index be02ee3623..61cc5ae602 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -257,6 +257,7 @@ public:
EFilterCreatorType getFilterCreatorType() const;
void setEmptyLookupMessage(const std::string& message);
+ void setDefaultEmptyLookupMessage(const std::string& message);
std::string getEmptyLookupMessage() const;
// +-------------------------------------------------------------------+
@@ -332,6 +333,7 @@ private:
std::string mFilterText;
std::string mEmptyLookupMessage;
+ std::string mDefaultEmptyLookupMessage;
ESearchType mSearchType;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 29eb733d41..3964c749be 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2297,6 +2297,7 @@ For AI Character: Get the closest navigable point to the point provided.
<string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string>
<string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
+ <string name="MarketplaceNoListing">You have no listings yet.</string>
<string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string>
<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>
<string name="InventoryInboxNoItems">Your Marketplace purchases will appear here. You may then drag them into your inventory to use them.</string>