summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelnearbymedia.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-25 10:52:03 +0800
committerangela <angela@lindenlab.com>2010-02-25 10:52:03 +0800
commite2b347c235e5fb92ef9941be57e049df4bf34168 (patch)
tree5b70f190a931fe33026d91887dfb7791c246915b /indra/newview/llpanelnearbymedia.cpp
parentfadbd33b52b6deb465a49a4c0857ed8078277b15 (diff)
parent5fbf81d17eae532da6d9537401bd677eb04c90ff (diff)
merge
Diffstat (limited to 'indra/newview/llpanelnearbymedia.cpp')
-rw-r--r--indra/newview/llpanelnearbymedia.cpp27
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();
}