Merge branch 'DRTVWR-515-maint' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2020-09-23 14:02:09 +02:00
commit 34f11f989a
5 changed files with 23 additions and 3 deletions

View File

@ -104,14 +104,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

View File

@ -77,6 +77,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p)
: mName(p.name),
mFilterModified(FILTER_NONE),
mEmptyLookupMessage("InventoryNoMatchingItems"),
mDefaultEmptyLookupMessage(""),
mFilterOps(p.filter_ops),
mBackupFilterOps(mFilterOps),
mFilterSubString(p.substring),
@ -1607,12 +1608,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);
}
}

View File

@ -278,6 +278,7 @@ public:
EFilterCreatorType getFilterCreatorType() const;
void setEmptyLookupMessage(const std::string& message);
void setDefaultEmptyLookupMessage(const std::string& message);
std::string getEmptyLookupMessage() const;
// +-------------------------------------------------------------------+
@ -354,6 +355,7 @@ private:
std::string mFilterText;
std::string mEmptyLookupMessage;
std::string mDefaultEmptyLookupMessage;
ESearchType mSearchType;

View File

@ -6,6 +6,7 @@
layout="topleft"
name="publish_classified"
title="Publishing Classified"
help_topic="profile_edit_classified"
width="320">
<text
top="20"

View File

@ -757,6 +757,7 @@ http://www.firestormviewer.org/support for help fixing this problem.
<string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Show [secondlife:///app/inventory/filters 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>