diff options
author | angela <angela@lindenlab.com> | 2010-02-26 16:02:33 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2010-02-26 16:02:33 +0800 |
commit | 75e5441f2da7252749174db70719a78637bc4eeb (patch) | |
tree | 09f6019e2b8a9c467b884ff9e7a2ed03c7e7a2a5 /indra/newview/llfloaterpreference.cpp | |
parent | e2b347c235e5fb92ef9941be57e049df4bf34168 (diff) | |
parent | 9f079954af9ca80498bf6953d65cc7e77e956f26 (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index fb7e757c43..780393a9c0 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -323,7 +323,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); - + mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + sSkin = gSavedSettings.getString("SkinCurrent"); gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); @@ -536,6 +537,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) { childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel()); childSetVisible("maturity_desired_combobox", false); + + // Display selected maturity icons. + onChangeMaturity(); } // Enabled/disabled popups, might have been changed by user actions @@ -1212,7 +1216,19 @@ void LLFloaterPreference::applyResolution() refresh(); } +void LLFloaterPreference::onChangeMaturity() +{ + U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); + getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG + || sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); +} void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) |