summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelnearbymedia.cpp9
-rw-r--r--indra/newview/llpanelnearbymedia.h4
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();