From 3afaa799628c74abdd1542514bc3852432c3925b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 15 Jan 2018 11:40:32 -0500 Subject: STORM-2145 Fixed bug. Now you can only have one of the load/save/delete floaters open at once. --- indra/newview/llfloaterloadprefpreset.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterloadprefpreset.cpp') diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp index 403db35cc0..fa17a9d40e 100644 --- a/indra/newview/llfloaterloadprefpreset.cpp +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -42,7 +42,8 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) // virtual BOOL LLFloaterLoadPrefPreset::postBuild() -{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); +{ + LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); if (preferences) { preferences->addDependentFloater(this); -- cgit v1.2.3 From 3e560022459bf3534b873a7f6499dfb5eb75a7d9 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 11 Mar 2019 08:11:09 -0700 Subject: Tabs -> spaces. --- indra/newview/llfloaterloadprefpreset.cpp | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'indra/newview/llfloaterloadprefpreset.cpp') diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp index fa17a9d40e..0584bf7e09 100644 --- a/indra/newview/llfloaterloadprefpreset.cpp +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -36,57 +36,57 @@ #include "llviewercontrol.h" LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) -: LLFloater(key) +: LLFloater(key) { } // virtual BOOL LLFloaterLoadPrefPreset::postBuild() { - LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); - if (preferences) - { - preferences->addDependentFloater(this); - } - getChild("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this)); - getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); - LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); - - return TRUE; + LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); + if (preferences) + { + preferences->addDependentFloater(this); + } + getChild("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this)); + getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); + LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); + + return TRUE; } void LLFloaterLoadPrefPreset::onOpen(const LLSD& key) { - mSubdirectory = key.asString(); - std::string floater_title = getString(std::string("title_") + mSubdirectory); + mSubdirectory = key.asString(); + std::string floater_title = getString(std::string("title_") + mSubdirectory); - setTitle(floater_title); + setTitle(floater_title); - LLComboBox* combo = getChild("preset_combo"); + LLComboBox* combo = getChild("preset_combo"); - EDefaultOptions option = DEFAULT_TOP; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); } void LLFloaterLoadPrefPreset::onPresetsListChange() { - LLComboBox* combo = getChild("preset_combo"); + LLComboBox* combo = getChild("preset_combo"); - EDefaultOptions option = DEFAULT_TOP; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); } void LLFloaterLoadPrefPreset::onBtnCancel() { - closeFloater(); + closeFloater(); } void LLFloaterLoadPrefPreset::onBtnOk() { - LLComboBox* combo = getChild("preset_combo"); - std::string name = combo->getSimple(); + LLComboBox* combo = getChild("preset_combo"); + std::string name = combo->getSimple(); - LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name); + LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name); - closeFloater(); + closeFloater(); } -- cgit v1.2.3 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/llfloaterloadprefpreset.cpp | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'indra/newview/llfloaterloadprefpreset.cpp') diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp index 0584bf7e09..fa17a9d40e 100644 --- a/indra/newview/llfloaterloadprefpreset.cpp +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -36,57 +36,57 @@ #include "llviewercontrol.h" LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) -: LLFloater(key) +: LLFloater(key) { } // virtual BOOL LLFloaterLoadPrefPreset::postBuild() { - LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); - if (preferences) - { - preferences->addDependentFloater(this); - } - getChild("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this)); - getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); - LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); - - return TRUE; + LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance("preferences"); + if (preferences) + { + preferences->addDependentFloater(this); + } + getChild("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this)); + getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); + LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); + + return TRUE; } void LLFloaterLoadPrefPreset::onOpen(const LLSD& key) { - mSubdirectory = key.asString(); - std::string floater_title = getString(std::string("title_") + mSubdirectory); + mSubdirectory = key.asString(); + std::string floater_title = getString(std::string("title_") + mSubdirectory); - setTitle(floater_title); + setTitle(floater_title); - LLComboBox* combo = getChild("preset_combo"); + LLComboBox* combo = getChild("preset_combo"); - EDefaultOptions option = DEFAULT_TOP; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); } void LLFloaterLoadPrefPreset::onPresetsListChange() { - LLComboBox* combo = getChild("preset_combo"); + LLComboBox* combo = getChild("preset_combo"); - EDefaultOptions option = DEFAULT_TOP; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); } void LLFloaterLoadPrefPreset::onBtnCancel() { - closeFloater(); + closeFloater(); } void LLFloaterLoadPrefPreset::onBtnOk() { - LLComboBox* combo = getChild("preset_combo"); - std::string name = combo->getSimple(); + LLComboBox* combo = getChild("preset_combo"); + std::string name = combo->getSimple(); - LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name); + LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name); - closeFloater(); + closeFloater(); } -- cgit v1.2.3