From ac2fc3029f3b9b6ba182949c29a7919f2f87eb02 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 12 Mar 2019 08:56:26 -0700 Subject: Backout tabs v spaces changes. 'warn-on-failure:no-tabs' --- indra/newview/llfloatersaveprefpreset.cpp | 86 +++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'indra/newview/llfloatersaveprefpreset.cpp') diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index 149451c8c4..bae7602566 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -37,78 +37,78 @@ #include "lltrans.h" LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key) -: LLFloater(key) +: LLFloater(key) { } // virtual BOOL LLFloaterSavePrefPreset::postBuild() { - LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); - if (preferences) - { - preferences->addDependentFloater(this); - } - getChild("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); - getChild("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); - getChild("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this)); - getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnCancel, this)); - - LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetsListChange, this)); - - mSaveButton = getChild("save"); - mPresetCombo = getChild("preset_combo"); - - return TRUE; + LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); + if (preferences) + { + preferences->addDependentFloater(this); + } + getChild("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); + getChild("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); + getChild("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this)); + getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnCancel, this)); + + LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetsListChange, this)); + + mSaveButton = getChild("save"); + mPresetCombo = getChild("preset_combo"); + + return TRUE; } void LLFloaterSavePrefPreset::onPresetNameEdited() { - // Disable saving a preset having empty name. - std::string name = mPresetCombo->getSimple(); + // Disable saving a preset having empty name. + std::string name = mPresetCombo->getSimple(); - mSaveButton->setEnabled(!name.empty()); + mSaveButton->setEnabled(!name.empty()); } void LLFloaterSavePrefPreset::onOpen(const LLSD& key) { - mSubdirectory = key.asString(); + mSubdirectory = key.asString(); - std::string floater_title = getString(std::string("title_") + mSubdirectory); + std::string floater_title = getString(std::string("title_") + mSubdirectory); - setTitle(floater_title); + setTitle(floater_title); - EDefaultOptions option = DEFAULT_HIDE; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); + EDefaultOptions option = DEFAULT_HIDE; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); - onPresetNameEdited(); + onPresetNameEdited(); } void LLFloaterSavePrefPreset::onBtnSave() { - std::string name = mPresetCombo->getSimple(); - - if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (name == PRESETS_DEFAULT)) - { - LLNotificationsUtil::add("DefaultPresetNotSaved"); - } - else if (!LLPresetsManager::getInstance()->savePreset(mSubdirectory, name)) - { - LLSD args; - args["NAME"] = name; - LLNotificationsUtil::add("PresetNotSaved", args); - } - - closeFloater(); + std::string name = mPresetCombo->getSimple(); + + if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (name == PRESETS_DEFAULT)) + { + LLNotificationsUtil::add("DefaultPresetNotSaved"); + } + else if (!LLPresetsManager::getInstance()->savePreset(mSubdirectory, name)) + { + LLSD args; + args["NAME"] = name; + LLNotificationsUtil::add("PresetNotSaved", args); + } + + closeFloater(); } void LLFloaterSavePrefPreset::onPresetsListChange() { - EDefaultOptions option = DEFAULT_HIDE; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); + EDefaultOptions option = DEFAULT_HIDE; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); } void LLFloaterSavePrefPreset::onBtnCancel() { - closeFloater(); + closeFloater(); } -- cgit v1.2.3