diff options
| author | Eli Linden <eli@lindenlab.com> | 2010-04-14 18:26:42 -0700 | 
|---|---|---|
| committer | Eli Linden <eli@lindenlab.com> | 2010-04-14 18:26:42 -0700 | 
| commit | 1497a375535e4a79a876af58b9a3f6f3651ba55b (patch) | |
| tree | 0a9c7472c3909c4431faaef06bea6f6f6d459094 | |
| parent | c4e287c909ca3c1eb7364964f225dd2d901fdf2c (diff) | |
| parent | 54ae102c5282bae1371fbd7de0cb51eae75b4040 (diff) | |
Merge
| -rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 25 | ||||
| -rw-r--r-- | indra/newview/llworldmapview.cpp | 22 | 
3 files changed, 56 insertions, 6 deletions
| diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index ab2f9284f7..83244edb8e 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -31,7 +31,6 @@  #include "llviewerprecompiledheaders.h" -//LLPanelPrimMediaControls  #include "llagent.h"  #include "llagentcamera.h"  #include "llparcel.h" @@ -65,9 +64,12 @@  #include "llvovolume.h"  #include "llweb.h"  #include "llwindow.h" -  #include "llfloatertools.h"  // to enable hide if build tools are up +#if defined(LL_DARWIN) || (defined(LL_WINDOW) && (! defined(LL_RELEASE_FOR_DOWNLOAD)) ) +#define PER_MEDIA_VOLUME +#endif +  // Functions pulled from pipeline.cpp  glh::matrix4f glh_get_current_modelview();  glh::matrix4f glh_get_current_projection(); @@ -464,11 +466,18 @@ void LLPanelPrimMediaControls::updateShape()  			mSkipBackCtrl->setVisible(FALSE);  			mSkipBackCtrl->setEnabled(FALSE); +#ifdef PER_MEDIA_VOLUME +			mVolumeCtrl->setVisible(has_focus); +			mVolumeCtrl->setEnabled(has_focus); +			mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); +			mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); +#else  			mVolumeCtrl->setVisible(FALSE);  			mVolumeSliderCtrl->setVisible(FALSE);  			mVolumeCtrl->setEnabled(FALSE);  			mVolumeSliderCtrl->setEnabled(FALSE); -			 +#endif +  			if (mMediaPanelScroll)  			{  				mMediaPanelScroll->setVisible(has_focus); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index dd4192f270..58138d9917 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1286,7 +1286,30 @@ void LLViewerMedia::setOpenIDCookie()  {  	if(!sOpenIDCookie.empty())  	{ -		getCookieStore()->setCookiesFromHost(sOpenIDCookie, sOpenIDURL.mAuthority); +		// The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port] +		// We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that. +		// We therefore do it here. +		std::string authority = sOpenIDURL.mAuthority; +		std::string::size_type host_start = authority.find('@');  +		if(host_start == std::string::npos) +		{ +			// no username/password +			host_start = 0; +		} +		else +		{ +			// Hostname starts after the @.  +			// (If the hostname part is empty, this may put host_start at the end of the string.  In that case, it will end up passing through an empty hostname, which is correct.) +			++host_start; +		} +		std::string::size_type host_end = authority.rfind(':');  +		if((host_end == std::string::npos) || (host_end < host_start)) +		{ +			// no port +			host_end = authority.size(); +		} +		 +		getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start));  	}  } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 0c37bb6eb1..151180aae7 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -900,14 +900,32 @@ void LLWorldMapView::drawFrustum()  		// fade out in distance.  		gGL.begin( LLRender::TRIANGLES  );  		{ -			LLVector2 cam_lookat(LLViewerCamera::instance().getAtAxis().mV[VX], LLViewerCamera::instance().getAtAxis().mV[VY]); -			LLVector2 cam_left(LLViewerCamera::instance().getLeftAxis().mV[VX], LLViewerCamera::instance().getLeftAxis().mV[VY]); +			// get camera look at and left axes +			LLVector3 at_axis = LLViewerCamera::instance().getAtAxis(); +			LLVector3 left_axis = LLViewerCamera::instance().getLeftAxis(); + +			// grab components along XY plane +			LLVector2 cam_lookat(at_axis.mV[VX], at_axis.mV[VY]); +			LLVector2 cam_left(left_axis.mV[VX], left_axis.mV[VY]); + +			// but, when looking near straight up or down... +			if (is_approx_zero(cam_lookat.magVecSquared())) +			{ +				//...just fall back to looking down the x axis +				cam_lookat = LLVector2(1.f, 0.f); // x axis +				cam_left = LLVector2(0.f, 1.f); // y axis +			} + +			// normalize to unit length +			cam_lookat.normVec(); +			cam_left.normVec();  			gGL.color4f(1.f, 1.f, 1.f, 0.25f);  			gGL.vertex2f( 0, 0 );  			gGL.color4f(1.f, 1.f, 1.f, 0.02f); +			// use 2d camera vectors to render frustum triangle  			LLVector2 vert = cam_lookat * far_clip_pixels + cam_left * half_width_pixels;  			gGL.vertex2f(vert.mV[VX], vert.mV[VY]); | 
