diff options
| -rw-r--r-- | indra/newview/llfloaterpreference.cpp | 35 | ||||
| -rw-r--r-- | indra/newview/llfloaterpreference.h | 1 | ||||
| -rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llpanelprimmediacontrols.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 17 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 10 | 
6 files changed, 42 insertions, 39 deletions
| diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 87ee7b8498..fc036cb354 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<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::refresh() @@ -1420,6 +1423,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<LLCheckBoxCtrl>("media_enabled");	 +		media_enabled_ctrl->set(enabled); +		media_enabled_ctrl->setTentative(!(video_enabled == music_enabled == media_enabled)); +		getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(enabled); +	} +	  	apply();  	return true;  } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index b7ddc1fe64..6f382620ee 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/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<LLUICtrl>("skip_back");  	mVolumeCtrl				= getChild<LLUICtrl>("media_volume");  	mMuteBtn				= getChild<LLButton>("media_mute_button"); -	mVolumeUpCtrl			= getChild<LLUICtrl>("volume_up"); -	mVolumeDownCtrl			= getChild<LLUICtrl>("volume_down");  	mVolumeSliderCtrl       = getChild<LLSliderCtrl>("volume_slider");  	mWhitelistIcon			= getChild<LLIconCtrl>("media_whitelist_flag");  	mSecureLockIcon			= getChild<LLIconCtrl>("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; 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" /> -    <check_box +	<check_box +     control_name="MediaEnabled" +     height="16" +     label="Media Enabled" +     layout="topleft" +     left="30" +     name="media_enabled" +     top_pad="10" +     width="350"> +       <check_box.commit_callback +          function="Pref.MediaEnabled" /> +    </check_box> +	<check_box +	 enabled_control="MediaEnabled"       control_name="ParcelMediaAutoPlayEnable"       height="16" -     label="Allow Media Autoplay" +     label="Allow Media to auto-play"       layout="topleft"       left="30"       name="autoplay_enabled" diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index ab6384203f..9164ff4c29 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -131,7 +131,6 @@  		  hover_glow_amount="0.15"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22"  		  layout="topleft"  		  tool_tip="Navigate forward"> @@ -161,7 +160,6 @@  		  tool_tip="Home page"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.Home" /> @@ -189,7 +187,6 @@  		  tool_tip="Stop media"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.MediaStop" /> @@ -217,7 +214,6 @@  		  tool_tip="Reload"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.Reload" /> @@ -245,7 +241,6 @@  		  tool_tip = "Stop loading"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.Stop" /> @@ -274,7 +269,6 @@  		  left_delta="2"  		  top="0"  		  height="22" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.Play" /> @@ -449,7 +443,6 @@  		  layout="topleft"  		  tool_tip="Step forward"  		  top="0" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.SkipForward" /> @@ -483,7 +476,6 @@  		  tool_tip="Mute This Media"  		  top="0"  		  height="20" -		  min_width="22"  		  width="22" >  		<button.commit_callback  			function="MediaCtrl.ToggleMute" /> @@ -534,7 +526,6 @@  		  height="22"  		  layout="topleft"  		  tool_tip="Zoom into media" -		  min_width="22"  		  width="22">  		<button.commit_callback  			function="MediaCtrl.Zoom" /> @@ -588,7 +579,6 @@  		  layout="topleft"  		  tool_tip = "Open URL in browser"  		  top="0" -		  min_width="24"  		  width="24" >  		<button.commit_callback  			function="MediaCtrl.Open" /> | 
