diff options
author | Rider Linden <rider@lindenlab.com> | 2017-11-10 16:17:25 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2017-11-10 16:17:25 -0800 |
commit | b37eb2642f6e6e4d1e32a49c7ab31f70321cd979 (patch) | |
tree | 3ec6bd8233525b5a96f0a0308f1d6100c59fb32f /indra/newview | |
parent | d709c7f35ebfd1945fd036b859f56b349d01dfe7 (diff) |
Remove delete preset dialog, Initial settings for selection level (Region/Parcel/Local)
Diffstat (limited to 'indra/newview')
49 files changed, 457 insertions, 1140 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 931856ca31..369ce6f24e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -223,7 +223,6 @@ set(viewer_SOURCE_FILES llfloatercolorpicker.cpp llfloaterconversationlog.cpp llfloaterconversationpreview.cpp - llfloaterdeleteenvpreset.cpp llfloaterdeleteprefpreset.cpp llfloaterdestinations.cpp llfloatereditdaycycle.cpp @@ -850,7 +849,6 @@ set(viewer_HEADER_FILES llfloaterconversationlog.h llfloaterconversationpreview.h llfloaterdeleteprefpreset.h - llfloaterdeleteenvpreset.h llfloaterdestinations.h llfloatereditdaycycle.h llfloatereditsky.h diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8dd0b06ed2..89b50fd966 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -42,7 +42,6 @@ #include "llchicletbar.h" #include "llconsole.h" #include "lldonotdisturbnotificationstorage.h" -#include "llenvmanager.h" #include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloaterimcontainer.h" diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 01ee6d6d54..8b879710da 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -65,15 +65,19 @@ const F32 LLEnvironment::NIGHTTIME_ELEVATION_COS(LLSky::NIGHTTIME_ELEVATION_COS) LLEnvironment::LLEnvironment(): mSelectedSky(), mSelectedWater(), - mSelectedDayCycle(), + mSelectedDay(), mSkysById(), mSkysByName(), mWaterByName(), mWaterById(), mDayCycleByName(), mDayCycleById(), - mUserPrefs() + mUserPrefs(), + mSelectedEnvironment(ENV_LOCAL) { + mSetSkys.resize(ENV_END); + mSetWater.resize(ENV_END); + mSetDays.resize(ENV_END); } void LLEnvironment::initSingleton() @@ -86,16 +90,14 @@ void LLEnvironment::initSingleton() addWater(p_default_water); mCurrentWater = p_default_water; - LLSettingsDayCycle::ptr_t p_default_day = LLSettingsDayCycle::buildDefaultDayCycle(); + LLSettingsDay::ptr_t p_default_day = LLSettingsDay::buildDefaultDayCycle(); addDayCycle(p_default_day); - mCurrentDayCycle.reset(); - - applyAllSelected(); + mCurrentDay.reset(); // LEGACY! legacyLoadAllPresets(); - LLEnvironmentRequest::initiate(); + requestRegionEnvironment(); gAgent.addRegionChangedCallback(boost::bind(&LLEnvironment::onRegionChange, this)); } @@ -108,6 +110,17 @@ void LLEnvironment::loadPreferences() mUserPrefs.load(); } +void LLEnvironment::updatePreferences() +{ + /*NOOP for now. TODO record prefs and store.*/ +} + +bool LLEnvironment::canEdit() const +{ + return true; +} + + LLEnvironment::connection_t LLEnvironment::setSkyListChange(const LLEnvironment::change_signal_t::slot_type& cb) { return mSkyListChange.connect(cb); @@ -126,9 +139,31 @@ LLEnvironment::connection_t LLEnvironment::setDayCycleListChange(const LLEnviron void LLEnvironment::onRegionChange() { + requestRegionEnvironment(); +} + +void LLEnvironment::requestRegionEnvironment() +{ LLEnvironmentRequest::initiate(); } +void LLEnvironment::onLegacyRegionSettings(LLSD data) +{ + LLUUID regionId = data[0]["regionID"].asUUID(); + + LLSettingsDay::ptr_t regionday; + if (data[1].isUndefined()) + regionday = LLEnvironment::findDayCycleByName("Default"); + else + regionday = LLSettingsDay::buildFromLegacyMessage(regionId, data[1], data[2], data[3]); + + setSkyFor(ENV_REGION, LLSettingsSky::ptr_t()); + setWaterFor(ENV_REGION, LLSettingsWater::ptr_t()); + setDayFor(ENV_REGION, regionday); + + applyChosenEnvironment(); +} + //------------------------------------------------------------------------- F32 LLEnvironment::getCamHeight() const { @@ -162,8 +197,8 @@ void LLEnvironment::update(const LLViewerCamera * cam) // update clouds, sun, and general updateCloudScroll(); - if (mCurrentDayCycle) - mCurrentDayCycle->update(); + if (mCurrentDay) + mCurrentDay->update(); if (mCurrentSky) mCurrentSky->update(); @@ -351,20 +386,6 @@ void LLEnvironment::onSkyTransitionDone(const LLSettingsBlender::ptr_t &blender) mBlenderSky.reset(); } -void LLEnvironment::applySky(const LLSettingsSky::ptr_t &sky) -{ -#if 0 - if (sky) - { - mCurrentSky = sky; - } - else - { - mCurrentSky = mCurrentSky; - } -#endif -} - void LLEnvironment::selectWater(const std::string &name, F32Seconds transition) { LLSettingsWater::ptr_t next_water = findWaterByName(name); @@ -411,23 +432,9 @@ void LLEnvironment::onWaterTransitionDone(const LLSettingsBlender::ptr_t &blende mBlenderWater.reset(); } -void LLEnvironment::applyWater(const LLSettingsWater::ptr_t water) -{ -#if 0 - if (water) - { - mCurrentWater = water; - } - else - { - mCurrentWater = mCurrentWater; - } -#endif -} - void LLEnvironment::selectDayCycle(const std::string &name, F32Seconds transition) { - LLSettingsDayCycle::ptr_t next_daycycle = findDayCycleByName(name); + LLSettingsDay::ptr_t next_daycycle = findDayCycleByName(name); if (!next_daycycle) { @@ -438,56 +445,127 @@ void LLEnvironment::selectDayCycle(const std::string &name, F32Seconds transitio selectDayCycle(next_daycycle, transition); } -void LLEnvironment::selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle, F32Seconds transition) +void LLEnvironment::selectDayCycle(const LLSettingsDay::ptr_t &daycycle, F32Seconds transition) { if (!daycycle) { return; } - mCurrentDayCycle = daycycle; + mCurrentDay = daycycle; daycycle->startDayCycle(); selectWater(daycycle->getCurrentWater(), transition); selectSky(daycycle->getCurrentSky(), transition); } -void LLEnvironment::applyDayCycle(const LLSettingsDayCycle::ptr_t &daycycle) + +void LLEnvironment::setSelectedEnvironment(EnvSelection_t env) +{ + if (env == mSelectedEnvironment) + { // No action to take + return; + } + + mSelectedEnvironment = env; + applyChosenEnvironment(); +} + +void LLEnvironment::applyChosenEnvironment() { -#if 0 - if (daycycle) + mSelectedSky.reset(); + mSelectedWater.reset(); + mSelectedDay.reset(); + + for (S32 idx = mSelectedEnvironment; idx < ENV_END; ++idx) { - mCurrentDayCycle = daycycle; + if (mSetDays[idx] && !mSelectedSky && !mSelectedWater) + selectDayCycle(mSetDays[idx]); + if (mSetSkys[idx] && !mSelectedSky) + selectSky(mSetSkys[idx]); + if (mSetWater[idx] && !mSelectedWater) + selectWater(mSetWater[idx]); + if (mSelectedSky && mSelectedWater) + return; } - else + + if (!mSelectedSky) + selectSky("Default"); + if (!mSelectedWater) + selectWater("Default"); +} + +LLSettingsSky::ptr_t LLEnvironment::getChosenSky() const +{ + for (S32 idx = mSelectedEnvironment; idx < ENV_END; ++idx) + { + if (mSetSkys[idx]) + return mSetSkys[idx]; + } + + return LLSettingsSky::ptr_t(); +} + +LLSettingsWater::ptr_t LLEnvironment::getChosenWater() const +{ + for (S32 idx = mSelectedEnvironment; idx < ENV_END; ++idx) { - mCurrentDayCycle = mCurrentDayCycle; + if (mSetWater[idx]) + return mSetWater[idx]; } -#endif + + return LLSettingsWater::ptr_t(); +} + +LLSettingsDay::ptr_t LLEnvironment::getChosenDay() const +{ + for (S32 idx = mSelectedEnvironment; idx < ENV_END; ++idx) + { + if (mSetDays[idx]) + return mSetDays[idx]; + } + + return LLSettingsDay::ptr_t(); +} + +void LLEnvironment::setSkyFor(EnvSelection_t env, const LLSettingsSky::ptr_t &sky) +{ + mSetSkys[env] = sky; } -void LLEnvironment::clearAllSelected() +LLSettingsSky::ptr_t LLEnvironment::getSkyFor(EnvSelection_t env) const { -#if 0 - if (mCurrentSky != mCurrentSky) - selectSky(); - if (mCurrentWater != mCurrentWater) - selectWater(); - if (mCurrentDayCycle != mCurrentDayCycle) - selectDayCycle(); -#endif + return mSetSkys[env]; } -void LLEnvironment::applyAllSelected() +void LLEnvironment::setWaterFor(EnvSelection_t env, const LLSettingsWater::ptr_t &water) { - if (mCurrentSky != mCurrentSky) - applySky(); - if (mCurrentWater != mCurrentWater) - applyWater(); - if (mCurrentDayCycle != mCurrentDayCycle) - applyDayCycle(); + mSetWater[env] = water; } +LLSettingsWater::ptr_t LLEnvironment::getWaterFor(EnvSelection_t env) const +{ + return mSetWater[env]; +} + +void LLEnvironment::setDayFor(EnvSelection_t env, const LLSettingsDay::ptr_t &day) +{ + mSetDays[env] = day; +} + +LLSettingsDay::ptr_t LLEnvironment::getDayFor(EnvSelection_t env) const +{ + return mSetDays[env]; +} + +void LLEnvironment::clearUserSettings() +{ + mSetSkys[ENV_LOCAL].reset(); + mSetWater[ENV_LOCAL].reset(); + mSetDays[ENV_LOCAL].reset(); +} + + LLEnvironment::list_name_id_t LLEnvironment::getSkyList() const { list_name_id_t list; @@ -544,17 +622,6 @@ void LLEnvironment::addSky(const LLSettingsSky::ptr_t &sky) mSkyListChange(); } -// void LLEnvironment::addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky) -// { -// // std::string name = sky->getValue(LLSettingsSky::SETTING_NAME).asString(); -// // -// // std::pair<NamedSkyMap_t::iterator, bool> result; -// // result = mSkysByName.insert(NamedSkyMap_t::value_type(name, sky)); -// // -// // if (!result.second) -// // (*(result.first)).second = sky; -// } - void LLEnvironment::removeSky(const std::string &name) { namedSettingMap_t::iterator it = mSkysByName.find(name); @@ -563,11 +630,6 @@ void LLEnvironment::removeSky(const std::string &name) mSkyListChange(); } -// void LLEnvironment::removeSky(const LLUUID &id) -// { -// -// } - void LLEnvironment::clearAllSkys() { mSkysByName.clear(); @@ -589,7 +651,6 @@ void LLEnvironment::addWater(const LLSettingsWater::ptr_t &water) mWaterListChange(); } -//void LLEnvironment::addWater(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void LLEnvironment::removeWater(const std::string &name) { @@ -599,7 +660,6 @@ void LLEnvironment::removeWater(const std::string &name) mWaterListChange(); } -//void LLEnvironment::removeWater(const LLUUID &id); void LLEnvironment::clearAllWater() { mWaterByName.clear(); @@ -607,9 +667,9 @@ void LLEnvironment::clearAllWater() mWaterListChange(); } -void LLEnvironment::addDayCycle(const LLSettingsDayCycle::ptr_t &daycycle) +void LLEnvironment::addDayCycle(const LLSettingsDay::ptr_t &daycycle) { - std::string name = daycycle->getValue(LLSettingsDayCycle::SETTING_NAME).asString(); + std::string name = daycycle->getValue(LLSettingsDay::SETTING_NAME).asString(); LL_WARNS("RIDER") << "Adding daycycle as '" << name << "'" << LL_ENDL; @@ -665,17 +725,17 @@ LLSettingsWater::ptr_t LLEnvironment::findWaterByName(std::string name) const return boost::static_pointer_cast<LLSettingsWater>((*it).second); } -LLSettingsDayCycle::ptr_t LLEnvironment::findDayCycleByName(std::string name) const +LLSettingsDay::ptr_t LLEnvironment::findDayCycleByName(std::string name) const { namedSettingMap_t::const_iterator it = mDayCycleByName.find(name); if (it == mDayCycleByName.end()) { LL_WARNS("ENVIRONMENT") << "Unable to find daycycle with unknown name '" << name << "'" << LL_ENDL; - return LLSettingsDayCycle::ptr_t(); + return LLSettingsDay::ptr_t(); } - return boost::static_pointer_cast<LLSettingsDayCycle>((*it).second); + return boost::static_pointer_cast<LLSettingsDay>((*it).second); } //========================================================================= @@ -717,19 +777,6 @@ void LLEnvironment::UserPrefs::store() //========================================================================= // Transitional Code. -void LLEnvironment::onLegacyRegionSettings(LLSD data) -{ - LLUUID regionId = data[0]["regionID"].asUUID(); - - LLSettingsDayCycle::ptr_t regionday; - if (data[1].isUndefined()) - regionday = LLEnvironment::findDayCycleByName("Default"); - else - regionday = LLSettingsDayCycle::buildFromLegacyMessage(regionId, data[1], data[2], data[3]); - - selectDayCycle(regionday, TRANSITION_DEFAULT); -} - // static std::string LLEnvironment::getSysDir(const std::string &subdir) { @@ -855,7 +902,7 @@ void LLEnvironment::legacyLoadAllPresets() { std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true)); - LLSettingsDayCycle::ptr_t day = LLSettingsDayCycle::buildFromLegacyPreset(name, data); + LLSettingsDay::ptr_t day = LLSettingsDay::buildFromLegacyPreset(name, data); LLEnvironment::instance().addDayCycle(day); } } @@ -874,7 +921,7 @@ void LLEnvironment::legacyLoadAllPresets() { std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true)); - LLSettingsDayCycle::ptr_t day = LLSettingsDayCycle::buildFromLegacyPreset(name, data); + LLSettingsDay::ptr_t day = LLSettingsDay::buildFromLegacyPreset(name, data); LLEnvironment::instance().addDayCycle(day); } } diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 13985bbc94..ce8c08f692 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -51,6 +51,14 @@ public: static const F32Seconds TRANSITION_DEFAULT; static const F32Seconds TRANSITION_SLOW; + enum EnvSelection_t + { + ENV_LOCAL, + ENV_PARCEL, + ENV_REGION, + ENV_END + }; + typedef boost::signals2::connection connection_t; class UserPrefs @@ -92,8 +100,11 @@ public: virtual ~LLEnvironment(); void loadPreferences(); + void updatePreferences(); const UserPrefs & getPreferences() const { return mUserPrefs; } + bool canEdit() const; + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } @@ -104,19 +115,46 @@ public: void addSky(const LLSettingsSky::ptr_t &sky); void addWater(const LLSettingsWater::ptr_t &sky); - void addDayCycle(const LLSettingsDayCycle::ptr_t &day); + void addDayCycle(const LLSettingsDay::ptr_t &day); void selectSky(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); void selectSky(const LLSettingsSky::ptr_t &sky, F32Seconds transition = TRANSITION_DEFAULT); - void applySky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); void selectWater(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); void selectWater(const LLSettingsWater::ptr_t &water, F32Seconds transition = TRANSITION_DEFAULT); - void applyWater(const LLSettingsWater::ptr_t water = LLSettingsWater::ptr_t()); void selectDayCycle(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); - void selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); - void applyDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); - void clearAllSelected(); - void applyAllSelected(); + void selectDayCycle(const LLSettingsDay::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); + + void setUserSky(const LLSettingsSky::ptr_t &sky) + { + setSkyFor(ENV_LOCAL, sky); + } + void setUserWater(const LLSettingsWater::ptr_t &water) + { + setWaterFor(ENV_LOCAL, water); + } + void setUserDaycycle(const LLSettingsDay::ptr_t &day) + { + setDayFor(ENV_LOCAL, day); + } + + void setSelectedEnvironment(EnvSelection_t env); + EnvSelection_t getSelectedEnvironment() const + { + return mSelectedEnvironment; + } + void applyChosenEnvironment(); + LLSettingsSky::ptr_t getChosenSky() const; + LLSettingsWater::ptr_t getChosenWater() const; + LLSettingsDay::ptr_t getChosenDay() const; + + void setSkyFor(EnvSelection_t env, const LLSettingsSky::ptr_t &sky); + LLSettingsSky::ptr_t getSkyFor(EnvSelection_t env) const; + void setWaterFor(EnvSelection_t env, const LLSettingsWater::ptr_t &water); + LLSettingsWater::ptr_t getWaterFor(EnvSelection_t env) const; + void setDayFor(EnvSelection_t env, const LLSettingsDay::ptr_t &day); + LLSettingsDay::ptr_t getDayFor(EnvSelection_t env) const; + + void clearUserSettings(); list_name_id_t getSkyList() const; list_name_id_t getWaterList() const; @@ -124,7 +162,7 @@ public: LLSettingsSky::ptr_t findSkyByName(std::string name) const; LLSettingsWater::ptr_t findWaterByName(std::string name) const; - LLSettingsDayCycle::ptr_t findDayCycleByName(std::string name) const; + LLSettingsDay::ptr_t findDayCycleByName(std::string name) const; inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } @@ -145,6 +183,8 @@ public: connection_t setWaterListChange(const change_signal_t::slot_type& cb); connection_t setDayCycleListChange(const change_signal_t::slot_type& cb); + void requestRegionEnvironment(); + void onLegacyRegionSettings(LLSD data); protected: @@ -160,14 +200,38 @@ private: LLSettingsSky::ptr_t mSelectedSky; LLSettingsWater::ptr_t mSelectedWater; - LLSettingsDayCycle::ptr_t mSelectedDayCycle; + LLSettingsDay::ptr_t mSelectedDay; - LLSettingsBlender::ptr_t mBlenderSky; - LLSettingsBlender::ptr_t mBlenderWater; + LLSettingsBlender::ptr_t mBlenderSky; + LLSettingsBlender::ptr_t mBlenderWater; LLSettingsSky::ptr_t mCurrentSky; LLSettingsWater::ptr_t mCurrentWater; - LLSettingsDayCycle::ptr_t mCurrentDayCycle; + LLSettingsDay::ptr_t mCurrentDay; + + EnvSelection_t mSelectedEnvironment; + + typedef std::vector<LLSettingsSky::ptr_t> SkyList_t; + typedef std::vector<LLSettingsWater::ptr_t> WaterList_t; + typedef std::vector<LLSettingsDay::ptr_t> DayList_t; + + SkyList_t mSetSkys; + WaterList_t mSetWater; + DayList_t mSetDays; + +#if 0 + LLSettingsSky::ptr_t mRegionFixedSky; + LLSettingsWater::ptr_t mRegionFixedWater; + LLSettingsDay::ptr_t mRegionDay; + + LLSettingsSky::ptr_t mParcelFixedSky; + LLSettingsWater::ptr_t mParcelFixedWater; + LLSettingsDay::ptr_t mParcelDay; + + LLSettingsSky::ptr_t mUserSky; + LLSettingsWater::ptr_t mUserWater; + LLSettingsDay::ptr_t mUserDay; +#endif namedSettingMap_t mSkysByName; AssetSettingMap_t mSkysById; diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index 82f4cb8ed9..5fc9231506 100644 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -26,8 +26,6 @@ #include "llviewerprecompiledheaders.h" -#include "llenvmanager.h" - #include "llagent.h" #include "lldaycyclemanager.h" #include "llviewercontrol.h" // for gSavedSettings @@ -36,6 +34,7 @@ #include "llwlhandlers.h" #include "llwlparammanager.h" #include "lltrans.h" +#include "llenvmanager.h" std::string LLWLParamKey::toString() const { diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp deleted file mode 100644 index bb11c813b4..0000000000 --- a/indra/newview/llfloaterdeleteenvpreset.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/** - * @file llfloaterdeleteenvpreset.cpp - * @brief Floater to delete a water / sky / day cycle preset. - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, 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. - * - * 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. - * - * 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 - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterdeleteenvpreset.h" - -// libs -#include "llbutton.h" -#include "llcombobox.h" -#include "llnotificationsutil.h" - -// newview -#include "lldaycyclemanager.h" -#include "llwaterparammanager.h" - -static bool confirmation_callback(const LLSD& notification, const LLSD& response, boost::function<void()> cb) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - cb(); - } - return false; - -} - -LLFloaterDeleteEnvPreset::LLFloaterDeleteEnvPreset(const LLSD &key) -: LLFloater(key) -, mPresetCombo(NULL) -{ -} - -// virtual -BOOL LLFloaterDeleteEnvPreset::postBuild() -{ - mPresetCombo = getChild<LLComboBox>("preset_combo"); - mPresetCombo->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::postPopulate, this)); - - getChild<LLButton>("delete")->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::onBtnDelete, this)); - getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeleteEnvPreset::onBtnCancel, this)); - - // Listen to user preferences change, in which case we need to rebuild the presets list - // to disable the [new] current preset. - LLEnvManagerNew::instance().setPreferencesChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populatePresetsList, this)); - - // Listen to presets addition/removal. - LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateDayCyclesList, this)); - LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateSkyPresetsList, this)); - LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeleteEnvPreset::populateWaterPresetsList, this)); - - return TRUE; -} - -// virtual -void LLFloaterDeleteEnvPreset::onOpen(const LLSD& key) -{ - std::string param = key.asString(); - std::string floater_title = getString(std::string("title_") + param); - std::string combo_label = getString(std::string("label_" + param)); - - // Update floater title. - setTitle(floater_title); - - // Update the combobox label. - getChild<LLUICtrl>("label")->setValue(combo_label); - - // Populate the combobox. - populatePresetsList(); -} - -void LLFloaterDeleteEnvPreset::onBtnDelete() -{ - std::string param = mKey.asString(); - std::string preset_name = mPresetCombo->getValue().asString(); - boost::function<void()> confirm_cb; - - if (param == "water") - { - // Don't allow deleting system presets. - if (LLWaterParamManager::instance().isSystemPreset(preset_name)) - { - LLNotificationsUtil::add("WLNoEditDefault"); - return; - } - - confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteWaterPresetConfirmation, this); - } - else if (param == "sky") - { - // Don't allow deleting presets referenced by local day cycles. - if (LLDayCycleManager::instance().isSkyPresetReferenced(preset_name)) - { - LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", getString("msg_sky_is_referenced"))); - return; - } - - LLWLParamManager& wl_mgr = LLWLParamManager::instance(); - - // Don't allow deleting system presets. - if (wl_mgr.isSystemPreset(preset_name)) - { - LLNotificationsUtil::add("WLNoEditDefault"); - return; - } - - confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteSkyPresetConfirmation, this); - } - else if (param == "day_cycle") - { - LLDayCycleManager& day_mgr = LLDayCycleManager::instance(); - - // Don't allow deleting system presets. - if (day_mgr.isSystemPreset(preset_name)) - { - LLNotificationsUtil::add("WLNoEditDefault"); - return; - } - - confirm_cb = boost::bind(&LLFloaterDeleteEnvPreset::onDeleteDayCycleConfirmation, this); - } - else - { - LL_WARNS() << "Unrecognized key" << LL_ENDL; - } - - LLSD args; - args["MESSAGE"] = getString("msg_confirm_deletion"); - LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), - boost::bind(&confirmation_callback, _1, _2, confirm_cb)); -} - -void LLFloaterDeleteEnvPreset::onBtnCancel() -{ - closeFloater(); -} - -void LLFloaterDeleteEnvPreset::populatePresetsList() -{ - std::string param = mKey.asString(); - - if (param == "water") - { - populateWaterPresetsList(); - } - else if (param == "sky") - { - populateSkyPresetsList(); - } - else if (param == "day_cycle") - { - populateDayCyclesList(); - } - else - { - LL_WARNS() << "Unrecognized key" << LL_ENDL; - } -} - -void LLFloaterDeleteEnvPreset::populateWaterPresetsList() -{ - if (mKey.asString() != "water") return; - - mPresetCombo->removeall(); - - std::string cur_preset; - LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); - if (!env_mgr.getUseRegionSettings()) - { - cur_preset = env_mgr.getWaterPresetName(); - } - - LLWaterParamManager::preset_name_list_t presets; - LLWaterParamManager::instance().getUserPresetNames(presets); // list only user presets - for (LLWaterParamManager::preset_name_list_t::const_iterator it = presets.begin(); it != presets.end(); ++it) - { - std::string name = *it; - - bool enabled = (name != cur_preset); // don't allow deleting current preset - mPresetCombo->add(name, ADD_BOTTOM, enabled); - } - - postPopulate(); -} - -void LLFloaterDeleteEnvPreset::populateSkyPresetsList() -{ - if (mKey.asString() != "sky") return; - - mPresetCombo->removeall(); - - std::string cur_preset; - LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); - if (!env_mgr.getUseRegionSettings() && env_mgr.getUseFixedSky()) - { - cur_preset = env_mgr.getSkyPresetName(); - } - - LLWLParamManager::preset_name_list_t user_presets; - LLWLParamManager::instance().getUserPresetNames(user_presets); - for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it) - { - const std::string& name = *it; - mPresetCombo->add(name, ADD_BOTTOM, /*enabled = */ name != cur_preset); - } - - postPopulate(); -} - -void LLFloaterDeleteEnvPreset::populateDayCyclesList() -{ - if (mKey.asString() != "day_cycle") return; - - mPresetCombo->removeall(); - - std::string cur_day; - LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); - if (!env_mgr.getUseRegionSettings() && env_mgr.getUseDayCycle()) - { - cur_day = env_mgr.getDayCycleName(); - } - - LLDayCycleManager& day_mgr = LLDayCycleManager::instance(); - LLDayCycleManager::preset_name_list_t user_days; - day_mgr.getUserPresetNames(user_days); // list only user presets - for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it) - { - const std::string& name = *it; - mPresetCombo->add(name, ADD_BOTTOM, name != cur_day); - } - - postPopulate(); -} - -void LLFloaterDeleteEnvPreset::postPopulate() -{ - // Handle empty list and empty selection. - bool has_selection = mPresetCombo->getItemCount() > 0 && mPresetCombo->getSelectedValue().isDefined(); - - if (!has_selection) - { - mPresetCombo->setLabel(getString("combo_label")); - } - - getChild<LLButton>("delete")->setEnabled(has_selection); -} - -void LLFloaterDeleteEnvPreset::onDeleteDayCycleConfirmation() -{ - LLDayCycleManager::instance().deletePreset(mPresetCombo->getValue().asString()); -} - -void LLFloaterDeleteEnvPreset::onDeleteSkyPresetConfirmation() -{ - LLWLParamKey key(mPresetCombo->getValue().asString(), LLEnvKey::SCOPE_LOCAL); - LLWLParamManager::instance().removeParamSet(key, true); -} - -void LLFloaterDeleteEnvPreset::onDeleteWaterPresetConfirmation() -{ - LLWaterParamManager::instance().removeParamSet(mPresetCombo->getValue().asString(), true); -} diff --git a/indra/newview/llfloaterdeleteenvpreset.h b/indra/newview/llfloaterdeleteenvpreset.h deleted file mode 100644 index 1211505273..0000000000 --- a/indra/newview/llfloaterdeleteenvpreset.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @file llfloaterdeleteenvpreset.h - * @brief Floater to delete a water / sky / day cycle preset. - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, 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. - * - * 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. - * - * 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 - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERDELETEENVPRESET_H -#define LL_LLFLOATERDELETEENVPRESET_H - -#include "llfloater.h" - -class LLComboBox; - -class LLFloaterDeleteEnvPreset : public LLFloater -{ - LOG_CLASS(LLFloaterDeleteEnvPreset); - -public: - LLFloaterDeleteEnvPreset(const LLSD &key); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - - void onBtnDelete(); - void onBtnCancel(); - -private: - void populatePresetsList(); - void populateWaterPresetsList(); - void populateSkyPresetsList(); - void populateDayCyclesList(); - - void postPopulate(); - - void onDeleteDayCycleConfirmation(); - void onDeleteSkyPresetConfirmation(); - void onDeleteWaterPresetConfirmation(); - - LLComboBox* mPresetCombo; -}; - -#endif // LL_LLFLOATERDELETEENVPRESET_H diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp index 97d87ee13e..31b0b0c090 100644 --- a/indra/newview/llfloatereditdaycycle.cpp +++ b/indra/newview/llfloatereditdaycycle.cpp @@ -42,11 +42,12 @@ // newview #include "llagent.h" #include "lldaycyclemanager.h" -#include "llenvmanager.h" #include "llregioninfomodel.h" #include "llviewerregion.h" #include "llwlparammanager.h" +#include "llenvironment.h" + const F32 LLFloaterEditDayCycle::sHoursPerDay = 24.0f; LLFloaterEditDayCycle::LLFloaterEditDayCycle(const LLSD &key) @@ -114,7 +115,7 @@ void LLFloaterEditDayCycle::onClose(bool app_quitting) { if (!app_quitting) // there's no point to change environment if we're quitting { - LLEnvManagerNew::instance().usePrefs(); // revert changes made to current day cycle + LLEnvironment::instance().applyChosenEnvironment(); } } @@ -142,11 +143,13 @@ void LLFloaterEditDayCycle::initCallbacks(void) mSaveButton->setRightMouseDownCallback(boost::bind(&LLFloaterEditDayCycle::dumpTrack, this)); getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onBtnCancel, this)); +#if 0 // Connect to env manager events. LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); env_mgr.setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsChange, this)); gAgent.addRegionChangedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionChange, this)); env_mgr.setRegionSettingsAppliedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsApplied, this, _1)); +#endif // Connect to day cycle manager events. LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleListChange, this)); @@ -420,6 +423,7 @@ void LLFloaterEditDayCycle::onAddKey() break; } +#if 0 if ((S32)mSliderToKey.size() >= max_sliders) { LLSD args; @@ -428,6 +432,7 @@ void LLFloaterEditDayCycle::onAddKey() LLNotificationsUtil::add("DayCycleTooManyKeyframes", args, LLSD(), LLNotificationFunctorRegistry::instance().DONOTHING); return; } +#endif // add the slider key std::string key_val = mSkyPresetsCombo->getSelectedValue().asString(); @@ -547,6 +552,7 @@ void LLFloaterEditDayCycle::reset() void LLFloaterEditDayCycle::saveRegionDayCycle() { +#if 0 LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay; // the day cycle being edited @@ -570,6 +576,7 @@ void LLFloaterEditDayCycle::saveRegionDayCycle() setApplyProgress(true); #endif +#endif } void LLFloaterEditDayCycle::setApplyProgress(bool started) @@ -628,6 +635,7 @@ void LLFloaterEditDayCycle::onDeleteKey() void LLFloaterEditDayCycle::onRegionSettingsChange() { +#if 0 LL_DEBUGS("Windlight") << "Region settings changed" << LL_ENDL; if (getApplyProgress()) // our region settings have being applied @@ -643,6 +651,7 @@ void LLFloaterEditDayCycle::onRegionSettingsChange() closeFloater(); } +#endif } void LLFloaterEditDayCycle::onRegionChange() @@ -669,6 +678,7 @@ void LLFloaterEditDayCycle::onRegionSettingsApplied(bool success) void LLFloaterEditDayCycle::onRegionInfoUpdate() { +#if 0 LL_DEBUGS("Windlight") << "Region info updated" << LL_ENDL; bool can_edit = true; @@ -680,6 +690,7 @@ void LLFloaterEditDayCycle::onRegionInfoUpdate() } enableEditing(can_edit); +#endif } void LLFloaterEditDayCycle::onDayCycleNameEdited() @@ -691,6 +702,7 @@ void LLFloaterEditDayCycle::onDayCycleNameEdited() void LLFloaterEditDayCycle::onDayCycleSelected() { +#if 0 LLSD day_data; LLWLParamKey dc_key = getSelectedDayCycle(); @@ -723,8 +735,8 @@ void LLFloaterEditDayCycle::onDayCycleSelected() F32 slider_time = mTimeSlider->getCurSliderValue() / sHoursPerDay; LLWLParamManager::instance().applyDayCycleParams(day_data, dc_key.scope, slider_time); loadTrack(); - - enableEditing(can_edit); +#endif + enableEditing(false); } void LLFloaterEditDayCycle::onBtnSave() @@ -786,6 +798,7 @@ bool LLFloaterEditDayCycle::onSaveAnswer(const LLSD& notification, const LLSD& r void LLFloaterEditDayCycle::onSaveConfirmed() { +#if 0 std::string name = getSelectedDayCycle().name; // Save preset. @@ -799,7 +812,7 @@ void LLFloaterEditDayCycle::onSaveConfirmed() LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << LL_ENDL; LLEnvManagerNew::instance().setUseDayCycle(name); } - +#endif closeFloater(); } diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp index 715376cfa3..a779241cf4 100644 --- a/indra/newview/llfloatereditsky.cpp +++ b/indra/newview/llfloatereditsky.cpp @@ -59,10 +59,6 @@ namespace const F32 WL_CLOUD_SLIDER_SCALE(1.0f); } -// static F32 sun_pos_to_time24(F32 sun_pos) -// { -// return fmodf(sun_pos * 24.0f + 6, 24.0f); -// } static F32 time24_to_sun_pos(F32 time24) { @@ -129,7 +125,7 @@ void LLFloaterEditSky::onClose(bool app_quitting) { if (!app_quitting) // there's no point to change environment if we're quitting { - LLEnvironment::instance().clearAllSelected(); + LLEnvironment::instance().applyChosenEnvironment(); } } @@ -672,40 +668,28 @@ bool LLFloaterEditSky::onSaveAnswer(const LLSD& notification, const LLSD& respon void LLFloaterEditSky::onSaveConfirmed() { -#if 0 - // Save current params to the selected preset. - LLWLParamKey key(getSelectedSkyPreset()); + // Save currently displayed water params to the selected preset. + std::string name = mEditSettings->getName(); - LL_DEBUGS("Windlight") << "Saving sky preset " << key.name << LL_ENDL; - LLWLParamManager& wl_mgr = LLWLParamManager::instance(); - if (wl_mgr.hasParamSet(key)) - { - wl_mgr.setParamSet(key, wl_mgr.mCurParams); - } - else - { - wl_mgr.addParamSet(key, wl_mgr.mCurParams); - } + LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL; - wl_mgr.savePreset(key); + LLEnvironment::instance().addSky(mEditSettings); - // Change preference if requested. - if (mMakeDefaultCheckBox->getValue()) - { - LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << LL_ENDL; - LLEnvManagerNew::instance().setUseSkyPreset(key.name); - } + // Change preference if requested. + if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue()) + { + LL_DEBUGS("Windlight") << name << " is now the new preferred sky preset" << LL_ENDL; + LLEnvironment::instance().setUserSky(mEditSettings); + } - closeFloater(); -#endif + closeFloater(); } void LLFloaterEditSky::onBtnSave() { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - LLEnvironment::instance().addSky(psky); + LLEnvironment::instance().addSky(mEditSettings); + LLEnvironment::instance().setUserSky(mEditSettings); - LLEnvironment::instance().applySky(); closeFloater(); } diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp index 52c896d6aa..6b218d5008 100644 --- a/indra/newview/llfloatereditwater.cpp +++ b/indra/newview/llfloatereditwater.cpp @@ -111,7 +111,7 @@ void LLFloaterEditWater::onClose(bool app_quitting) { if (!app_quitting) // there's no point to change environment if we're quitting { - LLEnvironment::instance().clearAllSelected(); + LLEnvironment::instance().applyChosenEnvironment(); } } @@ -436,7 +436,6 @@ void LLFloaterEditWater::onWaterPresetSelected() bool LLFloaterEditWater::onSaveAnswer(const LLSD& notification, const LLSD& response) { -#if 0 S32 option = LLNotificationsUtil::getSelectedOption(notification, response); // If they choose save, do it. Otherwise, don't do anything @@ -444,46 +443,34 @@ bool LLFloaterEditWater::onSaveAnswer(const LLSD& notification, const LLSD& resp { onSaveConfirmed(); } -#endif - return false; + + return false; } void LLFloaterEditWater::onSaveConfirmed() { -#if 0 // Save currently displayed water params to the selected preset. - std::string name = getCurrentPresetName(); + std::string name = mEditSettings->getName(); LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL; - LLWaterParamManager& water_mgr = LLWaterParamManager::instance(); - if (water_mgr.hasParamSet(name)) - { - water_mgr.setParamSet(name, water_mgr.mCurParams); - } - else - { - water_mgr.addParamSet(name, water_mgr.mCurParams); - } - water_mgr.savePreset(name); + LLEnvironment::instance().addWater(mEditSettings); // Change preference if requested. if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue()) { LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << LL_ENDL; - LLEnvManagerNew::instance().setUseWaterPreset(name); + LLEnvironment::instance().setUserWater(mEditSettings); } closeFloater(); -#endif } void LLFloaterEditWater::onBtnSave() { - LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater(); - LLEnvironment::instance().addWater(pwater); + LLEnvironment::instance().addWater(mEditSettings); + LLEnvironment::instance().setUserWater(mEditSettings); - LLEnvironment::instance().applyWater(); closeFloater(); } diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp index eaef017f08..6908363839 100644 --- a/indra/newview/llfloaterenvironmentsettings.cpp +++ b/indra/newview/llfloaterenvironmentsettings.cpp @@ -65,16 +65,13 @@ BOOL LLFloaterEnvironmentSettings::postBuild() mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectDayCyclePreset, this)); childSetCommitCallback("ok_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnOK, this), NULL); - getChild<LLUICtrl>("ok_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance())); childSetCommitCallback("cancel_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnCancel, this), NULL); - getChild<LLUICtrl>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance())); setCloseCallback(boost::bind(&LLFloaterEnvironmentSettings::cancel, this)); LLEnvironment::instance().setSkyListChange(boost::bind(&LLFloaterEnvironmentSettings::populateSkyPresetsList, this)); LLEnvironment::instance().setWaterListChange(boost::bind(&LLFloaterEnvironmentSettings::populateWaterPresetsList, this)); LLEnvironment::instance().setDayCycleListChange(boost::bind(&LLFloaterEnvironmentSettings::populateDayCyclePresetsList, this)); -// LLEnvManagerNew::instance().setPreferencesChangeCallback(boost::bind(&LLFloaterEnvironmentSettings::refresh, this)); return TRUE; } @@ -89,7 +86,7 @@ void LLFloaterEnvironmentSettings::onOpen(const LLSD& key) void LLFloaterEnvironmentSettings::onClose(bool app_quitting) { if (!app_quitting) - LLEnvironment::instance().clearAllSelected(); + LLEnvironment::instance().applyChosenEnvironment(); } @@ -127,6 +124,41 @@ void LLFloaterEnvironmentSettings::onSelectDayCyclePreset() void LLFloaterEnvironmentSettings::onBtnOK() { + bool use_region_settings = mRegionSettingsRadioGroup->getSelectedIndex() == 0; + + if (use_region_settings) + { + LLEnvironment::instance().clearUserSettings(); + } + else + { + LLEnvironment::instance().clearUserSettings(); + + bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; + + if (!use_fixed_sky) + { + std::string day_cycle = mDayCyclePresetCombo->getValue().asString(); + LLSettingsDay::ptr_t day = LLEnvironment::instance().findDayCycleByName(day_cycle); + if (day) + { + LLEnvironment::instance().setDayFor(LLEnvironment::ENV_LOCAL, day); + } + } + else + { + std::string water_preset = mWaterPresetCombo->getValue().asString(); + std::string sky_preset = mSkyPresetCombo->getValue().asString(); + + LLSettingsSky::ptr_t sky = LLEnvironment::instance().findSkyByName(sky_preset); + LLSettingsWater::ptr_t water = LLEnvironment::instance().findWaterByName(water_preset); + + LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, sky); + LLEnvironment::instance().setWaterFor(LLEnvironment::ENV_LOCAL, water); + } + } + +#if 0 // Save and apply new user preferences. bool use_region_settings = mRegionSettingsRadioGroup->getSelectedIndex() == 0; bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; @@ -142,8 +174,8 @@ void LLFloaterEnvironmentSettings::onBtnOK() use_region_settings); // *TODO: This triggers applying user preferences again, which is suboptimal. - LLEnvironment::instance().applyAllSelected(); - closeFloater(); +#endif + closeFloater(); } void LLFloaterEnvironmentSettings::onBtnCancel() @@ -153,10 +185,13 @@ void LLFloaterEnvironmentSettings::onBtnCancel() void LLFloaterEnvironmentSettings::refresh() { - LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); + LLSettingsDay::ptr_t day = LLEnvironment::instance().getChosenDay(); + LLSettingsSky::ptr_t sky = LLEnvironment::instance().getChosenSky(); + LLSettingsWater::ptr_t water = LLEnvironment::instance().getChosenWater(); - bool use_region_settings = env_mgr.getUseRegionSettings(); - bool use_fixed_sky = env_mgr.getUseFixedSky(); + + bool use_region_settings = true; + bool use_fixed_sky = !day; // Set up radio buttons according to user preferences. mRegionSettingsRadioGroup->setSelectedIndex(use_region_settings ? 0 : 1); @@ -173,9 +208,18 @@ void LLFloaterEnvironmentSettings::refresh() mDayCyclePresetCombo->setEnabled(!use_fixed_sky); // Select the current presets in combo boxes. - mWaterPresetCombo->selectByValue(env_mgr.getWaterPresetName()); - mSkyPresetCombo->selectByValue(env_mgr.getSkyPresetName()); - mDayCyclePresetCombo->selectByValue(env_mgr.getDayCycleName()); + if (water) + mWaterPresetCombo->selectByValue(water->getName()); + else + mWaterPresetCombo->selectByValue(LLSD()); + if (sky) + mSkyPresetCombo->selectByValue(sky->getName()); + else + mSkyPresetCombo->selectByValue(LLSD()); + if (day) + mDayCyclePresetCombo->selectByValue(day->getName()); + else + mDayCyclePresetCombo->selectByValue(LLSD()); } void LLFloaterEnvironmentSettings::apply() @@ -183,14 +227,13 @@ void LLFloaterEnvironmentSettings::apply() // Update environment with the user choice. bool use_region_settings = mRegionSettingsRadioGroup->getSelectedIndex() == 0; bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; - std::string water_preset = mWaterPresetCombo->getValue()[0].asString(); - std::string sky_preset = mSkyPresetCombo->getValue()[0].asString(); - std::string day_cycle = mDayCyclePresetCombo->getValue()[0].asString(); + std::string water_preset = mWaterPresetCombo->getValue().asString(); + std::string sky_preset = mSkyPresetCombo->getValue().asString(); + std::string day_cycle = mDayCyclePresetCombo->getValue().asString(); - LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); if (use_region_settings) { - env_mgr.useRegionSettings(); + //env_mgr.useRegionSettings(); } else { @@ -202,12 +245,9 @@ void LLFloaterEnvironmentSettings::apply() } else { - LLSettingsDayCycle::ptr_t pday = LLEnvironment::instance().findDayCycleByName(day_cycle); + LLSettingsDay::ptr_t pday = LLEnvironment::instance().findDayCycleByName(day_cycle); if (pday) LLEnvironment::instance().selectDayCycle(pday, LLEnvironment::TRANSITION_FAST); - -// LLEnvironment::instance().selectDayCycle(day_cycle); -// env_mgr.useDayCycle(day_cycle, LLEnvKey::SCOPE_LOCAL); } LLSettingsWater::ptr_t pwater = LLEnvironment::instance().findWaterByName(water_preset); @@ -230,7 +270,7 @@ void LLFloaterEnvironmentSettings::populateWaterPresetsList() for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it) { - mWaterPresetCombo->add((*it).first, LLSDArray((*it).first)((*it).second)); + mWaterPresetCombo->add((*it).first, LLSD::String((*it).first)); // } } @@ -242,7 +282,7 @@ void LLFloaterEnvironmentSettings::populateSkyPresetsList() for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it) { - mSkyPresetCombo->add((*it).first, LLSDArray((*it).first)((*it).second)); + mSkyPresetCombo->add((*it).first, LLSD::String((*it).first)); } } @@ -254,6 +294,6 @@ void LLFloaterEnvironmentSettings::populateDayCyclePresetsList() for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it) { - mDayCyclePresetCombo->add((*it).first, LLSDArray((*it).first)((*it).second)); + mDayCyclePresetCombo->add((*it).first, LLSD::String((*it).first)); } } diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index af68a2aae1..4f0603fe59 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -53,7 +53,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldaycyclemanager.h" -#include "llenvmanager.h" #include "llestateinfomodel.h" #include "llfilepicker.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() @@ -99,6 +98,8 @@ #include "llpanelexperiences.h" #include "llcorehttputil.h" +#include "llenvmanager.h" + const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -3115,7 +3116,7 @@ BOOL LLPanelEnvironmentInfo::postBuild() mDayCyclePresetCombo = getChild<LLComboBox>("dayc_settings_preset_combo"); mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectDayCycle, this)); - childSetCommitCallback("apply_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this), NULL); + childSetCommitCallback("apply_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this), NULL); getChild<LLButton>("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance())); childSetCommitCallback("cancel_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnCancel, this), NULL); getChild<LLButton>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance())); @@ -3191,9 +3192,9 @@ void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) mRegionSettingsRadioGroup->setEnabled(enabled); mDayCycleSettingsRadioGroup->setEnabled(enabled); - mWaterPresetCombo->setEnabled(enabled); - mSkyPresetCombo->setEnabled(enabled); - mDayCyclePresetCombo->setEnabled(enabled); + mWaterPresetCombo->setEnabled(false); + mSkyPresetCombo->setEnabled(false); + mDayCyclePresetCombo->setEnabled(false); getChildView("apply_btn")->setEnabled(enabled); getChildView("cancel_btn")->setEnabled(enabled); @@ -3234,6 +3235,7 @@ void LLPanelEnvironmentInfo::setDirty(bool dirty) void LLPanelEnvironmentInfo::sendRegionSunUpdate() { +#if 0 LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); // If the region is being switched to fixed sky, @@ -3258,6 +3260,7 @@ void LLPanelEnvironmentInfo::sendRegionSunUpdate() LL_DEBUGS("Windlight Sync") << "Sun hour: " << region_info.mSunHour << LL_ENDL; region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice()); +#endif } void LLPanelEnvironmentInfo::fixEstateSun() @@ -3276,6 +3279,7 @@ void LLPanelEnvironmentInfo::fixEstateSun() void LLPanelEnvironmentInfo::populateWaterPresetsList() { +#if 0 mWaterPresetCombo->removeall(); // If the region already has water params, add them to the list. @@ -3308,10 +3312,12 @@ void LLPanelEnvironmentInfo::populateWaterPresetsList() } // There's no way to select current preset because its name is not stored on server. +#endif } void LLPanelEnvironmentInfo::populateSkyPresetsList() { +#if 0 mSkyPresetCombo->removeall(); LLWLParamManager::preset_name_list_t region_presets; @@ -3356,10 +3362,12 @@ void LLPanelEnvironmentInfo::populateSkyPresetsList() std::string preset_name = sky_map.beginMap()->first; mSkyPresetCombo->selectByValue(LLWLParamKey(preset_name, LLEnvKey::SCOPE_REGION).toStringVal()); } +#endif } void LLPanelEnvironmentInfo::populateDayCyclesList() { +#if 0 mDayCyclePresetCombo->removeall(); // If the region already has env. settings, add its day cycle to the list. @@ -3394,10 +3402,12 @@ void LLPanelEnvironmentInfo::populateDayCyclesList() } // Current day cycle is already selected. +#endif } bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params) { +#if 0 LLWLParamKey water_key(mWaterPresetCombo->getSelectedValue()); if (water_key.scope == LLEnvKey::SCOPE_REGION) @@ -3417,10 +3427,13 @@ bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params) } return true; +#endif + return false; } bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string& preset_name) { +#if 0 std::string preset_key(mSkyPresetCombo->getValue().asString()); LLWLParamKey preset(preset_key); @@ -3435,10 +3448,13 @@ bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string& sky_params = param_set.getAll(); preset_name = preset.name; return true; +#endif + return false; } bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sky_map, short& scope) { +#if 0 std::string preset_key(mDayCyclePresetCombo->getValue().asString()); LLWLParamKey dc(preset_key); LL_DEBUGS("Windlight") << "Use day cycle: " << dc.toLLSD() << LL_ENDL; @@ -3468,6 +3484,8 @@ bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sk scope = dc.scope; return true; +#endif + return false; } void LLPanelEnvironmentInfo::onSwitchRegionSettings() { @@ -3615,6 +3633,7 @@ void LLPanelEnvironmentInfo::onBtnApply() } } +#if 0 // Send settings apply request. LLEnvironmentSettings new_region_settings; new_region_settings.saveParams(day_cycle, sky_map, water_params, 0.0f); @@ -3627,6 +3646,7 @@ void LLPanelEnvironmentInfo::onBtnApply() // When the settings get applied, we'll also send the region sun position update. // To determine the sun angle we're going to need the new settings. mNewRegionSettings = new_region_settings; +#endif // Start spinning the progress indicator. setApplyProgress(true); @@ -3637,6 +3657,8 @@ void LLPanelEnvironmentInfo::onBtnCancel() // Reload last saved region settings. refresh(); +#if 0 + LLEnvironment::instance().applyChosenEnvironment(); // Apply them. LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); const LLEnvironmentSettings& cur_settings = env_mgr.getRegionSettings(); @@ -3644,6 +3666,7 @@ void LLPanelEnvironmentInfo::onBtnCancel() const LLSD& region_water = cur_settings.getWaterParams(); env_mgr.useWaterParams(region_water); env_mgr.useDayCycleParams(region_day_cycle, LLEnvKey::SCOPE_REGION); +#endif } void LLPanelEnvironmentInfo::onRegionSettingschange() diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index c9d0e51640..105280bd99 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -35,7 +35,6 @@ #include "llpanel.h" #include "llextendedstatus.h" -#include "llenvmanager.h" // for LLEnvironmentSettings #include "lleventcoro.h" class LLAvatarName; @@ -463,7 +462,7 @@ private: void onRegionSettingsApplied(bool ok); /// New environment settings that are being applied to the region. - LLEnvironmentSettings mNewRegionSettings; +// LLEnvironmentSettings mNewRegionSettings; bool mEnableEditing; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 11bc1425f9..c01a2fbf8a 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -44,7 +44,6 @@ // newview includes #include "llagent.h" -#include "llenvmanager.h" #include "llfloatersidepanelcontainer.h" #include "llinventoryobserver.h" #include "lllandmarkactions.h" diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp index 63d97f6ac2..0663dd41ee 100644 --- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -34,7 +34,6 @@ #include <boost/signals2.hpp> #include "llagent.h" -#include "llenvmanager.h" #include "llnotificationsutil.h" #include "llpathfindingmanager.h" #include "llpathfindingnavmesh.h" diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 6ecc4c7fb9..3795e043ba 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -33,7 +33,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldir.h" -#include "llenvmanager.h" #include "llexternaleditor.h" #include "llfilepicker.h" #include "llfloaterreg.h" diff --git a/indra/newview/llsettingsbase.h b/indra/newview/llsettingsbase.h index 533c9288fe..bf4053a4b1 100644 --- a/indra/newview/llsettingsbase.h +++ b/indra/newview/llsettingsbase.h @@ -44,7 +44,7 @@ class LLSettingsBase: private boost::noncopyable { friend class LLEnvironment; - friend class LLSettingsDayCycle; + friend class LLSettingsDay; public: static const std::string SETTING_ID; diff --git a/indra/newview/llsettingsdaycycle.cpp b/indra/newview/llsettingsdaycycle.cpp index f098acde02..da384304d6 100644 --- a/indra/newview/llsettingsdaycycle.cpp +++ b/indra/newview/llsettingsdaycycle.cpp @@ -69,12 +69,12 @@ namespace return 0; } - LLSettingsDayCycle::CycleTrack_t::iterator get_wrapping_atafter(LLSettingsDayCycle::CycleTrack_t &collection, F32 key) + LLSettingsDay::CycleTrack_t::iterator get_wrapping_atafter(LLSettingsDay::CycleTrack_t &collection, F32 key) { if (collection.empty()) return collection.end(); - LLSettingsDayCycle::CycleTrack_t::iterator it = collection.upper_bound(key); + LLSettingsDay::CycleTrack_t::iterator it = collection.upper_bound(key); if (it == collection.end()) { // wrap around @@ -84,12 +84,12 @@ namespace return it; } - LLSettingsDayCycle::CycleTrack_t::iterator get_wrapping_atbefore(LLSettingsDayCycle::CycleTrack_t &collection, F32 key) + LLSettingsDay::CycleTrack_t::iterator get_wrapping_atbefore(LLSettingsDay::CycleTrack_t &collection, F32 key) { if (collection.empty()) return collection.end(); - LLSettingsDayCycle::CycleTrack_t::iterator it = collection.lower_bound(key); + LLSettingsDay::CycleTrack_t::iterator it = collection.lower_bound(key); if (it == collection.end()) { // all keyframes are lower, take the last one. @@ -109,30 +109,30 @@ namespace } //========================================================================= -const std::string LLSettingsDayCycle::SETTING_DAYLENGTH("day_length"); -const std::string LLSettingsDayCycle::SETTING_KEYID("key_id"); -const std::string LLSettingsDayCycle::SETTING_KEYNAME("key_name"); -const std::string LLSettingsDayCycle::SETTING_KEYKFRAME("key_keyframe"); -const std::string LLSettingsDayCycle::SETTING_NAME("name"); -const std::string LLSettingsDayCycle::SETTING_TRACKS("tracks"); +const std::string LLSettingsDay::SETTING_DAYLENGTH("day_length"); +const std::string LLSettingsDay::SETTING_KEYID("key_id"); +const std::string LLSettingsDay::SETTING_KEYNAME("key_name"); +const std::string LLSettingsDay::SETTING_KEYKFRAME("key_keyframe"); +const std::string LLSettingsDay::SETTING_NAME("name"); +const std::string LLSettingsDay::SETTING_TRACKS("tracks"); //const S64 LLSettingsDayCycle::MINIMUM_DAYLENGTH( 300); // 5 mins -const S64 LLSettingsDayCycle::MINIMUM_DAYLENGTH( 14400); // 4 hours -const S64 LLSettingsDayCycle::MAXIMUM_DAYLENGTH(604800); // 7 days +const S64 LLSettingsDay::MINIMUM_DAYLENGTH( 14400); // 4 hours +const S64 LLSettingsDay::MAXIMUM_DAYLENGTH(604800); // 7 days -const S32 LLSettingsDayCycle::TRACK_WATER(0); // water track is 0 -const S32 LLSettingsDayCycle::TRACK_MAX(5); // 5 tracks, 4 skys, 1 water +const S32 LLSettingsDay::TRACK_WATER(0); // water track is 0 +const S32 LLSettingsDay::TRACK_MAX(5); // 5 tracks, 4 skys, 1 water //========================================================================= -LLSettingsDayCycle::LLSettingsDayCycle(const LLSD &data) : +LLSettingsDay::LLSettingsDay(const LLSD &data) : LLSettingsBase(data), mHasParsed(false) { mDayTracks.resize(TRACK_MAX); } -LLSettingsDayCycle::LLSettingsDayCycle() : +LLSettingsDay::LLSettingsDay() : LLSettingsBase(), mHasParsed(false) { @@ -140,7 +140,7 @@ LLSettingsDayCycle::LLSettingsDayCycle() : } //========================================================================= -LLSD LLSettingsDayCycle::defaults() +LLSD LLSettingsDay::defaults() { LLSD dfltsetting; @@ -153,7 +153,7 @@ LLSD LLSettingsDayCycle::defaults() return dfltsetting; } -LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings) +LLSettingsDay::ptr_t LLSettingsDay::buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings) { LLSD newsettings(defaults()); @@ -175,13 +175,13 @@ LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildFromLegacyPreset(const std::s newsettings[SETTING_TRACKS] = LLSDArray(watertrack)(skytrack); - LLSettingsDayCycle::ptr_t dayp = boost::make_shared<LLSettingsDayCycle>(newsettings); + LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsDay>(newsettings); dayp->parseFromLLSD(dayp->mSettings); return dayp; } -LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildFromLegacyMessage(const LLUUID ®ionId, LLSD daycycle, LLSD skydefs, LLSD waterdef) +LLSettingsDay::ptr_t LLSettingsDay::buildFromLegacyMessage(const LLUUID ®ionId, LLSD daycycle, LLSD skydefs, LLSD waterdef) { LLSettingsWater::ptr_t water = LLSettingsWater::buildFromLegacyPreset("Region", waterdef); LLEnvironment::namedSettingMap_t skys; @@ -195,7 +195,7 @@ LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildFromLegacyMessage(const LLUUI LL_WARNS("WindlightCaps") << "created region sky '" << name << "'" << LL_ENDL; } - LLSettingsDayCycle::ptr_t day = buildFromLegacyPreset("Region (legacy)", daycycle); + LLSettingsDay::ptr_t day = buildFromLegacyPreset("Region (legacy)", daycycle); day->setWaterAtKeyframe(water, 0.0f); @@ -218,17 +218,17 @@ LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildFromLegacyMessage(const LLUUI return day; } -LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildDefaultDayCycle() +LLSettingsDay::ptr_t LLSettingsDay::buildDefaultDayCycle() { - LLSD settings = LLSettingsDayCycle::defaults(); + LLSD settings = LLSettingsDay::defaults(); - LLSettingsDayCycle::ptr_t dayp = boost::make_shared<LLSettingsDayCycle>(settings); + LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsDay>(settings); dayp->parseFromLLSD(dayp->mSettings); return dayp; } -void LLSettingsDayCycle::parseFromLLSD(LLSD &data) +void LLSettingsDay::parseFromLLSD(LLSD &data) { LLEnvironment &environment(LLEnvironment::instance()); LLSD tracks = data[SETTING_TRACKS]; @@ -263,29 +263,29 @@ void LLSettingsDayCycle::parseFromLLSD(LLSD &data) } -LLSettingsDayCycle::ptr_t LLSettingsDayCycle::buildClone() +LLSettingsDay::ptr_t LLSettingsDay::buildClone() { LLSD settings = cloneSettings(); - LLSettingsDayCycle::ptr_t dayp = boost::make_shared<LLSettingsDayCycle>(settings); + LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsDay>(settings); return dayp; } -void LLSettingsDayCycle::blend(const LLSettingsBase::ptr_t &other, F32 mix) +void LLSettingsDay::blend(const LLSettingsBase::ptr_t &other, F32 mix) { LL_ERRS("DAYCYCLE") << "Day cycles are not blendable!" << LL_ENDL; } //========================================================================= -F32 LLSettingsDayCycle::secondsToKeyframe(S64Seconds seconds) +F32 LLSettingsDay::secondsToKeyframe(S64Seconds seconds) { S64Seconds daylength = getDayLength(); return llclamp(static_cast<F32>(seconds.value() % daylength.value()) / static_cast<F32>(daylength.value()), 0.0f, 1.0f); } -F64Seconds LLSettingsDayCycle::keyframeToSeconds(F32 keyframe) +F64Seconds LLSettingsDay::keyframeToSeconds(F32 keyframe) { S64Seconds daylength = getDayLength(); @@ -293,7 +293,7 @@ F64Seconds LLSettingsDayCycle::keyframeToSeconds(F32 keyframe) } //========================================================================= -void LLSettingsDayCycle::startDayCycle() +void LLSettingsDay::startDayCycle() { F64Seconds now(LLDate::now().secondsSinceEpoch()); @@ -320,7 +320,7 @@ void LLSettingsDayCycle::startDayCycle() mBlendedWater = LLSettingsWater::buildDefaultWater(); mWaterBlender = boost::make_shared<LLSettingsBlender>(mBlendedWater, (*bounds.first).second, (*bounds.second).second, timespan); - mWaterBlender->setOnFinished(boost::bind(&LLSettingsDayCycle::onWaterTransitionDone, this, _1)); + mWaterBlender->setOnFinished(boost::bind(&LLSettingsDay::onWaterTransitionDone, this, _1)); } // sky @@ -342,12 +342,12 @@ void LLSettingsDayCycle::startDayCycle() mBlendedSky = LLSettingsSky::buildDefaultSky(); mSkyBlender = boost::make_shared<LLSettingsBlender>(mBlendedSky, (*bounds.first).second, (*bounds.second).second, timespan); - mSkyBlender->setOnFinished(boost::bind(&LLSettingsDayCycle::onSkyTransitionDone, this, 1, _1)); + mSkyBlender->setOnFinished(boost::bind(&LLSettingsDay::onSkyTransitionDone, this, 1, _1)); } } -void LLSettingsDayCycle::updateSettings() +void LLSettingsDay::updateSettings() { static LLFrameTimer timer; @@ -418,14 +418,14 @@ void LLSettingsDayCycle::updateSettings() } //========================================================================= -void LLSettingsDayCycle::setDayLength(S64Seconds seconds) +void LLSettingsDay::setDayLength(S64Seconds seconds) { S32 val = llclamp(seconds.value(), MINIMUM_DAYLENGTH, MAXIMUM_DAYLENGTH); setValue(SETTING_DAYLENGTH, val); } -LLSettingsDayCycle::KeyframeList_t LLSettingsDayCycle::getTrackKeyframes(S32 trackno) +LLSettingsDay::KeyframeList_t LLSettingsDay::getTrackKeyframes(S32 trackno) { if ((trackno < 1) || (trackno >= TRACK_MAX)) { @@ -446,7 +446,7 @@ LLSettingsDayCycle::KeyframeList_t LLSettingsDayCycle::getTrackKeyframes(S32 tra return keyframes; } -LLSettingsDayCycle::TimeList_t LLSettingsDayCycle::getTrackTimes(S32 trackno) +LLSettingsDay::TimeList_t LLSettingsDay::getTrackTimes(S32 trackno) { KeyframeList_t keyframes = getTrackKeyframes(trackno); @@ -464,26 +464,26 @@ LLSettingsDayCycle::TimeList_t LLSettingsDayCycle::getTrackTimes(S32 trackno) return times; } -void LLSettingsDayCycle::setWaterAtTime(const LLSettingsWaterPtr_t &water, S64Seconds seconds) +void LLSettingsDay::setWaterAtTime(const LLSettingsWaterPtr_t &water, S64Seconds seconds) { F32 keyframe = secondsToKeyframe(seconds); setWaterAtKeyframe(water, keyframe); } -void LLSettingsDayCycle::setWaterAtKeyframe(const LLSettingsWaterPtr_t &water, F32 keyframe) +void LLSettingsDay::setWaterAtKeyframe(const LLSettingsWaterPtr_t &water, F32 keyframe) { mDayTracks[TRACK_WATER][llclamp(keyframe, 0.0f, 1.0f)] = water; setDirtyFlag(true); } -void LLSettingsDayCycle::setSkyAtTime(const LLSettingsSkyPtr_t &sky, S64Seconds seconds, S32 track) +void LLSettingsDay::setSkyAtTime(const LLSettingsSkyPtr_t &sky, S64Seconds seconds, S32 track) { F32 keyframe = secondsToKeyframe(seconds); setSkyAtKeyframe(sky, keyframe, track); } -void LLSettingsDayCycle::setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 keyframe, S32 track) +void LLSettingsDay::setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 keyframe, S32 track) { if ((track < 1) || (track >= TRACK_MAX)) { @@ -495,12 +495,12 @@ void LLSettingsDayCycle::setSkyAtKeyframe(const LLSettingsSkyPtr_t &sky, F32 key setDirtyFlag(true); } -LLSettingsDayCycle::TrackBound_t LLSettingsDayCycle::getBoundingEntries(LLSettingsDayCycle::CycleTrack_t &track, F32 keyframe) +LLSettingsDay::TrackBound_t LLSettingsDay::getBoundingEntries(LLSettingsDay::CycleTrack_t &track, F32 keyframe) { return TrackBound_t(get_wrapping_atbefore(track, keyframe), get_wrapping_atafter(track, keyframe)); } -LLSettingsDayCycle::TrackBound_t LLSettingsDayCycle::getBoundingEntries(LLSettingsDayCycle::CycleTrack_t &track, F64Seconds time) +LLSettingsDay::TrackBound_t LLSettingsDay::getBoundingEntries(LLSettingsDay::CycleTrack_t &track, F64Seconds time) { F32 frame = secondsToKeyframe(time); @@ -508,7 +508,7 @@ LLSettingsDayCycle::TrackBound_t LLSettingsDayCycle::getBoundingEntries(LLSettin } //========================================================================= -void LLSettingsDayCycle::onSkyTransitionDone(S32 track, const LLSettingsBlender::ptr_t &blender) +void LLSettingsDay::onSkyTransitionDone(S32 track, const LLSettingsBlender::ptr_t &blender) { F64Seconds now(LLDate::now().secondsSinceEpoch()); TrackBound_t bounds = getBoundingEntries(mDayTracks[track], now); @@ -522,10 +522,10 @@ void LLSettingsDayCycle::onSkyTransitionDone(S32 track, const LLSettingsBlender: mSkyBlender = boost::make_shared<LLSettingsBlender>(mBlendedSky, (*bounds.first).second, (*bounds.second).second, timespan); - mSkyBlender->setOnFinished(boost::bind(&LLSettingsDayCycle::onSkyTransitionDone, this, track, _1)); + mSkyBlender->setOnFinished(boost::bind(&LLSettingsDay::onSkyTransitionDone, this, track, _1)); } -void LLSettingsDayCycle::onWaterTransitionDone(const LLSettingsBlender::ptr_t &blender) +void LLSettingsDay::onWaterTransitionDone(const LLSettingsBlender::ptr_t &blender) { F64Seconds now(LLDate::now().secondsSinceEpoch()); TrackBound_t bounds = getBoundingEntries(mDayTracks[0], now); @@ -535,5 +535,5 @@ void LLSettingsDayCycle::onWaterTransitionDone(const LLSettingsBlender::ptr_t &b mWaterBlender = boost::make_shared<LLSettingsBlender>(mBlendedWater, (*bounds.first).second, (*bounds.second).second, timespan); - mWaterBlender->setOnFinished(boost::bind(&LLSettingsDayCycle::onWaterTransitionDone, this, _1)); + mWaterBlender->setOnFinished(boost::bind(&LLSettingsDay::onWaterTransitionDone, this, _1)); } diff --git a/indra/newview/llsettingsdaycycle.h b/indra/newview/llsettingsdaycycle.h index 5132ebeea5..ba3d592bd6 100644 --- a/indra/newview/llsettingsdaycycle.h +++ b/indra/newview/llsettingsdaycycle.h @@ -36,7 +36,7 @@ class LLSettingsSky; typedef boost::shared_ptr<LLSettingsWater> LLSettingsWaterPtr_t; typedef boost::shared_ptr<LLSettingsSky> LLSettingsSkyPtr_t; -class LLSettingsDayCycle : public LLSettingsBase +class LLSettingsDay : public LLSettingsBase { public: static const std::string SETTING_DAYLENGTH; @@ -54,14 +54,14 @@ public: typedef std::map<F32, LLSettingsBase::ptr_t> CycleTrack_t; typedef std::vector<CycleTrack_t> CycleList_t; - typedef boost::shared_ptr<LLSettingsDayCycle> ptr_t; + typedef boost::shared_ptr<LLSettingsDay> ptr_t; typedef std::vector<S64Seconds> TimeList_t; typedef std::vector<F32> KeyframeList_t; typedef std::pair<CycleTrack_t::iterator, CycleTrack_t::iterator> TrackBound_t; //--------------------------------------------------------------------- - LLSettingsDayCycle(const LLSD &data); - virtual ~LLSettingsDayCycle() { }; + LLSettingsDay(const LLSD &data); + virtual ~LLSettingsDay() { }; static ptr_t buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings); static ptr_t buildFromLegacyMessage(const LLUUID ®ionId, LLSD daycycle, LLSD skys, LLSD water); @@ -106,7 +106,7 @@ public: } protected: - LLSettingsDayCycle(); + LLSettingsDay(); virtual void updateSettings(); diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index 3ef89ba920..a961f0e3b4 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -51,7 +51,6 @@ #include "llvosky.h" #include "llcubemap.h" #include "llviewercontrol.h" -#include "llenvmanager.h" #include "llvowlsky.h" diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index bdb8d83e59..92b294678b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -197,7 +197,6 @@ #include "llcleanup.h" #include "llenvironment.h" -#include "llenvmanager.h" #include "llstacktrace.h" diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0ebacddd9b..c0fed2fff5 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -55,7 +55,6 @@ #include "llfloaterchatvoicevolume.h" #include "llfloaterconversationlog.h" #include "llfloaterconversationpreview.h" -#include "llfloaterdeleteenvpreset.h" #include "llfloaterdeleteprefpreset.h" #include "llfloaterdestinations.h" #include "llfloatereditdaycycle.h" @@ -222,7 +221,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>); LLFloaterReg::add("env_settings", "floater_environment_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvironmentSettings>); - LLFloaterReg::add("env_delete_preset", "floater_delete_env_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeleteEnvPreset>); LLFloaterReg::add("env_edit_sky", "floater_edit_sky_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditSky>); LLFloaterReg::add("env_edit_water", "floater_edit_water_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditWater>); LLFloaterReg::add("env_edit_day_cycle", "floater_edit_day_cycle.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditDayCycle>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8ce0eaf7dd..57eef7e776 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8394,32 +8394,30 @@ class LLWorldEnvSettings : public view_listener_t if (tod == "sunrise") { - LLEnvironment::instance().selectSky("Sunrise"); + LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunrise"); + LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky); } else if (tod == "noon") { - LLEnvironment::instance().selectSky("Midday"); - } + LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midday"); + LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky); + } else if (tod == "sunset") { - LLEnvironment::instance().selectSky("Sunset"); - } + LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunset"); + LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky); + } else if (tod == "midnight") { - LLEnvironment::instance().selectSky("Midnight"); - } + LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midnight"); + LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky); + } else { - LLEnvManagerNew &envmgr = LLEnvManagerNew::instance(); - // reset all environmental settings to track the region defaults, make this reset 'sticky' like the other sun settings. - bool use_fixed_sky = false; - bool use_region_settings = true; - envmgr.setUserPrefs(envmgr.getWaterPresetName(), - envmgr.getSkyPresetName(), - envmgr.getDayCycleName(), - use_fixed_sky, use_region_settings); + LLEnvironment::instance().clearUserSettings(); } - + + LLEnvironment::instance().applyChosenEnvironment(); return true; } }; @@ -8431,37 +8429,38 @@ class LLWorldEnableEnvSettings : public view_listener_t bool result = false; std::string tod = userdata.asString(); - if (LLEnvManagerNew::instance().getUseRegionSettings()) + LLSettingsSky::ptr_t sky = LLEnvironment::instance().getSkyFor(LLEnvironment::ENV_LOCAL); + + if (!sky) { return (tod == "region"); } - if (LLEnvManagerNew::instance().getUseFixedSky()) + std::string skyname = (sky) ? sky->getName() : ""; + + if (tod == "sunrise") { - if (tod == "sunrise") - { - result = (LLEnvironment::instance().getCurrentSky()->getName() == "Sunrise"); - } - else if (tod == "noon") - { - result = (LLEnvironment::instance().getCurrentSky()->getName() == "Midday"); - } - else if (tod == "sunset") - { - result = (LLEnvironment::instance().getCurrentSky()->getName() == "Sunset"); - } - else if (tod == "midnight") - { - result = (LLEnvironment::instance().getCurrentSky()->getName() == "Midnight"); - } - else if (tod == "region") - { - return false; - } - else - { - LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; - } + result = (skyname == "Sunrise"); + } + else if (tod == "noon") + { + result = (skyname == "Midday"); + } + else if (tod == "sunset") + { + result = (skyname == "Sunset"); + } + else if (tod == "midnight") + { + result = (skyname == "Midnight"); + } + else if (tod == "region") + { + return false; + } + else + { + LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; } return result; } @@ -8481,10 +8480,6 @@ class LLWorldEnvPreset : public view_listener_t { LLFloaterReg::showInstance("env_edit_water", "edit"); } - else if (item == "delete_water") - { - LLFloaterReg::showInstance("env_delete_preset", "water"); - } else if (item == "new_sky") { LLFloaterReg::showInstance("env_edit_sky", "new"); @@ -8493,10 +8488,6 @@ class LLWorldEnvPreset : public view_listener_t { LLFloaterReg::showInstance("env_edit_sky", "edit"); } - else if (item == "delete_sky") - { - LLFloaterReg::showInstance("env_delete_preset", "sky"); - } else if (item == "new_day_cycle") { LLFloaterReg::showInstance("env_edit_day_cycle", "new"); @@ -8505,10 +8496,6 @@ class LLWorldEnvPreset : public view_listener_t { LLFloaterReg::showInstance("env_edit_day_cycle", "edit"); } - else if (item == "delete_day_cycle") - { - LLFloaterReg::showInstance("env_delete_preset", "day_cycle"); - } else { LL_WARNS() << "Unknown item selected" << LL_ENDL; diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h index e2e49c7305..cbb12eb9b7 100644 --- a/indra/newview/llwlanimator.h +++ b/indra/newview/llwlanimator.h @@ -28,8 +28,9 @@ #define LL_WL_ANIMATOR_H #include "llwlparamset.h" -#include "llenvmanager.h" #include "llwaterparamset.h" +#include "llenvmanager.h" + #include <string> #include <map> diff --git a/indra/newview/llwldaycycle.h b/indra/newview/llwldaycycle.h index c8585564ed..aef999f3ec 100644 --- a/indra/newview/llwldaycycle.h +++ b/indra/newview/llwldaycycle.h @@ -35,7 +35,6 @@ class LLWLDayCycle; #include "llwlparamset.h" #include "llwlanimator.h" struct LLWLParamKey; -#include "llenvmanager.h" // for LLEnvKey::EScope class LLWLDayCycle { diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index c3543f051d..0e4017a1c0 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -30,7 +30,6 @@ #include "llagent.h" #include "llviewerregion.h" -#include "llenvmanager.h" #include "llnotificationsutil.h" #include "llcorehttputil.h" @@ -245,13 +244,13 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content) } LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << result["regionID"].asUUID() << LL_ENDL; - LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true); + //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true); } while (false); if (!notify.isUndefined()) { LLNotificationsUtil::add("WLRegionApplyFail", notify); - LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false); + //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false); } } diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index f7f4baee12..d475a26da6 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -34,6 +34,7 @@ #include "llwldaycycle.h" #include "llviewercamera.h" #include "lltrans.h" +#include "llenvmanager.h" class LLGLSLShader; diff --git a/indra/newview/skins/default/xui/de/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/de/floater_delete_env_preset.xml deleted file mode 100644 index cc14ce640d..0000000000 --- a/indra/newview/skins/default/xui/de/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="UMGEB.VOREINST. LÖSCHEN"> - <string name="title_water"> - Wasser-Voreinstellung löschen - </string> - <string name="title_sky"> - Himmel-Voreinstellung löschen - </string> - <string name="title_day_cycle"> - Tageszyklus löschen - </string> - <string name="label_water"> - Voreinstellung: - </string> - <string name="label_sky"> - Voreinstellung: - </string> - <string name="label_day_cycle"> - Tageszyklus: - </string> - <string name="msg_confirm_deletion"> - Möchten Sie die ausgewählte Voreinstellung wirklich löschen? - </string> - <string name="msg_sky_is_referenced"> - Eine Voreinstellung, auf die sich ein Tageszyklus bezieht, kann nicht gelöscht werden. - </string> - <string name="combo_label"> - -Voreinstellung auswählen- - </string> - <text name="label"> - Voreinstellung: - </text> - <button label="Löschen" name="delete"/> - <button label="Abbrechen" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 5feedef965..6233d511cb 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="Wasser-Voreinstellungen" name="Water Presets"> <menu_item_call label="Neue Voreinstellung..." name="new_water_preset"/> <menu_item_call label="Voreinstellung bearbeiten..." name="edit_water_preset"/> - <menu_item_call label="Voreinstellung löschen..." name="delete_water_preset"/> </menu> <menu label="Himmel-Voreinstellungen" name="Sky Presets"> <menu_item_call label="Neue Voreinstellung..." name="new_sky_preset"/> <menu_item_call label="Voreinstellung bearbeiten..." name="edit_sky_preset"/> - <menu_item_call label="Voreinstellung löschen..." name="delete_sky_preset"/> </menu> <menu label="Tag-Voreinstellungen" name="Day Presets"> <menu_item_call label="Neue Voreinstellung..." name="new_day_preset"/> <menu_item_call label="Voreinstellung bearbeiten..." name="edit_day_preset"/> - <menu_item_call label="Voreinstellung löschen..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml deleted file mode 100644 index b5de4166f6..0000000000 --- a/indra/newview/skins/default/xui/en/floater_delete_env_preset.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<floater - legacy_header_height="18" - height="130" - help_topic="" - layout="topleft" - name="Delete Env Preset" - save_rect="true" - title="DELETE ENV PRESET" - width="550"> - - <string name="title_water">Delete Water Preset</string> - <string name="title_sky">Delete Sky Preset</string> - <string name="title_day_cycle">Delete Day Cycle</string> - - <string name="label_water">Preset:</string> - <string name="label_sky">Preset:</string> - <string name="label_day_cycle">Day cycle:</string> - - <string name="msg_confirm_deletion">Are you sure you want to delete the selected preset?</string> - <string name="msg_sky_is_referenced">Cannot remove a preset that is referenced by some day cycle(s).</string> - - <string name="combo_label">-Select a preset-</string> - - <text - follows="top|left|right" - font="SansSerif" - height="10" - layout="topleft" - left="50" - name="label" - top="60" - width="60"> - Preset: - </text> - <combo_box - follows="top|left" - layout="topleft" - left_pad="10" - name="preset_combo" - top_delta="-5" - width="200"/> - <button - follows="bottom|right" - height="23" - label="Delete" - layout="topleft" - left_pad="15" - name="delete" - width="70"/> - <button - follows="bottom|right" - height="23" - label="Cancel" - layout="topleft" - left_pad="5" - name="cancel" - width="70"/> -</floater> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 92511167c0..551b643dab 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -731,16 +731,6 @@ function="World.EnvPreset" parameter="edit_water"/> </menu_item_call> - <menu_item_call - label="Delete preset..." - name="delete_water_preset"> - <menu_item_call.on_click - function="World.EnvPreset" - parameter="delete_water"/> - <menu_item_call.on_enable - function="World.EnableEnvPreset" - parameter="delete_water"/> - </menu_item_call> </menu> <menu @@ -760,16 +750,6 @@ function="World.EnvPreset" parameter="edit_sky"/> </menu_item_call> - <menu_item_call - label="Delete preset..." - name="delete_sky_preset"> - <menu_item_call.on_click - function="World.EnvPreset" - parameter="delete_sky"/> - <menu_item_call.on_enable - function="World.EnableEnvPreset" - parameter="delete_sky"/> - </menu_item_call> </menu> <menu @@ -789,16 +769,6 @@ function="World.EnvPreset" parameter="edit_day_cycle"/> </menu_item_call> - <menu_item_call - label="Delete preset..." - name="delete_day_preset"> - <menu_item_call.on_click - function="World.EnvPreset" - parameter="delete_day_cycle"/> - <menu_item_call.on_enable - function="World.EnableEnvPreset" - parameter="delete_day_cycle"/> - </menu_item_call> </menu> </menu> diff --git a/indra/newview/skins/default/xui/es/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/es/floater_delete_env_preset.xml deleted file mode 100644 index 5e7df8530e..0000000000 --- a/indra/newview/skins/default/xui/es/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="ELIMINAR EL ENV PREDEFINIDO"> - <string name="title_water"> - Eliminar el agua predefinida - </string> - <string name="title_sky"> - Eliminar cielo predefinido - </string> - <string name="title_day_cycle"> - Eliminar ciclo del día - </string> - <string name="label_water"> - Predefinido: - </string> - <string name="label_sky"> - Predefinido: - </string> - <string name="label_day_cycle"> - Ciclo del día: - </string> - <string name="msg_confirm_deletion"> - ¿Estás seguro de que quieres eliminar el valor predefinido seleccionado? - </string> - <string name="msg_sky_is_referenced"> - No se puede quitar un valor predefinido al que se hace referencia en otro u otros ciclos del día. - </string> - <string name="combo_label"> - -Selecciona un valor predefinido- - </string> - <text name="label"> - Predefinido: - </text> - <button label="Borrar" name="delete"/> - <button label="Cancelar" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 447dd2629c..e4ba007221 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="Agua predefinida" name="Water Presets"> <menu_item_call label="Nuevo predefinido..." name="new_water_preset"/> <menu_item_call label="Editar predefinido..." name="edit_water_preset"/> - <menu_item_call label="Eliminar predefinido..." name="delete_water_preset"/> </menu> <menu label="Cielos predefinidos" name="Sky Presets"> <menu_item_call label="Nuevo predefinido..." name="new_sky_preset"/> <menu_item_call label="Editar predefinido..." name="edit_sky_preset"/> - <menu_item_call label="Eliminar predefinido..." name="delete_sky_preset"/> </menu> <menu label="Días predefinidos" name="Day Presets"> <menu_item_call label="Nuevo predefinido..." name="new_day_preset"/> <menu_item_call label="Editar predefinido..." name="edit_day_preset"/> - <menu_item_call label="Eliminar predefinido..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/fr/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/fr/floater_delete_env_preset.xml deleted file mode 100644 index 035bdbe5f3..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="SUPPRIMER PRÉRÉGLAGE ENV."> - <string name="title_water"> - Supprimer un préréglage de l'eau - </string> - <string name="title_sky"> - Supprimer un préréglage du ciel - </string> - <string name="title_day_cycle"> - Supprimer un cycle du jour - </string> - <string name="label_water"> - Préréglage : - </string> - <string name="label_sky"> - Préréglage : - </string> - <string name="label_day_cycle"> - Cycle du jour : - </string> - <string name="msg_confirm_deletion"> - Voulez-vous vraiment supprimer le préréglage sélectionné ? - </string> - <string name="msg_sky_is_referenced"> - Impossible de supprimer un préréglage référencé dans un ou plusieurs cycles du jour. - </string> - <string name="combo_label"> - -Effectuer une sélection- - </string> - <text name="label"> - Préréglage : - </text> - <button label="Supprimer" name="delete"/> - <button label="Annuler" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 04fa85d488..4594d7edb8 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="Préréglages de l'eau" name="Water Presets"> <menu_item_call label="Nouveau préréglage..." name="new_water_preset"/> <menu_item_call label="Modifier un préréglage..." name="edit_water_preset"/> - <menu_item_call label="Supprimer un préréglage..." name="delete_water_preset"/> </menu> <menu label="Préréglages du ciel" name="Sky Presets"> <menu_item_call label="Nouveau préréglage..." name="new_sky_preset"/> <menu_item_call label="Modifier un préréglage..." name="edit_sky_preset"/> - <menu_item_call label="Supprimer un préréglage..." name="delete_sky_preset"/> </menu> <menu label="Préréglages du jour" name="Day Presets"> <menu_item_call label="Nouveau préréglage..." name="new_day_preset"/> <menu_item_call label="Modifier un préréglage..." name="edit_day_preset"/> - <menu_item_call label="Supprimer un préréglage..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/it/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/it/floater_delete_env_preset.xml deleted file mode 100644 index 71071825af..0000000000 --- a/indra/newview/skins/default/xui/it/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="CANCELLA PREDEFINITO AMB"> - <string name="title_water"> - Cancella valore predefinito acqua - </string> - <string name="title_sky"> - Cancella valore predefinito cielo - </string> - <string name="title_day_cycle"> - Cancella ciclo giornata - </string> - <string name="label_water"> - Valori predefiniti: - </string> - <string name="label_sky"> - Valori predefiniti: - </string> - <string name="label_day_cycle"> - Ciclo giornata: - </string> - <string name="msg_confirm_deletion"> - Sei sicuro di volere eliminare il valore predefinito selezionato? - </string> - <string name="msg_sky_is_referenced"> - Impossibile rimuovere un valore predefinito che viene utilizzato in uno o più cicli di giornata. - </string> - <string name="combo_label"> - -Seleziona un valore predefinito- - </string> - <text name="label"> - Valori predefiniti: - </text> - <button label="Elimina" name="delete"/> - <button label="Annulla" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 607171d9be..f66b0dd501 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="Valori predefiniti acqua" name="Water Presets"> <menu_item_call label="Nuovo valore predefinito..." name="new_water_preset"/> <menu_item_call label="Modifica valore predefinito..." name="edit_water_preset"/> - <menu_item_call label="Cancella valore predefinito..." name="delete_water_preset"/> </menu> <menu label="Valori predefiniti cielo" name="Sky Presets"> <menu_item_call label="Nuovo valore predefinito..." name="new_sky_preset"/> <menu_item_call label="Modifica valore predefinito..." name="edit_sky_preset"/> - <menu_item_call label="Cancella valore predefinito..." name="delete_sky_preset"/> </menu> <menu label="Valori predefiniti giorno" name="Day Presets"> <menu_item_call label="Nuovo valore predefinito..." name="new_day_preset"/> <menu_item_call label="Modifica valore predefinito..." name="edit_day_preset"/> - <menu_item_call label="Cancella valore predefinito..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/ja/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/ja/floater_delete_env_preset.xml deleted file mode 100644 index eb39d1b336..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="環境の事前設定を削除"> - <string name="title_water"> - 水の事前設定を削除 - </string> - <string name="title_sky"> - 空の事前設定を削除 - </string> - <string name="title_day_cycle"> - デイサイクルを削除 - </string> - <string name="label_water"> - 事前設定: - </string> - <string name="label_sky"> - 事前設定: - </string> - <string name="label_day_cycle"> - デイサイクル: - </string> - <string name="msg_confirm_deletion"> - 選択された事前設定を削除しますか? - </string> - <string name="msg_sky_is_referenced"> - デイサイクルの参照先として使われている事前設定は削除できません。 - </string> - <string name="combo_label"> - - 事前設定を選択 - - </string> - <text name="label"> - 事前設定: - </text> - <button label="削除" name="delete"/> - <button label="取り消し" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 9154f327c1..fc4fd9121d 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="水の事前設定" name="Water Presets"> <menu_item_call label="新しい事前設定..." name="new_water_preset"/> <menu_item_call label="事前設定を編集..." name="edit_water_preset"/> - <menu_item_call label="事前設定を削除..." name="delete_water_preset"/> </menu> <menu label="空の事前設定" name="Sky Presets"> <menu_item_call label="新しい事前設定..." name="new_sky_preset"/> <menu_item_call label="事前設定を編集..." name="edit_sky_preset"/> - <menu_item_call label="事前設定を削除..." name="delete_sky_preset"/> </menu> <menu label="デイの事前設定" name="Day Presets"> <menu_item_call label="新しい事前設定..." name="new_day_preset"/> <menu_item_call label="事前設定を編集..." name="edit_day_preset"/> - <menu_item_call label="事前設定を削除..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/pl/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/pl/floater_delete_env_preset.xml deleted file mode 100644 index fc750715c6..0000000000 --- a/indra/newview/skins/default/xui/pl/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<floater name="Delete Env Preset" title="USUŃ UST. OTOCZENIA"> - <string name="title_water"> - Usuń Ustawienie wody - </string> - <string name="title_sky"> - Usuń Ustawienie nieba - </string> - <string name="title_day_cycle"> - Usuń cykl dnia - </string> - <string name="label_water"> - Wybierz: - </string> - <string name="label_sky"> - Wybierz: - </string> - <string name="label_day_cycle"> - Cykl dnia: - </string> - <string name="msg_confirm_deletion"> - Masz absolutną pewność, że chcesz usunąć wybrane Ustawienie? - </string> - <string name="msg_sky_is_referenced"> - Nie można usunąć Ustawienia odwołującego się do jakiegoś cyklu dnia. - </string> - <string name="combo_label"> - -Wybierz Ustawienie- - </string> - <text name="label"> - Wybierz: - </text> - <button label="Usuń" name="delete" /> - <button label="Anuluj" name="cancel" /> -</floater> diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index e6ad1faee6..5190723660 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -84,17 +84,14 @@ <menu name="Water Presets" label="Ustawienia wody"> <menu_item_call label="Nowe Ustawienie..." name="new_water_preset" /> <menu_item_call label="Edytuj Ustawienie..." name="edit_water_preset" /> - <menu_item_call label="Usuń Ustawienie..." name="delete_water_preset" /> </menu> <menu name="Sky Presets" label="Ustawienia nieba"> <menu_item_call label="Nowe Ustawienie..." name="new_sky_preset" /> <menu_item_call label="Edytuj Ustawienie..." name="edit_sky_preset" /> - <menu_item_call label="Usuń Ustawienie..." name="delete_sky_preset" /> </menu> <menu name="Day Presets" label="Ustawienia pory dnia"> <menu_item_call label="Nowe Ustawienie..." name="new_day_preset" /> <menu_item_call label="Edytuj Ustawienie..." name="edit_day_preset" /> - <menu_item_call label="Usuń Ustawienie..." name="delete_day_preset" /> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/pt/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/pt/floater_delete_env_preset.xml deleted file mode 100644 index a8b5d8f67d..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="EXCLUIR CONF AMBIENTE"> - <string name="title_water"> - Excluir pré-configuração da água - </string> - <string name="title_sky"> - Excluir pré-configuração de céu - </string> - <string name="title_day_cycle"> - Excluir pré-configuração dos dias - </string> - <string name="label_water"> - Pré-configuração: - </string> - <string name="label_sky"> - Pré-configuração: - </string> - <string name="label_day_cycle"> - Ciclo dia: - </string> - <string name="msg_confirm_deletion"> - Tem certeza de que quer excluir esta pré-configuração? - </string> - <string name="msg_sky_is_referenced"> - Impossível excluir pré-configuração utilizada por um ou mais ciclos de dia . - </string> - <string name="combo_label"> - -Selecione uma pré-configuração- - </string> - <text name="label"> - Pré-configuração: - </text> - <button label="Excluir" name="delete"/> - <button label="Cancelar" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index cef0f02070..7ca6ad86ee 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -89,17 +89,14 @@ <menu label="Predefinições da água" name="Water Presets"> <menu_item_call label="Nova predefinição..." name="new_water_preset"/> <menu_item_call label="Editar predefinição..." name="edit_water_preset"/> - <menu_item_call label="Excluir predefinição..." name="delete_water_preset"/> </menu> <menu label="Predefinições de céu" name="Sky Presets"> <menu_item_call label="Nova predefinição..." name="new_sky_preset"/> <menu_item_call label="Editar predefinição..." name="edit_sky_preset"/> - <menu_item_call label="Excluir predefinição..." name="delete_sky_preset"/> </menu> <menu label="Predefinições do dia" name="Day Presets"> <menu_item_call label="Nova predefinição..." name="new_day_preset"/> <menu_item_call label="Editar predefinição..." name="edit_day_preset"/> - <menu_item_call label="Excluir predefinição..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/ru/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/ru/floater_delete_env_preset.xml deleted file mode 100644 index 3303a4f4c1..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="УДАЛЕНИЕ НАСТРОЙКИ СРЕДЫ"> - <string name="title_water"> - Удалить настройку воды - </string> - <string name="title_sky"> - Удалить настройку неба - </string> - <string name="title_day_cycle"> - Удалить суточный цикл - </string> - <string name="label_water"> - Настройка: - </string> - <string name="label_sky"> - Настройка: - </string> - <string name="label_day_cycle"> - Суточный цикл: - </string> - <string name="msg_confirm_deletion"> - Действительно удалить выбранную настройку? - </string> - <string name="msg_sky_is_referenced"> - Нельзя удалить настройку, которая используется в суточных циклах. - </string> - <string name="combo_label"> - -Выбор настройки- - </string> - <text name="label"> - Настройка: - </text> - <button label="Удалить" name="delete"/> - <button label="Отмена" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index 309253213c..ec7925f858 100644 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -87,17 +87,14 @@ <menu label="Настройки воды" name="Water Presets"> <menu_item_call label="Создать настройку..." name="new_water_preset"/> <menu_item_call label="Изменить настройку..." name="edit_water_preset"/> - <menu_item_call label="Удалить настройку..." name="delete_water_preset"/> </menu> <menu label="Настройки неба" name="Sky Presets"> <menu_item_call label="Создать настройку..." name="new_sky_preset"/> <menu_item_call label="Изменить настройку..." name="edit_sky_preset"/> - <menu_item_call label="Удалить настройку..." name="delete_sky_preset"/> </menu> <menu label="Суточные настройки" name="Day Presets"> <menu_item_call label="Создать настройку..." name="new_day_preset"/> <menu_item_call label="Изменить настройку..." name="edit_day_preset"/> - <menu_item_call label="Удалить настройку..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/tr/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/tr/floater_delete_env_preset.xml deleted file mode 100644 index 915770f727..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="ORTAM ÖN AYARINI SİL"> - <string name="title_water"> - Su Ön Ayarını Sil - </string> - <string name="title_sky"> - Gökyüzü Ön Ayarını Sil - </string> - <string name="title_day_cycle"> - Gün Döngüsünü Sil - </string> - <string name="label_water"> - Ön Ayar: - </string> - <string name="label_sky"> - Ön Ayar: - </string> - <string name="label_day_cycle"> - Gün döngüsü: - </string> - <string name="msg_confirm_deletion"> - Seçili ön ayarı silmek istediğinize emin misiniz? - </string> - <string name="msg_sky_is_referenced"> - Bazı gün döngüleri tarafından başvurulan bir ön ayar kaldırılamaz. - </string> - <string name="combo_label"> - -Bir ön ayar seçin- - </string> - <text name="label"> - Ön Ayar: - </text> - <button label="Sil" name="delete"/> - <button label="İptal" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index ad134c717e..7b041c943c 100644 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -87,17 +87,14 @@ <menu label="Su Ön Ayarları" name="Water Presets"> <menu_item_call label="Yeni ön ayar..." name="new_water_preset"/> <menu_item_call label="Ön ayarı düzenle..." name="edit_water_preset"/> - <menu_item_call label="Ön ayarı sil..." name="delete_water_preset"/> </menu> <menu label="Gökyüzü Ön Ayarları" name="Sky Presets"> <menu_item_call label="Yeni ön ayar..." name="new_sky_preset"/> <menu_item_call label="Ön ayarı düzenle..." name="edit_sky_preset"/> - <menu_item_call label="Ön ayarı sil..." name="delete_sky_preset"/> </menu> <menu label="Gün Ön Ayarları" name="Day Presets"> <menu_item_call label="Yeni ön ayar..." name="new_day_preset"/> <menu_item_call label="Ön ayarı düzenle..." name="edit_day_preset"/> - <menu_item_call label="Ön ayarı sil..." name="delete_day_preset"/> </menu> </menu> </menu> diff --git a/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml b/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml deleted file mode 100644 index 4aafb31952..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_delete_env_preset.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<floater name="Delete Env Preset" title="刪除環境自訂配置"> - <string name="title_water"> - 刪除水的自訂配置 - </string> - <string name="title_sky"> - 刪除天空自訂配置 - </string> - <string name="title_day_cycle"> - 刪除日循環 - </string> - <string name="label_water"> - 自訂配置: - </string> - <string name="label_sky"> - 自訂配置: - </string> - <string name="label_day_cycle"> - 日循環: - </string> - <string name="msg_confirm_deletion"> - 確定要刪除所選自訂配置? - </string> - <string name="msg_sky_is_referenced"> - 無法刪除日循環有所指涉的自訂配置。 - </string> - <string name="combo_label"> - -選擇一個自訂配置- - </string> - <text name="label"> - 自訂配置: - </text> - <button label="刪除" name="delete"/> - <button label="取消" name="cancel"/> -</floater> diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index 433e34758a..4c53d2be19 100644 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -87,17 +87,14 @@ <menu label="水的自訂配置" name="Water Presets"> <menu_item_call label="新的自訂配置…" name="new_water_preset"/> <menu_item_call label="編輯自訂配置…" name="edit_water_preset"/> - <menu_item_call label="刪除自訂配置…" name="delete_water_preset"/> </menu> <menu label="天空自訂配置" name="Sky Presets"> <menu_item_call label="新的自訂配置…" name="new_sky_preset"/> <menu_item_call label="編輯自訂配置…" name="edit_sky_preset"/> - <menu_item_call label="刪除自訂配置…" name="delete_sky_preset"/> </menu> <menu label="日的自訂配置" name="Day Presets"> <menu_item_call label="新的自訂配置…" name="new_day_preset"/> <menu_item_call label="編輯自訂配置…" name="edit_day_preset"/> - <menu_item_call label="刪除自訂配置…" name="delete_day_preset"/> </menu> </menu> </menu> |