summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-03-01 18:09:04 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-03-01 18:09:04 -0800
commit1147cb1afbc21e1251614895844e95bca9b6b5bc (patch)
treeda01f6c0e6b61a7c0637a371c946ea69b46f9dff /indra/newview/llfloaterpreference.cpp
parentb11a625e6ff89470d25273fa426ed13f7abc4a6a (diff)
parent0600083891ab5b2c6a79097f65945bcb2d049bed (diff)
Automated merge from trunk
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 63b7c8ac5d..410e2fed4a 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));
@@ -335,6 +336,10 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));
+ gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));
+
+ gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));
+
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
tabcontainer->selectFirstTab();
@@ -532,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
@@ -1208,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)