summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-01-25 10:04:56 -0800
committerRick Pasetto <rick@lindenlab.com>2010-01-25 10:04:56 -0800
commitaf83fe79d8d074d3056e6dff86dcf14d8e71c885 (patch)
tree1da419e6de99ad09961ca6d9e5ad5da4d3d2a7e9 /indra/newview/llfloaterpreference.cpp
parent7094921d1f235ff45cc5b3ef58b64c2812c8676f (diff)
"Fix" confusion over media settings
Review #89 This implements the changes Sam wanted in order to reduce the confusion over media enabled-ness, in particular: - "Media Enabled" pref now only controls "AudioStreamingMedia" - No more "tentative" state - New "Music Enabled" pref - First run dialog controls Media and Music (Sam, this is a change from your request...I think it works better) - Put a reflection of the "Media Enabled" checkbox in the Nearby Media Floater - Get rid of the "AudioStreamingVideo" setting altogether (whatever used it, it should now obey "AudioStreamingMedia").
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index fc036cb354..eeda3f133c 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -327,6 +327,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this));
mCommitCallbackRegistrar.add("Pref.MediaEnabled", boost::bind(&LLFloaterPreference::onCommitMediaEnabled, this));
+ mCommitCallbackRegistrar.add("Pref.MusicEnabled", boost::bind(&LLFloaterPreference::onCommitMusicEnabled, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
@@ -1001,12 +1002,14 @@ void LLFloaterPreference::onCommitMediaEnabled()
{
LLCheckBoxCtrl *media_enabled_ctrl = getChild<LLCheckBoxCtrl>("media_enabled");
bool enabled = media_enabled_ctrl->get();
- gSavedSettings.setBOOL("AudioStreamingVideo", enabled);
- gSavedSettings.setBOOL("AudioStreamingMusic", enabled);
gSavedSettings.setBOOL("AudioStreamingMedia", enabled);
- media_enabled_ctrl->setTentative(false);
- // Update enabled state of the "autoplay" checkbox
- getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(enabled);
+}
+
+void LLFloaterPreference::onCommitMusicEnabled()
+{
+ LLCheckBoxCtrl *music_enabled_ctrl = getChild<LLCheckBoxCtrl>("music_enabled");
+ bool enabled = music_enabled_ctrl->get();
+ gSavedSettings.setBOOL("AudioStreamingMusic", enabled);
}
void LLFloaterPreference::refresh()
@@ -1424,17 +1427,15 @@ BOOL LLPanelPreference::postBuild()
}
//////////////////////PanelPrivacy ///////////////////
- if(hasChild("media_enabled"))
+ if (hasChild("media_enabled"))
{
- bool video_enabled = gSavedSettings.getBOOL("AudioStreamingVideo");
- bool music_enabled = gSavedSettings.getBOOL("AudioStreamingMusic");
bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
- bool enabled = video_enabled || music_enabled || media_enabled;
-
- LLCheckBoxCtrl *media_enabled_ctrl = getChild<LLCheckBoxCtrl>("media_enabled");
- media_enabled_ctrl->set(enabled);
- media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled));
- getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(enabled);
+ getChild<LLCheckBoxCtrl>("media_enabled")->set(media_enabled);
+ getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(media_enabled);
+ }
+ if (hasChild("music_enabled"))
+ {
+ getChild<LLCheckBoxCtrl>("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic"));
}
apply();