diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-11-08 16:38:13 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-11-08 16:38:13 +0200 |
commit | 1c2ab8938bd61097e85ea0ef90ef28c89edbee33 (patch) | |
tree | 9e19c91225858124d7b6961310339e66b9d41dcc /indra/newview/llfloaterpreference.cpp | |
parent | c75d443c8359f0bceee2df2adc0a67b2890922ea (diff) |
SL-12186 WIP Revert Preferences changes
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 28e77deec2..63d3b75c00 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -839,17 +839,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) exceptions_btn->setEnabled(started); } - LLButton* load_camera_btn = findChild<LLButton>("PrefCameraLoadButton"); - LLButton* save_camera_btn = findChild<LLButton>("PrefCameraSaveButton"); - LLButton* delete_camera_btn = findChild<LLButton>("PrefCameraDeleteButton"); - - if (load_camera_btn && save_camera_btn && delete_camera_btn) - { - load_camera_btn->setEnabled(started); - save_camera_btn->setEnabled(started); - delete_camera_btn->setEnabled(started); - } - collectSearchableItems(); if (!mFilterEdit->getText().empty()) { @@ -2308,11 +2297,6 @@ void LLFloaterPreference::changed() } -void LLFloaterPreference::saveCameraPreset(std::string& preset) -{ - mSavedCameraPreset = preset; -} - void LLFloaterPreference::saveGraphicsPreset(std::string& preset) { mSavedGraphicsPreset = preset; @@ -2694,82 +2678,6 @@ private: static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy"); -static LLPanelInjector<LLPanelPreferenceView> t_pref_view("panel_preference_view"); - -BOOL LLPanelPreferenceView::postBuild() -{ - setPresetText(); - - LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); - if (presetsMgr) - { - presetsMgr->setPresetListChangeCameraCallback(boost::bind(&LLPanelPreferenceView::onPresetsListChangeCamera, this)); - presetsMgr->createMissingDefault(PRESETS_CAMERA); // a no-op after the first time, but that's ok - } - - return LLPanelPreference::postBuild(); -} - -void LLPanelPreferenceView::onPresetsListChangeCamera() -{ - LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); - if (presetsMgr) - { - presetsMgr->setCameraDirty(false); - } - - setPresetText(); - - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if (instance && !gSavedSettings.getString("PresetCameraActive").empty()) - { - instance->saveSettings(); //make cancel work correctly after changing the preset - } -} - -void LLPanelPreferenceView::draw() -{ - setPresetText(); - LLPanelPreference::draw(); -} - -void LLPanelPreferenceView::setPresetText() -{ - LLTextBox* preset_text = getChild<LLTextBox>("preset_camera_text"); - - std::string preset_camera_active = gSavedSettings.getString("PresetCameraActive"); - - if (!preset_camera_active.empty() && preset_camera_active != preset_text->getText()) - { - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if (instance) - { - instance->saveCameraPreset(preset_camera_active); - } - } - - LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); - if (presetsMgr) - { - if (presetsMgr->isCameraDirty() && !preset_camera_active.empty()) - { - preset_camera_active.clear(); - } - } - - if (!preset_camera_active.empty()) - { - if (preset_camera_active == PRESETS_DEFAULT) - { - preset_camera_active = LLTrans::getString(PRESETS_DEFAULT); - } - preset_text->setText(preset_camera_active); - } - else - { - preset_text->setText(LLTrans::getString("none_paren_cap")); - } -} BOOL LLPanelPreferenceGraphics::postBuild() { |