From 0b63977570221ae7ca0ad46c9f844603ff91eeb4 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 11 Jan 2010 09:53:24 -0800 Subject: Fix build issue with ba93e704bd4f --- indra/newview/llviewermedia.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index f91d126073..9671b9e5dc 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -48,6 +48,8 @@ #include "llviewerwindow.h" #include "llfocusmgr.h" #include "llcallbacklist.h" +#include "llparcel.h" +#include "llaudioengine.h" // for gAudiop #include "llevent.h" // LLSimpleListener #include "llnotificationsutil.h" @@ -909,14 +911,14 @@ void LLViewerMedia::cleanupClass() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerParcelMedia::needsMediaFirstRun() +bool LLViewerMedia::needsMediaFirstRun() { return gWarningSettings.getBOOL("FirstStreamingMedia"); } ////////////////////////////////////////////////////////////////////////////////////////// // static -void LLViewerParcelMedia::displayMediaFirstRun() +void LLViewerMedia::displayMediaFirstRun() { gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); @@ -926,7 +928,7 @@ void LLViewerParcelMedia::displayMediaFirstRun() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerParcelMedia::firstRunCallback(const LLSD& notification, const LLSD& response) +bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) -- cgit v1.2.3 From dd861135677b54a797305bb92199ac614cae5070 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 11 Jan 2010 10:03:00 -0800 Subject: Backed out changeset b6030bb6ff40 --- indra/newview/llviewermedia.cpp | 73 +++++++++++++++++++++++++++++++++++ indra/newview/llviewermedia.h | 6 +++ indra/newview/llviewerparcelmedia.cpp | 40 +------------------ 3 files changed, 81 insertions(+), 38 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 7e8c8eb92e..f91d126073 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -54,6 +54,7 @@ #include "lluuid.h" #include "llkeyboard.h" #include "llmutelist.h" +#include "llfirstuse.h" #include // for SkinFolder listener #include @@ -708,6 +709,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) std::vector proximity_order; + bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); + bool needs_first_run = LLViewerMedia::needsMediaFirstRun(); U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal"); U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal"); U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -822,6 +825,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg) new_priority = LLPluginClassMedia::PRIORITY_LOW; } + if(!inworld_media_enabled) + { + // If inworld media is locked out, force all inworld media to stay unloaded. + if(!pimpl->getUsedInUI()) + { + new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; + if(needs_first_run) + { + // Don't do this more than once in this loop. + needs_first_run = false; + LLViewerMedia::displayMediaFirstRun(); + } + } + } + pimpl->setPriority(new_priority); if(pimpl->getUsedInUI()) @@ -888,6 +906,61 @@ void LLViewerMedia::cleanupClass() gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL); } + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerParcelMedia::needsMediaFirstRun() +{ + return gWarningSettings.getBOOL("FirstStreamingMedia"); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerParcelMedia::displayMediaFirstRun() +{ + gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); + + LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), + boost::bind(firstRunCallback, _1, _2)); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerParcelMedia::firstRunCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + // user has elected to automatically play media. + gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); + gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); + gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); + + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + + if (parcel) + { + // play media right now, if available + LLViewerParcelMedia::play(parcel); + + // play music right now, if available + std::string music_url = parcel->getMusicURL(); + if (gAudiop && !music_url.empty()) + gAudiop->startInternetStream(music_url); + } + } + else + { + gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, FALSE); + gSavedSettings.setBOOL("AudioStreamingMedia", FALSE); + gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); + gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); + } + return false; +} + + ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMediaImpl ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b103c48bd8..3ce9f1887c 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -115,6 +115,12 @@ class LLViewerMedia // This is the comparitor used to sort the list. static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); + + // For displaying the media first-run dialog. + static bool needsMediaFirstRun(); + static void displayMediaFirstRun(); + static bool firstRunCallback(const LLSD& notification, const LLSD& response); + }; // Implementation functions not exported into header file diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 0f7903a7a5..56dee6b34c 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -56,10 +56,6 @@ LLUUID LLViewerParcelMedia::sMediaRegionID; viewer_media_t LLViewerParcelMedia::sMediaImpl; -// Local functions -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel); - - // static void LLViewerParcelMedia::initClass() { @@ -112,12 +108,10 @@ void LLViewerParcelMedia::update(LLParcel* parcel) // First use warning if( (!mediaUrl.empty() || !parcel->getMusicURL().empty()) - && gWarningSettings.getBOOL("FirstStreamingMedia") ) + && LLViewerMedia::needsMediaFirstRun()) { - LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), - boost::bind(callback_play_media, _1, _2, parcel)); + LLViewerMedia::displayMediaFirstRun(); return; - } // if we have a current (link sharing) url, use it instead @@ -591,36 +585,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent }; } -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - // user has elected to automatically play media. - gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); - gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); - if(!gSavedSettings.getBOOL("AudioStreamingMedia")) - gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); - // play media right now, if available - LLViewerParcelMedia::play(parcel); - // play music right now, if available - if (parcel) - { - std::string music_url = parcel->getMusicURL(); - if (gAudiop && !music_url.empty()) - gAudiop->startInternetStream(music_url); - } - } - else - { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); - gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); - } - gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); - return false; -} - // TODO: observer /* void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& event_in ) -- cgit v1.2.3 From 817798ece05ffc4dd4f42bad204e330f87c2d247 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 11 Jan 2010 11:38:34 -0800 Subject: Fix for EXT-3991 - "add url to security for MoAP floater is devoid of standard floater information" --- indra/newview/skins/default/xui/en/floater_whitelist_entry.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml index 4ece0fa3ba..897d959b98 100644 --- a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml +++ b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml @@ -5,6 +5,9 @@ height="108" layout="topleft" name="whitelist_entry" + single_instance="true" + help_topic="whitelist_entry" + title="WHITELIST ENTRY" width="390">