diff options
author | Graham Linden <graham@lindenlab.com> | 2019-03-12 08:56:26 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-03-12 08:56:26 -0700 |
commit | ac2fc3029f3b9b6ba182949c29a7919f2f87eb02 (patch) | |
tree | c5ed54db8fc7400e4acebed1d3f069092123bbd4 /indra/newview/llfloatersaveprefpreset.cpp | |
parent | 3e560022459bf3534b873a7f6499dfb5eb75a7d9 (diff) |
Backout tabs v spaces changes.
'warn-on-failure:no-tabs'
Diffstat (limited to 'indra/newview/llfloatersaveprefpreset.cpp')
-rw-r--r-- | indra/newview/llfloatersaveprefpreset.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
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<LLFloaterPreference>("preferences"); - if (preferences) - { - preferences->addDependentFloater(this); - } - getChild<LLComboBox>("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); - getChild<LLComboBox>("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); - getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this)); - getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnCancel, this)); - - LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetsListChange, this)); - - mSaveButton = getChild<LLButton>("save"); - mPresetCombo = getChild<LLComboBox>("preset_combo"); - - return TRUE; + LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); + if (preferences) + { + preferences->addDependentFloater(this); + } + getChild<LLComboBox>("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); + getChild<LLComboBox>("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this)); + getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this)); + getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnCancel, this)); + + LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetsListChange, this)); + + mSaveButton = getChild<LLButton>("save"); + mPresetCombo = getChild<LLComboBox>("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(); } |