diff options
author | Merov Linden <merov@lindenlab.com> | 2014-03-10 18:49:40 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-03-10 18:49:40 -0700 |
commit | 9de02b0cd3ac05ce172e12dbc2d288a5deccba11 (patch) | |
tree | 4292a9d91d3f3ad87573ae044c91fd8fd4da5a29 /indra/newview/llinventorybridge.cpp | |
parent | 00fe1b7fbe605ddcb6fb56e0a3d20b1208fbd5fd (diff) |
DD-17 : WIP : some work on the suffix for Listing folders
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 44943d8722..c2f6ce8fb1 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -959,6 +959,18 @@ BOOL LLInvFVBridge::isInboxFolder() const return gInventory.isObjectDescendentOf(mUUID, inbox_id); } +BOOL LLInvFVBridge::isMerchantItemsFolder() const +{ + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MERCHANT_ITEMS, false); + + if (folder_id.isNull()) + { + return FALSE; + } + + return gInventory.isObjectDescendentOf(mUUID, folder_id); +} + BOOL LLInvFVBridge::isOutboxFolder() const { const LLUUID outbox_id = getOutboxFolder(); @@ -1931,6 +1943,38 @@ void LLFolderBridge::buildDisplayName() const } } +std::string LLFolderBridge::getLabelSuffix() const +{ + /* + + LLInventoryCategory* cat = gInventory.getCategory(getUUID()); + if(cat) + { + const LLUUID& parent_folder_id = cat->getParentUUID(); + accessories = (parent_folder_id == gInventory.getLibraryRootFolderID()); + } + */ + if (isMerchantItemsFolder()) + { + if (LLMarketplaceData::instance().isListed(getUUID())) + { + llinfos << "Merov : in merchant folder and listed : id = " << getUUID() << llendl; + std::string suffix = " (" + LLMarketplaceData::instance().getListingID(getUUID()) + ")"; + return LLInvFVBridge::getLabelSuffix() + suffix; + } + else + { + llinfos << "Merov : in merchant folder but not listed : id = " << getUUID() << llendl; + return LLInvFVBridge::getLabelSuffix(); + } + } + else + { + llinfos << "Merov : not in merchant folder : id = " << getUUID() << llendl; + return LLInvFVBridge::getLabelSuffix(); + } +} + void LLFolderBridge::update() { |