diff options
| author | Rick Pasetto <rick@lindenlab.com> | 2010-01-11 10:04:04 -0800 | 
|---|---|---|
| committer | Rick Pasetto <rick@lindenlab.com> | 2010-01-11 10:04:04 -0800 | 
| commit | 158005d5ec90dfe31ba8c22c5dbd6b52c78fcac7 (patch) | |
| tree | 382ae80442c0f1e0a38d099b4d0caeb694a4db45 | |
| parent | c0c1d91c878ba93c29ee35db9fd6a1ecac207e39 (diff) | |
| parent | dd861135677b54a797305bb92199ac614cae5070 (diff) | |
Merge backout of b6030bb6ff40
| -rw-r--r-- | indra/newview/llviewermedia.h | 6 | ||||
| -rw-r--r-- | indra/newview/llviewerparcelmedia.cpp | 40 | 
2 files changed, 8 insertions, 38 deletions
| 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 ) | 
