diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index c3d8a5aa23632c487863b59de1da3ef45b64d325..70d770ef7ed6d99cdafd183b9198f8cef051f95f 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -2,6 +2,7 @@
  * @file llpluginclassmedia.cpp
  * @brief LLPluginClassMedia handles a plugin which knows about the "media" message class.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index dcc4a3bd6a257c6e1993f1372b083f7e6c3a0de8..6b6468871841a88e8353b91b4fc40f439534ae3b 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -2,6 +2,7 @@
  * @file llpluginclassmedia.h
  * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINCLASSMEDIA_H
diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h
index c798af29caf1e1c3e9a742f21f70ff1060bbf1ec..6d369cd51a36a57e3a129dde9b91b21c517e5abd 100644
--- a/indra/llplugin/llpluginclassmediaowner.h
+++ b/indra/llplugin/llpluginclassmediaowner.h
@@ -2,6 +2,7 @@
  * @file llpluginclassmediaowner.h
  * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINCLASSMEDIAOWNER_H
diff --git a/indra/llplugin/llplugininstance.cpp b/indra/llplugin/llplugininstance.cpp
index 58fb792d0d12c0c7380dad65beec8b28bf575a1e..16ba49266915792f24227c534f5d01a7399d41cc 100644
--- a/indra/llplugin/llplugininstance.cpp
+++ b/indra/llplugin/llplugininstance.cpp
@@ -2,6 +2,7 @@
  * @file llplugininstance.cpp
  * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llplugininstance.h b/indra/llplugin/llplugininstance.h
index ba569df10c2c08bfa288e79d5c519f1d7b9e67a1..02936f65fbf20afaabdbe79538505c39e996766d 100644
--- a/indra/llplugin/llplugininstance.h
+++ b/indra/llplugin/llplugininstance.h
@@ -2,6 +2,7 @@
  * @file llplugininstance.h
  * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGININSTANCE_H
diff --git a/indra/llplugin/llpluginmessage.cpp b/indra/llplugin/llpluginmessage.cpp
index 32601b47dbbc63035e09255f18c04ae9f84593c5..34e02c356ea58ab80bb293148f01270eb2f1ee35 100644
--- a/indra/llplugin/llpluginmessage.cpp
+++ b/indra/llplugin/llpluginmessage.cpp
@@ -2,6 +2,7 @@
  * @file llpluginmessage.cpp
  * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginmessage.h b/indra/llplugin/llpluginmessage.h
index 5e93d8b7a1cf485b1cac97fded668fd85165a413..99f8d1194f7bac6c8d4a1d8ac426725b0bcc5754 100644
--- a/indra/llplugin/llpluginmessage.h
+++ b/indra/llplugin/llpluginmessage.h
@@ -2,6 +2,7 @@
  * @file llpluginmessage.h
  * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINMESSAGE_H
diff --git a/indra/llplugin/llpluginmessageclasses.h b/indra/llplugin/llpluginmessageclasses.h
index 927fcf2eb2c38bdada1a14ee772f1a4f714e8229..01fddb92c5cf05d34a1b798b1d5ea7e889e65714 100644
--- a/indra/llplugin/llpluginmessageclasses.h
+++ b/indra/llplugin/llpluginmessageclasses.h
@@ -2,6 +2,7 @@
  * @file llpluginmessageclasses.h
  * @brief This file defines the versions of existing message classes for LLPluginMessage.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINMESSAGECLASSES_H
diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp
index 31ea1389124816e0b4f7018ced4aac5edb4273f1..cc193fca4210c1c8997534a3a86c72fc83b33841 100644
--- a/indra/llplugin/llpluginmessagepipe.cpp
+++ b/indra/llplugin/llpluginmessagepipe.cpp
@@ -2,6 +2,7 @@
  * @file llpluginmessagepipe.cpp
  * @brief Classes that implement connections from the plugin system to pipes/pumps.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginmessagepipe.h b/indra/llplugin/llpluginmessagepipe.h
index 4eb6575bd4f343706b2ae4f57f85bae103543ffe..1ddb38de6883f63b6e7e090b6ff3c77be0b25d6d 100644
--- a/indra/llplugin/llpluginmessagepipe.h
+++ b/indra/llplugin/llpluginmessagepipe.h
@@ -2,6 +2,7 @@
  * @file llpluginmessagepipe.h
  * @brief Classes that implement connections from the plugin system to pipes/pumps.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINMESSAGEPIPE_H
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index fc95136d9e39b189ec61c035af1cb9122c590903..55cf11c6208805cca7e72d15ea28c4ec4c13d2f2 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -2,6 +2,7 @@
  * @file llpluginprocesschild.cpp
  * @brief LLPluginProcessChild handles the child side of the external-process plugin API. 
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginprocesschild.h b/indra/llplugin/llpluginprocesschild.h
index 75860bdf0a9c4fec86834e1e776b1c4173f8b761..f5c57c3d49d212257723d33a208e3d15bd8ddf22 100644
--- a/indra/llplugin/llpluginprocesschild.h
+++ b/indra/llplugin/llpluginprocesschild.h
@@ -2,6 +2,7 @@
  * @file llpluginprocesschild.h
  * @brief LLPluginProcessChild handles the child side of the external-process plugin API. 
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINPROCESSCHILD_H
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index b7ce800c3aba27263f479d1f0255cd72147192be..332ce288d70207292d2ef16ed3ce7c0e331799b9 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -2,6 +2,7 @@
  * @file llpluginprocessparent.cpp
  * @brief LLPluginProcessParent handles the parent side of the external-process plugin API.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 1289e86c1365521be3ecea831ab895c9ce1303a9..25669f5d78eddb2d9a100809bb5558b30bee8a89 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -2,6 +2,7 @@
  * @file llpluginprocessparent.h
  * @brief LLPluginProcessParent handles the parent side of the external-process plugin API.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINPROCESSPARENT_H
diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp
index ce8b8e3e09034a481c0943350e878ab749452c10..3c69a69d28a8e480fe5fa08675819af6da363b43 100644
--- a/indra/llplugin/llpluginsharedmemory.cpp
+++ b/indra/llplugin/llpluginsharedmemory.cpp
@@ -2,6 +2,7 @@
  * @file llpluginsharedmemory.cpp
  * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/llplugin/llpluginsharedmemory.h b/indra/llplugin/llpluginsharedmemory.h
index a4613b9a54797f62811407a832f78d940a93c953..4014620c520edc7ef0b35b6c7fda902567b14b6f 100644
--- a/indra/llplugin/llpluginsharedmemory.h
+++ b/indra/llplugin/llpluginsharedmemory.h
@@ -2,6 +2,7 @@
  * @file llpluginsharedmemory.h
  * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API.
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef LL_LLPLUGINSHAREDMEMORY_H
diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp
index 005e427572357182d2fdbeb24a56401a17c3d12d..23dc532ba56eeeec47d1e4691cf160cbea886a05 100644
--- a/indra/llplugin/slplugin/slplugin.cpp
+++ b/indra/llplugin/slplugin/slplugin.cpp
@@ -1,11 +1,13 @@
-/** 
+/**
  * @file slplugin.cpp
  * @brief Loader shell for plugins, intended to be launched by the plugin host application, which directly loads a plugin dynamic library.
  *
+ * @cond
+ *
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
- * 
+ *
  * Second Life Viewer Source Code
  * The source code in this file ("Source Code") is provided by Linden Lab
  * to you under the terms of the GNU General Public License, version 2.0
@@ -13,20 +15,22 @@
  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  * the GPL can be found in doc/GPL-license.txt in this distribution, or
  * online at http://secondlife.com/developers/opensource/gplv2
- * 
+ *
  * There are special exceptions to the terms and conditions of the GPL as
  * it is applied to this Source Code. View the full text of the exception
  * in the file doc/FLOSS-exception.txt in this software distribution, or
  * online at http://secondlife.com/developers/opensource/flossexception
- * 
+ *
  * By copying, modifying or distributing this software, you acknowledge
  * that you have read and understood your obligations described above,
  * and agree to abide by those obligations.
- * 
+ *
  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ *
+ * @endcond
  */
 
 
@@ -48,15 +52,15 @@
 
 /*
 	On Mac OS, since we call WaitNextEvent, this process will show up in the dock unless we set the LSBackgroundOnly flag in the Info.plist.
-	
+
 	Normally non-bundled binaries don't have an info.plist file, but it's possible to embed one in the binary by adding this to the linker flags:
-	
+
 	-sectcreate __TEXT __info_plist /path/to/slplugin_info.plist
-	
+
 	which means adding this to the gcc flags:
-	
+
 	-Wl,-sectcreate,__TEXT,__info_plist,/path/to/slplugin_info.plist
-	
+
 */
 
 #if LL_DARWIN || LL_LINUX
@@ -67,7 +71,7 @@ static void crash_handler(int sig)
 	// TODO: add our own crash reporting
 	_exit(1);
 }
-#endif	
+#endif
 
 #if LL_WINDOWS
 #include <windows.h>
@@ -80,7 +84,48 @@ LONG WINAPI myWin32ExceptionHandler( struct _EXCEPTION_POINTERS* exception_infop
 	//std::cerr << "intercepted an unhandled exception and will exit immediately." << std::endl;
 
 	// TODO: replace exception handler before we exit?
-	return EXCEPTION_EXECUTE_HANDLER;	
+	return EXCEPTION_EXECUTE_HANDLER;
+}
+
+// Taken from : http://blog.kalmbachnet.de/?postid=75
+// The MSVC 2005 CRT forces the call of the default-debugger (normally Dr.Watson)
+// even with the other exception handling code. This (terrifying) piece of code
+// patches things so that doesn't happen.
+LPTOP_LEVEL_EXCEPTION_FILTER WINAPI MyDummySetUnhandledExceptionFilter(
+	LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter )
+{
+	return NULL;
+}
+
+BOOL PreventSetUnhandledExceptionFilter()
+{
+// WARNING: This won't work on 64-bit Windows systems so we turn it off it.
+//          It should work for any flavor of 32-bit Windows we care about.
+//          If it's off, sometimes you will see an OS message when a plugin crashes
+#ifndef _WIN64
+	HMODULE hKernel32 = LoadLibraryA( "kernel32.dll" );
+	if ( NULL == hKernel32 )
+		return FALSE;
+
+	void *pOrgEntry = GetProcAddress( hKernel32, "SetUnhandledExceptionFilter" );
+	if( NULL == pOrgEntry )
+		return FALSE;
+
+	unsigned char newJump[ 100 ];
+	DWORD dwOrgEntryAddr = (DWORD)pOrgEntry;
+	dwOrgEntryAddr += 5; // add 5 for 5 op-codes for jmp far
+	void *pNewFunc = &MyDummySetUnhandledExceptionFilter;
+	DWORD dwNewEntryAddr = (DWORD) pNewFunc;
+	DWORD dwRelativeAddr = dwNewEntryAddr - dwOrgEntryAddr;
+
+	newJump[ 0 ] = 0xE9;  // JMP absolute
+	memcpy( &newJump[ 1 ], &dwRelativeAddr, sizeof( pNewFunc ) );
+	SIZE_T bytesWritten;
+	BOOL bRet = WriteProcessMemory( GetCurrentProcess(), pOrgEntry, newJump, sizeof( pNewFunc ) + 1, &bytesWritten );
+	return bRet;
+#else
+	return FALSE;
+#endif
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -91,6 +136,7 @@ void initExceptionHandler()
 
 	// save old exception handler in case we need to restore it at the end
 	prev_filter = SetUnhandledExceptionFilter( myWin32ExceptionHandler );
+	PreventSetUnhandledExceptionFilter();
 }
 
 bool checkExceptionHandler()
@@ -99,6 +145,8 @@ bool checkExceptionHandler()
 	LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
 	prev_filter = SetUnhandledExceptionFilter(myWin32ExceptionHandler);
 
+	PreventSetUnhandledExceptionFilter();
+
 	if (prev_filter != myWin32ExceptionHandler)
 	{
 		LL_WARNS("AppInit") << "Our exception handler (" << (void *)myWin32ExceptionHandler << ") replaced with " << prev_filter << "!" << LL_ENDL;
@@ -122,7 +170,7 @@ bool checkExceptionHandler()
 }
 #endif
 
-// If this application on Windows platform is a console application, a console is always 
+// If this application on Windows platform is a console application, a console is always
 // created which is bad. Making it a Windows "application" via CMake settings but not
 // adding any code to explicitly create windows does the right thing.
 #if LL_WINDOWS
@@ -133,7 +181,7 @@ int main(int argc, char **argv)
 {
 	ll_init_apr();
 
-	// Set up llerror logging 
+	// Set up llerror logging
 	{
 		LLError::initForApplication(".");
 		LLError::setDefaultLevel(LLError::LEVEL_INFO);
@@ -146,14 +194,14 @@ int main(int argc, char **argv)
 	{
 		LL_ERRS("slplugin") << "usage: " << "SLPlugin" << " launcher_port" << LL_ENDL;
 	};
-	
+
 	U32 port = 0;
 	if(!LLStringUtil::convertToU32(lpCmdLine, port))
 	{
 		LL_ERRS("slplugin") << "port number must be numeric" << LL_ENDL;
 	};
 
-	// Insert our exception handler into the system so this plugin doesn't 
+	// Insert our exception handler into the system so this plugin doesn't
 	// display a crash message if something bad happens. The host app will
 	// see the missing heartbeat and log appropriately.
 	initExceptionHandler();
@@ -162,7 +210,7 @@ int main(int argc, char **argv)
 	{
 		LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;
 	}
-	
+
 	U32 port = 0;
 	if(!LLStringUtil::convertToU32(argv[1], port))
 	{
@@ -183,17 +231,17 @@ int main(int argc, char **argv)
 	LLPluginProcessChild *plugin = new LLPluginProcessChild();
 
 	plugin->init(port);
-	
+
 	LLTimer timer;
 	timer.start();
 
 #if LL_WINDOWS
 	checkExceptionHandler();
 #endif
-		
+
 	while(!plugin->isDone())
 	{
-		timer.reset();	
+		timer.reset();
 		plugin->idle();
 #if LL_DARWIN
 		{
@@ -204,7 +252,7 @@ int main(int argc, char **argv)
 #endif
 		F64 elapsed = timer.getElapsedTimeF64();
 		F64 remaining = plugin->getSleepTime() - elapsed;
-		
+
 		if(remaining <= 0.0f)
 		{
 			// We've already used our full allotment.
@@ -217,26 +265,26 @@ int main(int argc, char **argv)
 		{
 
 //			LL_INFOS("slplugin") << "elapsed = " << elapsed * 1000.0f << " ms, remaining = " << remaining * 1000.0f << " ms, sleeping for " << remaining * 1000.0f << " ms" << LL_ENDL;
-//			timer.reset();	
-			
+//			timer.reset();
+
 			// This also services the network as needed.
 			plugin->sleep(remaining);
-			
+
 //			LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" <<  LL_ENDL;
 		}
 
 #if LL_WINDOWS
 	// More agressive checking of interfering exception handlers.
-	// Doesn't appear to be required so far - even for plugins 
-	// that do crash with a single call to the intercept 
+	// Doesn't appear to be required so far - even for plugins
+	// that do crash with a single call to the intercept
 	// exception handler such as QuickTime.
 	//checkExceptionHandler();
 #endif
 	}
 
 	delete plugin;
-	
-	ll_cleanup_apr();	
+
+	ll_cleanup_apr();
 
 	return 0;
 }
diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp
index c8b6e814e13dfb4970fac5132d079d67bab57eb7..62ca569e6cf214ea18df14a9e7156273943c0363 100644
--- a/indra/llui/llprogressbar.cpp
+++ b/indra/llui/llprogressbar.cpp
@@ -72,12 +72,13 @@ LLProgressBar::~LLProgressBar()
 void LLProgressBar::draw()
 {
 	static LLTimer timer;
-
-	LLUIImagePtr bar_fg_imagep = LLUI::getUIImage("progressbar_fill.tga");
+	F32 alpha = getDrawContext().mAlpha;
 	
-	mImageBar->draw(getLocalRect(), mColorBackground.get());
+	LLColor4 image_bar_color = mColorBackground.get();
+	image_bar_color.setAlpha(alpha);
+	mImageBar->draw(getLocalRect(), image_bar_color);
 
-	F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
+	alpha *= 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
 	LLColor4 bar_color = mColorBar.get();
 	bar_color.mV[VALPHA] *= alpha; // modulate alpha
 	LLRect progress_rect = getLocalRect();
diff --git a/indra/media_plugins/base/media_plugin_base.cpp b/indra/media_plugins/base/media_plugin_base.cpp
index 6acac074233cb578171a71a4c07b90535fde6449..8c8fa24a657bad1026427c8dbb1bf7832f8ded77 100644
--- a/indra/media_plugins/base/media_plugin_base.cpp
+++ b/indra/media_plugins/base/media_plugin_base.cpp
@@ -2,6 +2,7 @@
  * @file media_plugin_base.cpp
  * @brief Media plugin base class for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/base/media_plugin_base.h b/indra/media_plugins/base/media_plugin_base.h
index f1e96335f92e301170369343ca64292dcaee840f..4dd157a07c827a12c8cd8f56a178626df77e29e3 100644
--- a/indra/media_plugins/base/media_plugin_base.h
+++ b/indra/media_plugins/base/media_plugin_base.h
@@ -2,6 +2,7 @@
  * @file media_plugin_base.h
  * @brief Media plugin base class for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp
index 99e0199a293ed4a43200aa1b885f462330079f7b..f5b077fea037410a80d4643fb11328c8231aacad 100644
--- a/indra/media_plugins/example/media_plugin_example.cpp
+++ b/indra/media_plugins/example/media_plugin_example.cpp
@@ -2,6 +2,7 @@
  * @file media_plugin_example.cpp
  * @brief Example plugin for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2009, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h
index ef41736c185ace01bb048d307db719be73102add..48accd3e66da6d166676176bd2cf4ac8f29d5ea8 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer.h
@@ -3,6 +3,7 @@
  * @author Tofu Linden
  * @brief implementation that supports media playback via GStreamer.
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
  * Copyright (c) 2007-2009, Linden Research, Inc.
@@ -29,6 +30,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 // header guard
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
index cc52232496c703a984eb505cd824019c516e8aa4..52cea46d467328b8222632ccd550b9818c4d1acd 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
@@ -2,6 +2,7 @@
  * @file llmediaimplgstreamer_syms.cpp
  * @brief dynamic GStreamer symbol-grabbing code
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
  * Copyright (c) 2007-2009, Linden Research, Inc.
@@ -28,6 +29,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #if LL_GSTREAMER010_ENABLED
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
index ee7473d6d1d919b4b412d360b0d8ad5b57791e3c..88f100af6e66497fe6f022dcb17108e0cf045639 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
@@ -2,6 +2,7 @@
  * @file llmediaimplgstreamer_syms.h
  * @brief dynamic GStreamer symbol-grabbing code
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
  * Copyright (c) 2007-2009, Linden Research, Inc.
@@ -28,6 +29,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
index e31d4a3282c6fc3331eaaae516d8f88d98826102..2244ccc146139a352f107cbf96270a5494e6ae21 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
@@ -2,6 +2,7 @@
  * @file llmediaimplgstreamertriviallogging.h
  * @brief minimal logging utilities.
  *
+ * @cond
  * $LicenseInfo:firstyear=2009&license=viewergpl$
  * 
  * Copyright (c) 2009, Linden Research, Inc.
@@ -28,6 +29,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef __LLMEDIAIMPLGSTREAMERTRIVIALLOGGING_H__
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
index d8ccfaa7021538fcf7efa854af9225584e0fc0ab..5bb0ef5a997f589b7f8c2a078a250fe282512816 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
@@ -2,6 +2,7 @@
  * @file llmediaimplgstreamervidplug.h
  * @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
  * Copyright (c) 2007-2009, Linden Research, Inc.
@@ -28,6 +29,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #if LL_GSTREAMER010_ENABLED
diff --git a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
index f6d55b8758015452c98606fdccbfe086e0f0ec30..208523e8d027d8c63474d5cedcead01f76c879a7 100644
--- a/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
+++ b/indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
@@ -2,6 +2,7 @@
  * @file llmediaimplgstreamervidplug.h
  * @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  * 
  * Copyright (c) 2007-2009, Linden Research, Inc.
@@ -28,6 +29,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #ifndef __GST_SLVIDEO_H__
diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
index a4c43988baa8cc5a7277f00ec0a02baab7c21b46..d21ff26f838a69a1f6ee622fe1a2f5149f6f0971 100644
--- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
+++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
@@ -2,6 +2,7 @@
  * @file media_plugin_gstreamer010.cpp
  * @brief GStreamer-0.10 plugin for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2007&license=viewergpl$
  *
  * Copyright (c) 2007, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index 236f79978de800301c175a15163e841d6203dd8c..dbc44c833453681e2aa7f2e1a122b16ae0fead17 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -2,6 +2,7 @@
  * @file media_plugin_quicktime.cpp
  * @brief QuickTime plugin for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "linden_common.h"
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 09348782a45c6a1a2fde17b4d158dbd02465db90..30c74832294ade6c6fa516e17d7987ed93c21d9b 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -2,6 +2,7 @@
  * @file media_plugin_webkit.cpp
  * @brief Webkit plugin for LLMedia API plugin system
  *
+ * @cond
  * $LicenseInfo:firstyear=2008&license=viewergpl$
  *
  * Copyright (c) 2008, Linden Research, Inc.
@@ -27,6 +28,7 @@
  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  * COMPLETENESS OR PERFORMANCE.
  * $/LicenseInfo$
+ * @endcond
  */
 
 #include "llqtwebkit.h"
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 71c1b0cbb940f39d2f0f274a4ba7071eee393d3b..e86123d56517eb95b05240dab8505d19f2eca543 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -66,10 +66,6 @@
 glh::matrix4f glh_get_current_modelview();
 glh::matrix4f glh_get_current_projection();
 
-const F32 ZOOM_NEAR_PADDING		= 1.0f;
-const F32 ZOOM_MEDIUM_PADDING	= 1.15f;
-const F32 ZOOM_FAR_PADDING		= 1.5f;
-
 // Warning: make sure these two match!
 const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM };
 const int LLPanelPrimMediaControls::kNumZoomLevels = 2;
@@ -86,7 +82,13 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
 	mUpdateSlider(true),
 	mClearFaceOnFade(false),
 	mCurrentRate(0.0),
-	mMovieDuration(0.0)
+	mMovieDuration(0.0),
+	mTargetObjectID(LLUUID::null),
+	mTargetObjectFace(0),
+	mTargetImplID(LLUUID::null),
+	mTargetObjectNormal(LLVector3::zero),
+	mZoomObjectID(LLUUID::null),
+	mZoomObjectFace(0)
 {
 	mCommitCallbackRegistrar.add("MediaCtrl.Close",		boost::bind(&LLPanelPrimMediaControls::onClickClose, this));
 	mCommitCallbackRegistrar.add("MediaCtrl.Back",		boost::bind(&LLPanelPrimMediaControls::onClickBack, this));
@@ -152,6 +154,11 @@ BOOL LLPanelPrimMediaControls::postBuild()
 	mRightBookend			= getChild<LLUICtrl>("right_bookend");
 	mBackgroundImage		= LLUI::getUIImage(getString("control_background_image_name"));
 	LLStringUtil::convertToF32(getString("skip_step"), mSkipStep);
+	LLStringUtil::convertToS32(getString("min_width"), mMinWidth);
+	LLStringUtil::convertToS32(getString("min_height"), mMinHeight);
+	LLStringUtil::convertToF32(getString("zoom_near_padding"), mZoomNearPadding);
+	LLStringUtil::convertToF32(getString("zoom_medium_padding"), mZoomMediumPadding);
+	LLStringUtil::convertToF32(getString("zoom_far_padding"), mZoomFarPadding);
 
 	// These are currently removed...but getChild creates a "dummy" widget.
 	// This class handles them missing.
@@ -257,9 +264,6 @@ LLPluginClassMedia* LLPanelPrimMediaControls::getTargetMediaPlugin()
 
 void LLPanelPrimMediaControls::updateShape()
 {
-	const S32 MIN_HUD_WIDTH=400;
-	const S32 MIN_HUD_HEIGHT=120;
-
 	LLViewerMediaImpl* media_impl = getTargetMediaImpl();
 	LLViewerObject* objectp = getTargetObject();
 	
@@ -279,7 +283,7 @@ void LLPanelPrimMediaControls::updateShape()
 
 	bool can_navigate = parcel->getMediaAllowNavigate();
 	bool enabled = false;
-	bool is_zoomed = (mCurrentZoom != ZOOM_NONE);
+	bool is_zoomed = (mCurrentZoom != ZOOM_NONE) && (mTargetObjectID == mZoomObjectID) && (mTargetObjectFace == mZoomObjectFace);
 	// There is no such thing as "has_focus" being different from normal controls set
 	// anymore (as of user feedback from bri 10/09).  So we cheat here and force 'has_focus'
 	// to 'true' (or, actually, we use a setting)
@@ -309,7 +313,7 @@ void LLPanelPrimMediaControls::updateShape()
 		mStopCtrl->setVisible(false);
 		mHomeCtrl->setVisible(has_focus);
 		mZoomCtrl->setVisible(!is_zoomed);
-		mUnzoomCtrl->setVisible(has_focus && is_zoomed);
+		mUnzoomCtrl->setVisible(is_zoomed);
 		mOpenCtrl->setVisible(true);
 		mMediaAddressCtrl->setVisible(has_focus && !mini_controls);
 		mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls);
@@ -332,13 +336,12 @@ void LLPanelPrimMediaControls::updateShape()
 
 		if(media_plugin && media_plugin->pluginSupportsMediaTime())
 		{
-			mReloadCtrl->setEnabled(FALSE);
-			mReloadCtrl->setVisible(FALSE);
+			mReloadCtrl->setEnabled(false);
+			mReloadCtrl->setVisible(false);
 			mMediaStopCtrl->setVisible(has_focus);
-			mHomeCtrl->setVisible(FALSE);
-			// No nav controls
-			mBackCtrl->setVisible(FALSE);
-			mFwdCtrl->setEnabled(FALSE);
+			mHomeCtrl->setVisible(has_focus);
+			mBackCtrl->setVisible(false);
+			mFwdCtrl->setVisible(false);
 			mMediaAddressCtrl->setVisible(false);
 			mMediaAddressCtrl->setEnabled(false);
 			mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls);
@@ -416,7 +419,6 @@ void LLPanelPrimMediaControls::updateShape()
 					mPlayCtrl->setVisible(FALSE);
 					mPauseCtrl->setEnabled(TRUE);
 					mPauseCtrl->setVisible(has_focus);
-					mMediaStopCtrl->setEnabled(TRUE);
 					
 					break;
 				case LLPluginClassMediaOwner::MEDIA_PAUSED:
@@ -425,7 +427,6 @@ void LLPanelPrimMediaControls::updateShape()
 					mPauseCtrl->setVisible(FALSE);
 					mPlayCtrl->setEnabled(TRUE);
 					mPlayCtrl->setVisible(has_focus);
-					mMediaStopCtrl->setEnabled(FALSE);
 					break;
 			}
 		}
@@ -508,12 +509,10 @@ void LLPanelPrimMediaControls::updateShape()
 			{	
 				mMediaProgressPanel->setVisible(true);
 				mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
-				gFocusMgr.setTopCtrl(mMediaProgressPanel);
 			}
-			else if (mMediaProgressPanel->getVisible())
+			else
 			{
 				mMediaProgressPanel->setVisible(false);
-				gFocusMgr.setTopCtrl(NULL);
 			}
 		}
 
@@ -599,12 +598,12 @@ void LLPanelPrimMediaControls::updateShape()
 		}
 
         LLCoordGL screen_min;
-		screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (min.mV[VX] + 1.f) * 0.5f);
-		screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (min.mV[VY] + 1.f) * 0.5f);
+		screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (min.mV[VX] + 1.f) * 0.5f);
+		screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (min.mV[VY] + 1.f) * 0.5f);
 
 		LLCoordGL screen_max;
-		screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (max.mV[VX] + 1.f) * 0.5f);
-		screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (max.mV[VY] + 1.f) * 0.5f);
+		screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (max.mV[VX] + 1.f) * 0.5f);
+		screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (max.mV[VY] + 1.f) * 0.5f);
 
 		// grow panel so that screenspace bounding box fits inside "media_region" element of HUD
 		LLRect media_controls_rect;
@@ -613,14 +612,15 @@ void LLPanelPrimMediaControls::updateShape()
 		media_controls_rect.mBottom -= mMediaRegion->getRect().mBottom;
 		media_controls_rect.mTop += getRect().getHeight() - mMediaRegion->getRect().mTop;
 		media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight;
-
-		LLRect old_hud_rect = media_controls_rect;
+		
 		// keep all parts of HUD on-screen
 		media_controls_rect.intersectWith(getParent()->getLocalRect());
+		if (mCurrentZoom != ZOOM_NONE)
+			media_controls_rect.mBottom -= mMediaControlsStack->getRect().getHeight() + mMediaProgressPanel->getRect().getHeight();
 
 		// clamp to minimum size, keeping centered
 		media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(),
-			llmax(MIN_HUD_WIDTH, media_controls_rect.getWidth()), llmax(MIN_HUD_HEIGHT, media_controls_rect.getHeight()));
+			llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight()));
 
 		setShape(media_controls_rect, true);
 
@@ -968,17 +968,17 @@ void LLPanelPrimMediaControls::updateZoom()
 		}
 	case ZOOM_FAR:
 		{
-			zoom_padding = ZOOM_FAR_PADDING;
+			zoom_padding = mZoomFarPadding;
 			break;
 		}
 	case ZOOM_MEDIUM:
 		{
-			zoom_padding = ZOOM_MEDIUM_PADDING;
+			zoom_padding = mZoomMediumPadding;
 			break;
 		}
 	case ZOOM_NEAR:
 		{
-			zoom_padding = ZOOM_NEAR_PADDING;
+			zoom_padding = mZoomNearPadding;
 			break;
 		}
 	default:
@@ -988,9 +988,16 @@ void LLPanelPrimMediaControls::updateZoom()
 		}
 	}
 
-	if (zoom_padding > 0.0f)		
+	if (zoom_padding > 0.0f)
+	{
 		LLViewerMediaFocus::setCameraZoom(getTargetObject(), mTargetObjectNormal, zoom_padding);
+	}
+	
+	// Remember the object ID/face we zoomed into, so we can update the zoom icon appropriately
+	mZoomObjectID = mTargetObjectID;
+	mZoomObjectFace = mTargetObjectFace;
 }
+
 void LLPanelPrimMediaControls::onScrollUp(void* user_data)
 {
 	LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data);
diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h
index accfb72a0494c5eb45b4875748c2bbd40c4b41e4..fe8f100abe8ec68a970dab55c37b92165ae16186 100644
--- a/indra/newview/llpanelprimmediacontrols.h
+++ b/indra/newview/llpanelprimmediacontrols.h
@@ -160,6 +160,11 @@ class LLPanelPrimMediaControls : public LLPanel
 	LLUICtrl *mRightBookend;
 	LLUIImage* mBackgroundImage;
 	F32 mSkipStep;
+	S32 mMinWidth;
+	S32 mMinHeight;
+	F32 mZoomNearPadding;
+	F32 mZoomMediumPadding;
+	F32 mZoomFarPadding;
 	
 	LLUICtrl *mMediaPanelScroll;
 	LLButton *mScrollUpCtrl;
@@ -190,6 +195,9 @@ class LLPanelPrimMediaControls : public LLPanel
 	S32 mTargetObjectFace;
 	LLUUID mTargetImplID;
 	LLVector3 mTargetObjectNormal;
+	
+	LLUUID mZoomObjectID;
+	S32 mZoomObjectFace;
 };
 
 #endif // LL_PANELPRIMMEDIACONTROLS_H
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index fd74c9c2fcad2a2436a15fbe4114bc06a0ad3fea..f639c841e70d00bd1d5fa441ca25ad6b75a81d17 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -138,15 +138,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
 	}
 	else
 	{
-		if(mFocusedImplID.notNull())
-		{
-			if(mMediaControls.get())
-			{
-				// Don't reset camera zoom by default, just tell the controls they're no longer controlling zoom.
-				mMediaControls.get()->resetZoomLevel(false);
-			}
-		}
-
 		if(hasFocus())
 		{
 			gFocusMgr.setKeyboardFocus(NULL);
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index af4c01185ae31f7d38a51cfff17cb99e254a5f92..8b86067b036eb8b22b9e2bc04e18e64b737edcc9 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -9,6 +9,11 @@
 	width="800">
   <string name="control_background_image_name">Inspector_Background</string>
   <string name="skip_step">0.2</string>
+  <string name="min_width">400</string>
+  <string name="min_height">120</string>
+  <string name="zoom_near_padding">1.0</string>
+  <string name="zoom_medium_padding">1.25</string>
+  <string name="zoom_far_padding">1.5</string>
   <panel
 	  name="media_region"
 	  bottom="125"
@@ -20,7 +25,7 @@
 	  name="media_controls"
 	  follows="left|right"
 	  animate="false"
-	  height="32"
+	  height="26"
 	  layout="topleft"
 	  left="0"
 	  orientation="horizontal"
@@ -235,18 +240,17 @@
 		width="190"
 		min_width="90">
 	  <!--
-		  RE-ENABLE THIS WHEN WE HAVE A HISTORY DROP-DOWN AGAIN
-
-<combo_box
-name="media_address_url"
-allow_text_entry="true"
-height="22"
-layout="topleft"
-max_chars="1024"
-tool_tip = "Media URL"
-<combo_box.commit_callback
-function="MediaCtrl.CommitURL" />
-</combo_box>
+	  RE-ENABLE THIS WHEN WE HAVE A HISTORY DROP-DOWN AGAIN
+	  <combo_box
+		  name="media_address_url"
+		  allow_text_entry="true"
+		  height="22"
+		  layout="topleft"
+		  max_chars="1024"
+		  tool_tip = "Media URL">
+		<combo_box.commit_callback
+			function="MediaCtrl.CommitURL" />
+	  </combo_box>
 	  -->
 	  <line_editor 
 		  name="media_address_url"
@@ -304,17 +308,17 @@ function="MediaCtrl.CommitURL" />
 		user_resize="false"
 		follows="left|right|top|bottom"
 		layout="topleft"
+		height="16"		
 		min_width="100"
 		width="200">
 	  <slider_bar
 		  name="media_play_slider"
 		  follows="left|right|top"
-		  height="22"
+		  height="16"
 		  increment="0.05"
 		  initial_value="0.5"
 		  layout="topleft"
 		  tool_tip="Movie play progress"
-		  top="8"
 		  min_width="100"
 		  width="200">
 		<slider_bar.commit_callback
@@ -619,7 +623,7 @@ function="MediaCtrl.CommitURL" />
   </layout_stack>
   <layout_stack
 	  follows="left|right|bottom"
-	  height="32"
+	  height="20"
 	  layout="topleft"
 	  animate="false"
 	  left="0"
@@ -632,7 +636,7 @@ function="MediaCtrl.CommitURL" />
 		user_resize="false" />
 	<panel
 		name="media_progress_indicator"
-		height="22"
+		height="20"
 		layout="topleft"
 		left="0"
 		top="0"
@@ -644,6 +648,7 @@ function="MediaCtrl.CommitURL" />
 		  name="media_progress_bar"
 		  color_bar="1 1 1 0.96"
 		  follows="left|right|top"
+		  top="5"
 		  height="8"
 		  layout="topleft"
 		  left="0"