summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
committerMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
commite1d8dac25a93db837c780428a23f81cbf9109270 (patch)
treea0bcaec0cec1ba6b3ce813764650eada61fcde4f /indra/newview/llfloaterpreference.cpp
parent9c0dbb123376608e464fcd8d1a2e288e01d78a3f (diff)
svn merge -r105329:105903 svn+ssh://svn/svn/linden/branches/featurettes/featurettes-batch4-merge
Resolving QAR-1051 Merge featurettes batch #4
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.
}