From 1c4b6085064a623268919ed5c56f052f52110b41 Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Thu, 8 Apr 2010 16:19:14 -0700 Subject: EXT-6670 Streaming Music does not obey Media Auto-play until restart reviewed by Richard cc#183 --- indra/newview/llpanelnearbymedia.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llpanelnearbymedia.cpp') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 103ad95431..93ebae334f 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -88,6 +88,8 @@ LLPanelNearByMedia::LLPanelNearByMedia() mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && gSavedSettings.getBOOL("MediaTentativeAutoPlay"); + gSavedSettings.getControl(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING)->getSignal()->connect(boost::bind(&LLPanelNearByMedia::handleMediaAutoPlayChanged, this, _2)); + mCommitCallbackRegistrar.add("MediaListCtrl.EnableAll", boost::bind(&LLPanelNearByMedia::onClickEnableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.DisableAll", boost::bind(&LLPanelNearByMedia::onClickDisableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.GoMediaPrefs", boost::bind(&LLPanelNearByMedia::onAdvancedButtonClick, this)); @@ -175,6 +177,13 @@ BOOL LLPanelNearByMedia::postBuild() return TRUE; } +void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) +{ + // update mParcelAudioAutoStart if AUTO_PLAY_MEDIA_SETTING changes + mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && + gSavedSettings.getBOOL("MediaTentativeAutoPlay"); +} + /*virtual*/ void LLPanelNearByMedia::onMouseEnter(S32 x, S32 y, MASK mask) { -- cgit v1.2.3