diff options
| author | Jonathan Yap <jhwelch@gmail.com> | 2014-12-14 19:17:52 -0500 |
|---|---|---|
| committer | Jonathan Yap <jhwelch@gmail.com> | 2014-12-14 19:17:52 -0500 |
| commit | 8f5ddebf0abfbcf73f25313214b06b98f2c7889c (patch) | |
| tree | 8cf6b0026748b93f03793961f0f1ccf4def20343 /indra/newview/llfloaterpreference.cpp | |
| parent | c655ae00a1e9d3540a9280181766bd4f646e1cce (diff) | |
STORM-2082 Remove ugly list of control names. Instead, obtain the list from the View data
Remove a few remants used by the old hardware floater
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
| -rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 814e552027..9df7f82275 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -340,7 +340,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); - mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this)); mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this)); mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this)); mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this)); @@ -788,6 +787,42 @@ void LLFloaterPreference::setHardwareDefaults() LLPresetsManager::getInstance()->savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT); } +void LLFloaterPreference::getControlNames(std::vector<std::string>& names) +{ + LLView* view = findChild<LLView>("display"); + if (view) + { + std::list<LLView*> stack; + stack.push_back(view); + while(!stack.empty()) + { + // Process view on top of the stack + LLView* curview = stack.front(); + stack.pop_front(); + + LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview); + if (ctrl) + { + LLControlVariable* control = ctrl->getControlVariable(); + if (control) + { + std::string control_name = control->getName(); + if (std::find(names.begin(), names.end(), control_name) == names.end()) + { + names.push_back(control_name); + } + } + } + + for (child_list_t::const_iterator iter = curview->getChildList()->begin(); + iter != curview->getChildList()->end(); ++iter) + { + stack.push_back(*iter); + } + } + } +} + //virtual void LLFloaterPreference::onClose(bool app_quitting) { @@ -799,11 +834,6 @@ void LLFloaterPreference::onClose(bool app_quitting) } } -void LLFloaterPreference::onOpenHardwareSettings() -{ - LLFloater* floater = LLFloaterReg::showInstance("prefs_hardware_settings"); - addDependentFloater(floater, FALSE); -} // static void LLFloaterPreference::onBtnOK() { |
