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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 8ea5519929..fbc3275b1e 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -304,6 +304,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.RememberedUsernames", boost::bind(&LLFloaterPreference::onClickRememberedUsernames, this));
mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this));
mCommitCallbackRegistrar.add("Pref.Advanced", boost::bind(&LLFloaterPreference::onClickAdvanced, this));
+ mCommitCallbackRegistrar.add("Pref.MouseDown", boost::bind(&LLFloaterPreference::onUICtrlMouseDown, this));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -1782,6 +1783,23 @@ void LLFloaterPreference::updateSearchableItems()
mSearchDataDirty = true;
}
+void LLFloaterPreference::onUICtrlMouseDown()
+{
+ static LLCachedControl<bool> use_auto_adjust(gSavedSettings,"AutoFPS");
+ if (use_auto_adjust)
+ {
+ LLNotificationsUtil::add("AutoFPSConfirmDisable", LLSD(), LLSD(),
+ [this](const LLSD&notif, const LLSD&resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ gSavedSettings.setBOOL("AutoFPS", FALSE);
+ }
+ });
+ }
+}
+
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{
LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));