diff options
author | Merov Linden <merov@lindenlab.com> | 2011-11-11 23:58:37 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-11-11 23:58:37 -0800 |
commit | db371c98248b790eed22a6295d33dd1d02adc602 (patch) | |
tree | 498244669ef64be8e3adca6a233becb9861ed622 /indra/newview/llinventorybridge.cpp | |
parent | 1b56b7d2e5ad2b5c4ca2c733b25d1fd7dc78f634 (diff) |
EXP-1498 : Hide empty system folders. System folders can be specifically marked to be hidden if empty in the LLViewerFolderDictionary constructor.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0c092e9a56..244b001adb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -195,6 +195,20 @@ BOOL LLInvFVBridge::isLink() const return mIsLink; } +// Is a "System" folder +// System folders are predefined named folders that have a specific preferred type +// e.g. "Textures" which has an FT_TEXTURE preferred type. +// Those are folders used to route incoming items in the current (soon to be obsolete) inventory +// asset routing. +// If a folder uses the same name as a predefined folder but is not of the same preferred type +// or if it has a preferred type but a different name, it will not be considered a system folder. +// *TODO: Test that logic in all languages +bool LLInvFVBridge::isSystemFolder() const +{ + LLFolderType::EType preferred_type = getPreferredType(); + return (preferred_type == LLFolderType::FT_NONE ? false : LLViewerFolderType::lookupTypeFromNewCategoryName(getDisplayName()) == preferred_type); +} + /*virtual*/ /** * @brief Adds this item into clipboard storage |