diff options
author | James Cook <james@lindenlab.com> | 2010-02-03 14:13:56 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-03 14:13:56 -0800 |
commit | 88350edbcbec615f3b15fc82bd5ce4005621ac6f (patch) | |
tree | c244f41159cf32f3e03c6c311e1453bbd383bad5 /indra/newview/llfloaterpreference.cpp | |
parent | d489216b6ef41f0d22f3a9062ba6daacc67bc038 (diff) | |
parent | 0bee31de32cb5999e7ec06d74f55d34ce0ac052b (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index fc036cb354..ef444c8ba4 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() @@ -1204,7 +1207,7 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im childEnable("log_nearby_chat"); childEnable("log_instant_messages"); childEnable("show_timestamps_check_im"); - childEnable("log_path_string"); + childDisable("log_path_string");// LineEditor becomes readonly in this case. childEnable("log_path_button"); std::string display_email(email); @@ -1424,17 +1427,16 @@ 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>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); + 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(); @@ -1485,6 +1487,14 @@ void LLPanelPreference::saveSettings() } } +void LLPanelPreference::showFriendsOnlyWarning(LLUICtrl* checkbox, const LLSD& value) +{ + if (checkbox && checkbox->getValue()) + { + LLNotificationsUtil::add("FriendsAndGroupsOnly"); + } +} + void LLPanelPreference::cancel() { for (control_values_map_t::iterator iter = mSavedValues.begin(); |