summaryrefslogtreecommitdiff
path: root/indra/newview/llpresetsmanager.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2014-11-28 10:00:41 -0500
committerJonathan Yap <jhwelch@gmail.com>2014-11-28 10:00:41 -0500
commitaf827615acc6cce0457ba00810136c41283f6158 (patch)
tree8edd97ee239f407151e8b8b8d9d44c64915f68fb /indra/newview/llpresetsmanager.cpp
parentf30e518f1774cc3c1b4641e97c26afa496fb85e5 (diff)
STORM-2082 Initial support for presets popup from status bar
Diffstat (limited to 'indra/newview/llpresetsmanager.cpp')
-rw-r--r--indra/newview/llpresetsmanager.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 8fd9024fef..642d9819fe 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -62,6 +62,11 @@ std::string LLPresetsManager::getUserDir(const std::string& subdirectory)
return full_path;
}
+std::string LLPresetsManager::getCameraPresetsDir()
+{
+ return getUserDir(PRESETS_CAMERA_DIR);
+}
+
std::string LLPresetsManager::getGraphicPresetsDir()
{
return getUserDir(PRESETS_GRAPHIC_DIR);
@@ -70,7 +75,6 @@ std::string LLPresetsManager::getGraphicPresetsDir()
void LLPresetsManager::getPresetNames(preset_name_list_t& presets) const
{
presets = mPresetNames;
-
}
void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir)
@@ -90,7 +94,14 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir)
{
std::string path = gDirUtilp->add(dir, file);
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
- mPresetNames.push_back(name);
+ if ("Default" != name)
+ {
+ mPresetNames.push_back(name);
+ }
+ else
+ {
+ mPresetNames.insert(mPresetNames.begin(), name);
+ }
}
}
}