diff options
Diffstat (limited to 'indra/newview/llpanelnearbymedia.cpp')
-rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index c02f154dc8..a73c25a979 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -549,11 +549,10 @@ void LLPanelNearByMedia::refreshParcelItems() MediaClass choice = (MediaClass)choice_llsd.asInteger(); // Only show "special parcel items" if "All" or "Within" filter // (and if media is "enabled") - bool should_include = gSavedSettings.getBOOL("AudioStreamingMedia") && - (choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL); + bool should_include = (choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL); // First Parcel Media: add or remove it as necessary - if (should_include && LLViewerMedia::hasParcelMedia()) + if (gSavedSettings.getBOOL("AudioStreamingMedia") &&should_include && LLViewerMedia::hasParcelMedia()) { // Yes, there is parcel media. if (NULL == mParcelMediaItem) @@ -716,11 +715,14 @@ void LLPanelNearByMedia::refreshList() } } } - mDisableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") && + mDisableAllCtrl->setEnabled((gSavedSettings.getBOOL("AudioStreamingMusic") || + gSavedSettings.getBOOL("AudioStreamingMedia")) && (LLViewerMedia::isAnyMediaShowing() || LLViewerMedia::isParcelMediaPlaying() || LLViewerMedia::isParcelAudioPlaying())); - mEnableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") && + + mEnableAllCtrl->setEnabled( (gSavedSettings.getBOOL("AudioStreamingMusic") || + gSavedSettings.getBOOL("AudioStreamingMedia")) && (disabled_count > 0 || // parcel media (if we have it, and it isn't playing, enable "start") (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) || @@ -979,20 +981,13 @@ void LLPanelNearByMedia::onMoreLess() void LLPanelNearByMedia::updateControls() { - if (! gSavedSettings.getBOOL("AudioStreamingMedia")) - { - // Just show disabled controls - showDisabledControls(); - return; - } - LLUUID selected_media_id = mMediaList->getValue().asUUID(); if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID) { if (!LLViewerMedia::hasParcelAudio() || !gSavedSettings.getBOOL("AudioStreamingMusic")) { - // Shouldn't happen, but do this anyway + // disable controls if audio streaming music is disabled from preference showDisabledControls(); } else { @@ -1005,9 +1000,9 @@ void LLPanelNearByMedia::updateControls() } else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) { - if (!LLViewerMedia::hasParcelMedia()) + if (!LLViewerMedia::hasParcelMedia() || !gSavedSettings.getBOOL("AudioStreamingMedia")) { - // Shouldn't happen, but do this anyway + // disable controls if audio streaming media is disabled from preference showDisabledControls(); } else { @@ -1034,7 +1029,7 @@ void LLPanelNearByMedia::updateControls() else { LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(selected_media_id); - if (NULL == impl) + if (NULL == impl || !gSavedSettings.getBOOL("AudioStreamingMedia")) { showDisabledControls(); } |