From dfa5ade487e82eb7c853edccf2ccfeddcf1f0732 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 15 Jan 2010 11:10:49 -0800 Subject: Remove crufty and unused volume up/down controls --- indra/newview/llpanelprimmediacontrols.cpp | 16 ---------------- indra/newview/llpanelprimmediacontrols.h | 2 -- 2 files changed, 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 4f539f404d..2dc3a62637 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -160,8 +160,6 @@ BOOL LLPanelPrimMediaControls::postBuild() mSkipBackCtrl = getChild("skip_back"); mVolumeCtrl = getChild("media_volume"); mMuteBtn = getChild("media_mute_button"); - mVolumeUpCtrl = getChild("volume_up"); - mVolumeDownCtrl = getChild("volume_down"); mVolumeSliderCtrl = getChild("volume_slider"); mWhitelistIcon = getChild("media_whitelist_flag"); mSecureLockIcon = getChild("media_secure_lock_flag"); @@ -339,8 +337,6 @@ void LLPanelPrimMediaControls::updateShape() mMediaAddressCtrl->setVisible(has_focus && !mini_controls); mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls); mVolumeCtrl->setVisible(false); - mVolumeUpCtrl->setVisible(false); - mVolumeDownCtrl->setVisible(false); mWhitelistIcon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false); // Disable zoom if HUD @@ -373,8 +369,6 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setEnabled(has_focus && !mini_controls); mVolumeCtrl->setVisible(has_focus); - mVolumeUpCtrl->setVisible(has_focus); - mVolumeDownCtrl->setVisible(has_focus); mVolumeCtrl->setEnabled(has_focus); mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); @@ -417,21 +411,15 @@ void LLPanelPrimMediaControls::updateShape() // video vloume if(volume <= 0.0) { - mVolumeUpCtrl->setEnabled(TRUE); - mVolumeDownCtrl->setEnabled(FALSE); mMuteBtn->setToggleState(true); } else if (volume >= 1.0) { - mVolumeUpCtrl->setEnabled(FALSE); - mVolumeDownCtrl->setEnabled(TRUE); mMuteBtn->setToggleState(false); } else { mMuteBtn->setToggleState(false); - mVolumeUpCtrl->setEnabled(TRUE); - mVolumeDownCtrl->setEnabled(TRUE); } switch(result) @@ -476,12 +464,8 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setEnabled(FALSE); mVolumeCtrl->setVisible(FALSE); - mVolumeUpCtrl->setVisible(FALSE); - mVolumeDownCtrl->setVisible(FALSE); mVolumeSliderCtrl->setVisible(FALSE); mVolumeCtrl->setEnabled(FALSE); - mVolumeUpCtrl->setEnabled(FALSE); - mVolumeDownCtrl->setEnabled(FALSE); mVolumeSliderCtrl->setEnabled(FALSE); if (mMediaPanelScroll) diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 419f033628..743cec70a1 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -156,8 +156,6 @@ private: LLUICtrl *mMediaPlaySliderCtrl; LLUICtrl *mVolumeCtrl; LLButton *mMuteBtn; - LLUICtrl *mVolumeUpCtrl; - LLUICtrl *mVolumeDownCtrl; LLSliderCtrl *mVolumeSliderCtrl; LLIconCtrl *mWhitelistIcon; LLIconCtrl *mSecureLockIcon; -- cgit v1.2.3 From 315c381d804ccad4039e193ebd0cdc1b8d2ddec1 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 15 Jan 2010 12:01:57 -0800 Subject: FIX EXT-3957: add "Media Enabled" checkbox to Privacy Prefs review http://codereview.lindenlab.com/271074 --- indra/newview/llfloaterpreference.cpp | 35 ++++++++++++++++------ indra/newview/llfloaterpreference.h | 1 + .../default/xui/en/panel_preferences_privacy.xml | 17 +++++++++-- 3 files changed, 42 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9af37e8174..a545190546 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -326,6 +326,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2)); 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.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)); @@ -994,16 +995,18 @@ void LLFloaterPreference::onCommitParcelMediaAutoPlayEnable() gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, autoplay); lldebugs << "autoplay now = " << int(autoplay) << llendl; +} - if (autoplay) - { - // autoplay toggle has gone from FALSE to TRUE; ensure that - // the media system is thus actually turned on too. - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); - gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); - gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); - llinfos << "autoplay turned on, turned all media subsystems on" << llendl; - } +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::refresh() @@ -1419,6 +1422,20 @@ BOOL LLPanelPreference::postBuild() refresh(); } + //////////////////////PanelPrivacy /////////////////// + 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); + } + apply(); return true; } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index b2bc34231d..2591b0ff68 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -133,6 +133,7 @@ public: void onCommitAutoDetectAspect(); void onCommitParcelMediaAutoPlayEnable(); + void onCommitMediaEnabled(); void applyResolution(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 1c1e17eb5a..a8e24366f2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -77,10 +77,23 @@ name="cookies_enabled" top_pad="10" width="350" /> - + + + Date: Fri, 15 Jan 2010 13:38:47 -0800 Subject: get rid of 'min_width' from