diff options
author | angela <angela@lindenlab.com> | 2010-02-23 11:30:12 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2010-02-23 11:30:12 +0800 |
commit | 0eea585ef13426bf343fb5bcc3642cdfc769c022 (patch) | |
tree | 6055dcbd0433762730ed7ef52883f5ee9b21f8f7 /indra/newview | |
parent | 98a0c11da9e1c7ee8351cb9ab6d9cd5345a4e002 (diff) |
revert some changed from EXT-5410 but keep the changes for disabling streaming audio when music or media is disabled. reviewed by rick
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 41 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_nearby_media.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_sound.xml | 14 |
4 files changed, 20 insertions, 44 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 6d6edcc9ee..e1676d2299 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -568,20 +568,11 @@ void LLPanelNearByMedia::refreshParcelItems() tooltip = name + " : " + url; } LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia(); - bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); - if(is_enabled) - { - mParcelMediaName = getString("parcel_media_name"); - } - else - { - mParcelMediaName = getString("parcel_media_name_disabled"); - } updateListItem(mParcelMediaItem, mParcelMediaName, tooltip, -2, // Proximity closer than anything else, before Parcel Audio - impl == NULL || impl->isMediaDisabled() || (!is_enabled), + impl == NULL || impl->isMediaDisabled(), impl != NULL && !LLViewerParcelMedia::getURL().empty(), impl != NULL && impl->isMediaTimeBased() && impl->isMediaPlaying(), MEDIA_CLASS_ALL, @@ -610,20 +601,12 @@ void LLPanelNearByMedia::refreshParcelItems() if (NULL != mParcelAudioItem) { bool is_playing = LLViewerMedia::isParcelAudioPlaying(); - bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMusic"); - if(is_enabled) - { - mParcelAudioName = getString("parcel_audio_name"); - } - else - { - mParcelAudioName = getString("parcel_audio_name_disabled"); - } + updateListItem(mParcelAudioItem, mParcelAudioName, LLViewerMedia::getParcelAudioURL(), -1, // Proximity after Parcel Media, but closer than anything else - (!is_playing) && is_enabled, + (!is_playing), is_playing, is_playing, MEDIA_CLASS_ALL, @@ -865,18 +848,14 @@ void LLPanelNearByMedia::onClickParcelMediaPause() void LLPanelNearByMedia::onClickParcelAudioStart() { - //only do this when it's audio streaming is enabled - if (gSavedSettings.getBOOL("AudioStreamingMusic")) - { - // User *explicitly* started the internet stream, so keep the stream - // playing and updated as they cross to other parcels etc. - mParcelAudioAutoStart = true; + // User *explicitly* started the internet stream, so keep the stream + // playing and updated as they cross to other parcels etc. + mParcelAudioAutoStart = true; - if (!gAudiop) - return; - - gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); - } + if (!gAudiop) + return; + gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); + } void LLPanelNearByMedia::onClickParcelAudioPlay() diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0d16a3c2cb..f1ca56a8ae 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -851,7 +851,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) } } // update the audio stream here as well - if(!inworld_audio_enabled) + if(!inworld_media_enabled || !inworld_audio_enabled) { if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) { @@ -947,12 +947,12 @@ void LLViewerMedia::setAllMediaEnabled(bool val) // Also do Parcel Media and Parcel Audio if (val) { - if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()&& gSavedSettings.getBOOL("AudioStreamingMedia")) + if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()) { LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()&& gSavedSettings.getBOOL("AudioStreamingMusic")) + if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) { gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); } @@ -980,7 +980,6 @@ bool LLViewerMedia::isParcelAudioPlaying() bool LLViewerMedia::hasInWorldMedia() { - if (! gSavedSettings.getBOOL("AudioStreamingMedia")) return false; if (sInWorldMediaDisabled) return false; impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index f3dfd56fbe..0f911f789e 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -14,9 +14,7 @@ <string name="media_item_count_format">(%ld media items)</string> <string name="empty_item_text"><empty></string> <string name="parcel_media_name">Parcel Streaming Media</string> - <string name="parcel_media_name_disabled">Parcel Streaming Media (Disabled)</string> <string name="parcel_audio_name">Parcel Streaming Audio</string> - <string name="parcel_audio_name_disabled">Parcel Streaming Audio (Disabled)</string> <string name="playing_suffix">(playing)</string> <panel bevel_style="in" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 8fa7f75f6b..a7cdd241c5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -38,7 +38,7 @@ image_unselected="Audio_Off" is_toggle="true" layout="topleft" - left_pad="5" + left_pad="5" name="mute_audio" tab_stop="false" width="16" /> @@ -49,7 +49,7 @@ label="Mute when minimized" layout="topleft" name="mute_when_minimized" - top_delta="3" + top_delta="3" left_pad="5" width="215" /> <slider @@ -177,14 +177,14 @@ </slider> <button control_name="MuteMusic" - disabled_control="MuteAudio" + disabled_control="MuteAudio" follows="top|left" height="16" image_selected="AudioMute_Off" image_unselected="Audio_Off" is_toggle="true" layout="topleft" - left_pad="5" + left_pad="5" name="mute_audio" tab_stop="false" width="16" /> @@ -326,8 +326,8 @@ length="1" follows="left|top" layout="topleft" - left="80" - top_delta="16" + left="80" + top_delta="16" name="Listen from" width="80"> Listen from: @@ -521,7 +521,7 @@ visible="true" width="22" /> <text - font.style="BOLD" + font.style="BOLD" type="string" length="1" follows="left|top" |