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.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 15d4d30221..2de00ec457 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1,6 +1,6 @@
/**
* @file llfloaterpreference.cpp
- * @brief LLPreferenceCore class implementation
+ * @brief Global preferences with and without persistence.
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
@@ -89,9 +89,10 @@ LLFloaterPreference* LLFloaterPreference::sInstance = NULL;
class LLPreferencesHandler : public LLCommandHandler
{
public:
- // don't allow from external browsers
- LLPreferencesHandler() : LLCommandHandler("preferences", false) { }
- bool handle(const LLSD& tokens, const LLSD& queryMap)
+ // requires trusted browser
+ LLPreferencesHandler() : LLCommandHandler("preferences", true) { }
+ bool handle(const LLSD& tokens, const LLSD& query_map,
+ LLWebBrowserCtrl* web)
{
LLFloaterPreference::show(NULL);
return true;
@@ -259,6 +260,7 @@ void LLPreferenceCore::apply()
mInputPanel->apply();
mNetworkPanel->apply();
mDisplayPanel->apply();
+ mAudioPanel->apply();
mPrefsChat->apply();
mPrefsVoice->apply();
mPrefsIM->apply();
@@ -477,6 +479,7 @@ void LLFloaterPreference::onBtnApply( void* userdata )
void LLFloaterPreference::onClose(bool app_quitting)
{
LLPanelLogin::setAlwaysRefresh(false);
+ cancel(); // will be a no-op if OK or apply was performed just prior.
LLFloater::onClose(app_quitting);
}
@@ -493,8 +496,7 @@ void LLFloaterPreference::onBtnCancel( void* userdata )
cur_focus->onCommit();
}
}
- fp->cancel();
- fp->close();
+ fp->close(); // side effect will also cancel any unsaved changes.
}