From 55cce4645468512279bc02e803d859cde6c3a15a Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Wed, 1 Feb 2012 09:59:31 +0100 Subject: [PATCH] Restoring preset loading --- indra/newview/lldaycyclemanager.cpp | 6 +++--- indra/newview/llfloaterwindlight.cpp | 2 +- indra/newview/llwaterparammanager.cpp | 6 +++--- indra/newview/llwlparammanager.cpp | 6 +++--- indra/newview/wlfPanel_AdvSettings.cpp | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp index dffeb2346..d027d6557 100644 --- a/indra/newview/lldaycyclemanager.cpp +++ b/indra/newview/lldaycyclemanager.cpp @@ -172,10 +172,10 @@ void LLDayCycleManager::loadAllPresets() mDayCycleMap.clear(); // First, load system (coming out of the box) day cycles. - loadPresets(getSysDir()); + loadPresets(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", "")); // Then load user presets. Note that user day cycles will modify any system ones already loaded. - loadPresets(getUserDir()); + loadPresets(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", "")); } void LLDayCycleManager::loadPresets(const std::string& dir) @@ -199,7 +199,7 @@ bool LLDayCycleManager::loadPreset(const std::string& path) return false; } - std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); + std::string name(LLURI::unescape(gDirUtilp->getBaseFileName(path, true))); addPreset(name, data); return true; diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index 4dee4ecd0..4c2af3564 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -411,7 +411,7 @@ void LLFloaterWindLight::syncMenu() bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY(); childSetValue("WLCloudLockX", lockX); childSetValue("WLCloudLockY", lockY); - childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds2")); + childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds")); // disable if locked, enable if not if(lockX) diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index d70cf66ee..480681636 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -102,10 +102,10 @@ LLWaterParamManager::~LLWaterParamManager() void LLWaterParamManager::loadAllPresets() { // First, load system (coming out of the box) water presets. - loadPresetsFromDir(getSysDir()); + loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "")); // Then load user presets. Note that user day presets will modify any system ones already loaded. - loadPresetsFromDir(getUserDir()); + loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "")); } void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) @@ -132,7 +132,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) bool LLWaterParamManager::loadPreset(const std::string& path) { llifstream xml_file; - std::string name(gDirUtilp->getBaseFileName(LLWeb::curlEscape(path), /*strip_exten = */ true)); + std::string name(LLURI::unescape(gDirUtilp->getBaseFileName(path, true))); xml_file.open(path.c_str()); if (!xml_file) diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 7943d4d29..4b9b1338b 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -284,10 +284,10 @@ void LLWLParamManager::refreshRegionPresets() void LLWLParamManager::loadAllPresets() { // First, load system (coming out of the box) sky presets. - loadPresetsFromDir(getSysDir()); + loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); // Then load user presets. Note that user day presets will modify any system ones already loaded. - loadPresetsFromDir(getUserDir()); + loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); } void LLWLParamManager::loadPresetsFromDir(const std::string& dir) @@ -314,7 +314,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir) bool LLWLParamManager::loadPreset(const std::string& path) { llifstream xml_file; - std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); + std::string name(LLURI::unescape(gDirUtilp->getBaseFileName(path, true))); xml_file.open(path.c_str()); if (!xml_file) diff --git a/indra/newview/wlfPanel_AdvSettings.cpp b/indra/newview/wlfPanel_AdvSettings.cpp index 9219e9798..a79bc527b 100644 --- a/indra/newview/wlfPanel_AdvSettings.cpp +++ b/indra/newview/wlfPanel_AdvSettings.cpp @@ -145,10 +145,10 @@ BOOL wlfPanel_AdvSettings::postBuild() getChild("use_estate_wl")->setCommitCallback(onUseRegionSettings); - mWaterPresetCombo = getChild("WWPresetsCombo"); + mWaterPresetCombo = getChild("WLWaterPresetsCombo"); mWaterPresetCombo->setCommitCallback(onChangeWWPresetName); - mSkyPresetCombo = getChild("WLPresetsCombo"); + mSkyPresetCombo = getChild("WLSkyPresetsCombo"); mSkyPresetCombo->setCommitCallback(onChangeWLPresetName); // mDayCyclePresetCombo = getChild("DCPresetsCombo");