diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-04-08 16:19:14 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-04-08 16:19:14 -0700 |
commit | 1c4b6085064a623268919ed5c56f052f52110b41 (patch) | |
tree | 2d1784691fd2b7ba1c82452ea105b7db02dd5c91 /indra/newview | |
parent | 11db894ba9ab361589078db3fa744970e9137298 (diff) |
EXT-6670 Streaming Music does not obey Media Auto-play until restart
reviewed by Richard cc#183
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelnearbymedia.h | 4 |
2 files changed, 13 insertions, 0 deletions
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) { diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index af4659365f..7c07867df3 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -63,6 +63,10 @@ public: // interaction with our buttons. bool getParcelAudioAutoStart(); + // callback for when the auto play media preference changes + // to update mParcelAudioAutoStart + void handleMediaAutoPlayChanged(const LLSD& newvalue); + LLPanelNearByMedia(); virtual ~LLPanelNearByMedia(); |