diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-17 19:05:33 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-17 19:05:33 +0000 |
commit | 0a35c31e51cbb2f407d87db14d40a08a91963c81 (patch) | |
tree | e3a6f7e3c512850f05bf66ffb89c4113d63d223f /indra/newview/llfolderviewitem.cpp | |
parent | c17152c21eff9a165c92c8bf07678c4bca1c8a99 (diff) | |
parent | 03f58118ce4c367bffe26ffc968a529e81331d4b (diff) |
PE merge
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 8b3ba6c72b..bb4c75d3ac 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -255,10 +255,27 @@ void LLFolderViewItem::refreshFromListener() // temporary attempt to display the inventory folder in the user locale. // mantipov: *NOTE: be sure this code is synchronized with LLFriendCardsManager::findChildFolderUUID // it uses the same way to find localized string - if (LLFolderType::lookupIsProtectedType(preferred_type)) + + // HACK: EXT - 6028 ([HARD CODED]? Inventory > Library > "Accessories" folder) + // Translation of Accessories folder in Library inventory folder + bool accessories = false; + if(mLabel == std::string("Accessories")) + { + //To ensure that Accessories folder is in Library we have to check its parent folder. + //Due to parent LLFolderViewFloder is not set to this item yet we have to check its parent via Inventory Model + LLInventoryCategory* cat = gInventory.getCategory(mListener->getUUID()); + if(cat) + { + const LLUUID& parent_folder_id = cat->getParentUUID(); + accessories = (parent_folder_id == gInventory.getLibraryRootFolderID()); + } + } + + //"Accessories" inventory category has folder type FT_NONE. So, this folder + //can not be detected as protected with LLFolderType::lookupIsProtectedType + if (accessories || LLFolderType::lookupIsProtectedType(preferred_type)) { LLTrans::findString(mLabel, "InvFolder " + mLabel); - setToolTip(mLabel); }; setToolTip(mLabel); |