summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp53
1 files changed, 45 insertions, 8 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7aff9fb586..4eb2814dfb 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -530,13 +530,6 @@ void LLFloaterPreference::onDoNotDisturbResponseChanged()
LLFloaterPreference::~LLFloaterPreference()
{
- // clean up user data
- LLComboBox* ctrl_window_size = getChild<LLComboBox>("windowsize combo");
- for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++)
- {
- ctrl_window_size->setCurrentByIndex(i);
- }
-
LLConversationLog::instance().removeObserver(this);
}
@@ -811,6 +804,17 @@ void LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable()
refreshEnabledGraphics();
}
+void LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable()
+{
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->refresh();
+ }
+
+ refreshEnabledGraphics();
+}
+
void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics()
{
refreshEnabledState();
@@ -1351,6 +1355,13 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
ctrl_ssao->setEnabled(enabled);
ctrl_dof->setEnabled(enabled);
+#if USE_ADVANCED_ATMOSPHERICS
+ LLCheckBoxCtrl* ctrl_advanced_atmo = getChild<LLCheckBoxCtrl>("UseAdvancedAtmo");
+
+ bool advanced_atmo_enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseAdvancedAtmospherics");
+ ctrl_advanced_atmo->setEnabled(advanced_atmo_enabled);
+#endif
+
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
ctrl_shadow->setEnabled(enabled);
@@ -2323,12 +2334,21 @@ BOOL LLPanelPreference::postBuild()
{
getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2));
}
+ if (hasChild("allow_multiple_viewer_check", TRUE))
+ {
+ getChild<LLCheckBoxCtrl>("allow_multiple_viewer_check")->setCommitCallback(boost::bind(&showMultipleViewersWarning, _1, _2));
+ }
if (hasChild("favorites_on_login_check", TRUE))
{
getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setCommitCallback(boost::bind(&handleFavoritesOnLoginChanged, _1, _2));
bool show_favorites_at_login = LLPanelLogin::getShowFavorites();
getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setValue(show_favorites_at_login);
}
+ if (hasChild("mute_chb_label", TRUE))
+ {
+ getChild<LLTextBox>("mute_chb_label")->setShowCursorHand(false);
+ getChild<LLTextBox>("mute_chb_label")->setClickedCallback(boost::bind(&toggleMuteWhenMinimized));
+ }
//////////////////////PanelAdvanced ///////////////////
if (hasChild("modifier_combo", TRUE))
@@ -2418,6 +2438,14 @@ void LLPanelPreference::saveSettings()
}
}
+void LLPanelPreference::showMultipleViewersWarning(LLUICtrl* checkbox, const LLSD& value)
+{
+ if (checkbox && checkbox->getValue())
+ {
+ LLNotificationsUtil::add("AllowMultipleViewers");
+ }
+}
+
void LLPanelPreference::showFriendsOnlyWarning(LLUICtrl* checkbox, const LLSD& value)
{
if (checkbox && checkbox->getValue())
@@ -2438,6 +2466,12 @@ void LLPanelPreference::handleFavoritesOnLoginChanged(LLUICtrl* checkbox, const
}
}
+void LLPanelPreference::toggleMuteWhenMinimized()
+{
+ std::string mute("MuteWhenMinimized");
+ gSavedSettings.setBOOL(mute, !gSavedSettings.getBOOL(mute));
+}
+
void LLPanelPreference::cancel()
{
for (control_values_map_t::iterator iter = mSavedValues.begin();
@@ -2724,7 +2758,10 @@ void LLPanelPreferenceGraphics::setHardwareDefaults()
LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const LLSD& key)
: LLFloater(key)
{
- mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onVertexShaderEnable, this));
+#if USE_ADVANCED_ATMOSPHERICS
+ mCommitCallbackRegistrar.add("Pref.AdvancedAtmosphericsEnable", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable, this));
+#endif
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxNonImpostors", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxNonImpostors,this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity,this));
}