summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerfoldertype.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-11 11:51:59 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-11 11:51:59 -0700
commit9461316e56b99f96ac2d455fabe2af675d7a2391 (patch)
treed106c28f7ca1bd8c196e32817130fde999bde63c /indra/newview/llviewerfoldertype.cpp
parent6b7470480692fc614d625212f9c17afd688e42de (diff)
parent571c2bc5e5190cae7324dd235f9c44db9823327a (diff)
Merged from viewer-release
Diffstat (limited to 'indra/newview/llviewerfoldertype.cpp')
-rw-r--r--indra/newview/llviewerfoldertype.cpp56
1 files changed, 23 insertions, 33 deletions
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index de1c8d14a8..56b5d7467c 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -2,25 +2,31 @@
* @file llfoldertype.cpp
* @brief Implementation of LLViewerFolderType functionality.
*
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
@@ -104,6 +110,8 @@ protected:
LLViewerFolderDictionary::LLViewerFolderDictionary()
{
+ initEnsemblesFromFile();
+
// NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET?
// |-------------------------|-----------------------|----------------------|-----------|
addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE));
@@ -129,15 +137,6 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default"));
-
-#if SUPPORT_ENSEMBLES
- initEnsemblesFromFile();
-#else
- for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type)
- {
- addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE));
- }
-#endif
}
bool LLViewerFolderDictionary::initEnsemblesFromFile()
@@ -232,15 +231,6 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder
else
return entry->mIconNameClosed;
}
-
- // Error condition. Return something so that we don't show a grey box in inventory view.
- const ViewerFolderEntry *default_entry = LLViewerFolderDictionary::getInstance()->lookup(LLFolderType::FT_NONE);
- if (default_entry)
- {
- return default_entry->mIconNameClosed;
- }
-
- // Should not get here unless there's something corrupted with the FT_NONE entry.
return badLookup();
}