From 307d94a92aa2111b05b7ab327685d1b2d79b68f3 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 25 Jan 2010 17:20:09 +0200 Subject: implemented EXT-4131 [BSI] "Only friends and groups can call or IM me" NEEDS auto-response added a modal warning window "Non-friends won't know that you've choosen to ignore their calls and instant messages." --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index fc036cb354..27d0ccff4b 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1435,6 +1435,7 @@ BOOL LLPanelPreference::postBuild() media_enabled_ctrl->set(enabled); media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled)); getChild("autoplay_enabled")->setEnabled(enabled); + getChild("voice_call_friends_only_check")->setCommitCallback(showFriendsOnlyWarning); } apply(); @@ -1485,6 +1486,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(); -- cgit v1.2.3 From c4cb6628b995fb785848493e263e607263ae68fd Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 25 Jan 2010 17:50:19 +0200 Subject: fixed linux build --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 27d0ccff4b..60c15c253d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1435,7 +1435,7 @@ BOOL LLPanelPreference::postBuild() media_enabled_ctrl->set(enabled); media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled)); getChild("autoplay_enabled")->setEnabled(enabled); - getChild("voice_call_friends_only_check")->setCommitCallback(showFriendsOnlyWarning); + getChild("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); } apply(); -- cgit v1.2.3 From af83fe79d8d074d3056e6dff86dcf14d8e71c885 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 25 Jan 2010 10:04:56 -0800 Subject: "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"). --- indra/newview/llfloaterpreference.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'indra/newview/llfloaterpreference.cpp') 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("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("autoplay_enabled")->setEnabled(enabled); +} + +void LLFloaterPreference::onCommitMusicEnabled() +{ + LLCheckBoxCtrl *music_enabled_ctrl = getChild("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("media_enabled"); - media_enabled_ctrl->set(enabled); - media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled)); - getChild("autoplay_enabled")->setEnabled(enabled); + getChild("media_enabled")->set(media_enabled); + getChild("autoplay_enabled")->setEnabled(media_enabled); + } + if (hasChild("music_enabled")) + { + getChild("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic")); } apply(); -- cgit v1.2.3