From 1ea60591a9b5f46a66527497b7b14b843a663de8 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Fri, 13 Nov 2009 20:33:59 -0500
Subject: Refactoring of llviewerprecompiledheaders.h to hopefully increase
 stability and reduce unnecessary dependencies and incredibuild wedging. 
 Hopefully in the long run this will reduce build time.  Also cleaned up a lot
 of header file usage to conform better to the coding standard.

reviewed by james and steve.
---
 indra/llcharacter/llkeyframemotion.h       |   1 -
 indra/llcommon/llapp.h                     |   3 -
 indra/llcommon/llapr.h                     |   8 +++
 indra/llcommon/llcommon.h                  |   1 -
 indra/llcommon/llerror.cpp                 |   3 -
 indra/llcommon/llthread.h                  |   1 +
 indra/llmessage/lliohttpserver.h           |   1 -
 indra/llplugin/llpluginprocessparent.h     |   1 +
 indra/llvfs/llpidlock.cpp                  |   9 +++
 indra/llvfs/llpidlock.h                    |  12 +---
 indra/newview/llappviewer.cpp              |   3 +
 indra/newview/llappviewer.h                |   1 +
 indra/newview/llfloateranimpreview.h       |   1 +
 indra/newview/llfloaterauction.cpp         |   2 +-
 indra/newview/llfloaterbump.cpp            |   6 +-
 indra/newview/llfloaterpostcard.cpp        |   3 +-
 indra/newview/llfloaterpostcard.h          |   4 +-
 indra/newview/llfloaterregioninfo.cpp      |   3 +-
 indra/newview/llfloaterregioninfo.h        |   4 ++
 indra/newview/llfloaterreporter.cpp        |   5 +-
 indra/newview/llfloaterurldisplay.cpp      |   5 +-
 indra/newview/llfloaterurlentry.cpp        |   2 +
 indra/newview/llfloaterworldmap.cpp        |   2 +-
 indra/newview/llgroupactions.cpp           |   2 +
 indra/newview/llimfloater.h                |   3 +-
 indra/newview/lllandmarkactions.cpp        |   1 +
 indra/newview/llnavigationbar.cpp          |  10 +--
 indra/newview/llnearbychatbar.cpp          |   2 +
 indra/newview/llpanellandmarks.cpp         |   1 +
 indra/newview/llpanelpicks.cpp             |   1 +
 indra/newview/llpanelplace.cpp             |   1 +
 indra/newview/llpanelplaceinfo.cpp         |   2 +
 indra/newview/llpanelplaceprofile.cpp      |   1 +
 indra/newview/llpreviewgesture.h           |   1 +
 indra/newview/llremoteparcelrequest.h      |   1 +
 indra/newview/lltexlayer.cpp               |   8 ++-
 indra/newview/lltexlayerparams.cpp         |   5 +-
 indra/newview/lltexlayerparams.h           |   4 ++
 indra/newview/lltexturecache.h             |   1 +
 indra/newview/lltexturefetch.cpp           |   2 +
 indra/newview/lltexturestatsuploader.cpp   |   2 +
 indra/newview/lltoastimpanel.cpp           |   1 +
 indra/newview/lltoastnotifypanel.cpp       |   1 +
 indra/newview/llurldispatcher.cpp          |   1 +
 indra/newview/llviewerassetstorage.cpp     |   9 +--
 indra/newview/llviewergenericmessage.h     |   1 +
 indra/newview/llviewerjoint.h              |   1 -
 indra/newview/llviewerjointmesh.h          |   1 -
 indra/newview/llviewermenu.h               |   1 +
 indra/newview/llviewermenufile.cpp         |   9 +++
 indra/newview/llviewermenufile.h           |   1 +
 indra/newview/llviewermessage.cpp          |   2 +
 indra/newview/llviewermessage.h            |   3 +
 indra/newview/llviewernetwork.cpp          |   5 +-
 indra/newview/llviewerprecompiledheaders.h | 104 +----------------------------
 indra/newview/llviewerstats.cpp            |   1 +
 indra/newview/llviewertexture.cpp          |  13 ++++
 indra/newview/llviewertexture.h            |  11 +--
 indra/newview/llviewertexturelist.h        |   1 +
 indra/newview/llviewerwindow.cpp           |   3 +-
 indra/newview/llviewerwindow.h             |   1 +
 indra/newview/llvoavatar.cpp               |   1 +
 indra/newview/llvovolume.h                 |   1 -
 indra/newview/llwaterparammanager.cpp      |   3 -
 indra/newview/llwldaycycle.cpp             |   6 +-
 indra/newview/llwlparammanager.cpp         |   5 --
 indra/newview/llworldmapmessage.cpp        |   1 +
 indra/newview/llxmlrpclistener.cpp         |   5 +-
 68 files changed, 151 insertions(+), 170 deletions(-)

diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 7e8c84488c..50d9d05046 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -47,7 +47,6 @@
 #include "llquaternion.h"
 #include "v3dmath.h"
 #include "v3math.h"
-#include "llapr.h"
 #include "llbvhconsts.h"
 
 class LLKeyframeDataCache;
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index 1a052ce62d..72b81f382c 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -34,7 +34,6 @@
 #define LL_LLAPP_H
 
 #include <map>
-#include "llapr.h"
 #include "llrun.h"
 #include "llsd.h"
 #include "lloptioninterface.h"
@@ -202,8 +201,6 @@ public:
 #if !LL_WINDOWS
 	static U32  getSigChildCount();
 	static void incSigChildCount();
-#else
-#define getpid GetCurrentProcessId
 #endif
 	static int getPid();
 
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index b08bb617c5..b05a222b33 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -38,6 +38,14 @@
 #if LL_LINUX || LL_SOLARIS
 #include <sys/param.h>  // Need PATH_MAX in APR headers...
 #endif
+#if LL_WINDOWS
+	// Limit Windows API to small and manageable set.
+	// If you get undefined symbols, find the appropriate
+	// Windows header file and include that in your .cpp file.
+	#define WIN32_LEAN_AND_MEAN
+	#include <winsock2.h>
+	#include <windows.h>
+#endif
 
 #include <boost/noncopyable.hpp>
 
diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h
index b36471f9f8..05eef25b21 100644
--- a/indra/llcommon/llcommon.h
+++ b/indra/llcommon/llcommon.h
@@ -33,7 +33,6 @@
 #define LL_COMMON_H
 
 // *TODO: remove these?
-#include "llapr.h"
 #include "lltimer.h"
 #include "llfile.h"
 
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 77c0c2294a..bd334a6654 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -45,9 +45,6 @@
 # include <syslog.h>
 # include <unistd.h>
 #endif // !LL_WINDOWS
-#if LL_WINDOWS
-# include <windows.h>
-#endif // LL_WINDOWS
 #include <vector>
 
 #include "llapp.h"
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index d8aa90de2e..adef1a9192 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -34,6 +34,7 @@
 #define LL_LLTHREAD_H
 
 #include "llapp.h"
+#include "llapr.h"
 #include "apr_thread_cond.h"
 
 class LLThread;
diff --git a/indra/llmessage/lliohttpserver.h b/indra/llmessage/lliohttpserver.h
index d1c9bdde85..e8e390f296 100644
--- a/indra/llmessage/lliohttpserver.h
+++ b/indra/llmessage/lliohttpserver.h
@@ -34,7 +34,6 @@
 #ifndef LL_LLIOHTTPSERVER_H
 #define LL_LLIOHTTPSERVER_H
 
-#include "llapr.h"
 #include "llchainio.h"
 #include "llhttpnode.h"
 
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 25669f5d78..17608063b5 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -34,6 +34,7 @@
 #ifndef LL_LLPLUGINPROCESSPARENT_H
 #define LL_LLPLUGINPROCESSPARENT_H
 
+#include "llapr.h"
 #include "llprocesslauncher.h"
 #include "llpluginmessage.h"
 #include "llpluginmessagepipe.h"
diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp
index 315baa001d..95e3692e10 100755
--- a/indra/llvfs/llpidlock.cpp
+++ b/indra/llvfs/llpidlock.cpp
@@ -41,6 +41,15 @@
 #include "llframetimer.h"
 
 #if LL_WINDOWS   //For windows platform.
+
+#include <windows.h>
+
+namespace {
+	inline DWORD getpid() {
+		return GetCurrentProcessId();
+	}
+}
+
 bool isProcessAlive(U32 pid)
 {
 	return (bool) GetProcessVersion((DWORD)pid);
diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h
index 42aee4dc4f..496e99cf5a 100755
--- a/indra/llvfs/llpidlock.h
+++ b/indra/llvfs/llpidlock.h
@@ -37,17 +37,9 @@
 class LLSD;
 class LLFrameTimer;
 
-#if LL_WINDOWS	//For windows platform.
-
-#include <windows.h>
-
-#define getpid GetCurrentProcessId
-
-#else	//Everyone Else
-
+#if !LL_WINDOWS	//For non-windows platforms.
 #include <signal.h>
-
-#endif //Everyone else.
+#endif
 
 namespace LLPidLock
 {
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index eb08707b61..79372b593a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -83,11 +83,14 @@
 #include "llsecondlifeurls.h"
 
 // Linden library includes
+#include "llimagej2c.h"
 #include "llmemory.h"
 #include "llprimitive.h"
 #include "llurlaction.h"
+#include "llvfile.h"
 #include "llvfsthread.h"
 #include "llvolumemgr.h"
+#include "llxfermanager.h"
 
 #include "llnotificationmanager.h"
 #include "llnotifications.h"
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index c1bfbca868..40e74061b5 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -325,6 +325,7 @@ extern BOOL		gUseWireframe;
 // VFS globals - gVFS is for general use
 // gStaticVFS is read-only and is shipped w/ the viewer
 // it has pre-cache data like the UI .TGAs
+class LLVFS;
 extern LLVFS	*gStaticVFS;
 
 extern LLMemoryInfo gSysMemory;
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index f1c4a6b0d0..2bf81476a2 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -33,6 +33,7 @@
 #ifndef LL_LLFLOATERANIMPREVIEW_H
 #define LL_LLFLOATERANIMPREVIEW_H
 
+#include "llassettype.h"
 #include "llfloaternamedesc.h"
 #include "lldynamictexture.h"
 #include "llcharacter.h"
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index b63bcccf6b..bbccbb8709 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -35,7 +35,6 @@
 #include "llfloaterauction.h"
 #include "llfloaterregioninfo.h"
 
-#include "lldir.h"
 #include "llgl.h"
 #include "llimagej2c.h"
 #include "llimagetga.h"
@@ -43,6 +42,7 @@
 #include "llvfile.h"
 #include "llvfs.h"
 #include "llwindow.h"
+#include "message.h"
 
 #include "llagent.h"
 #include "llcombobox.h"
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 68f06b1e5b..e925796526 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -33,11 +33,11 @@
  
 #include "llviewerprecompiledheaders.h"
 
-#include "llfloaterbump.h"
+#include "llsd.h"
+#include "mean_collision_data.h"
 
+#include "llfloaterbump.h"
 #include "llscrolllistctrl.h"
-
-#include "llsd.h"
 #include "lluictrlfactory.h"
 #include "llviewermessage.h"
 
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index 572eeb57fe..8da44e2035 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -56,9 +56,8 @@
 #include "llstatusbar.h"
 #include "llviewerregion.h"
 #include "lleconomy.h"
+#include "message.h"
 
-#include "llgl.h"
-#include "llglheaders.h"
 #include "llimagejpeg.h"
 #include "llimagej2c.h"
 #include "llvfile.h"
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
index 49cce53106..0a44b50779 100644
--- a/indra/newview/llfloaterpostcard.h
+++ b/indra/newview/llfloaterpostcard.h
@@ -70,7 +70,7 @@ public:
 
 	void sendPostcard();
 
-protected:
+private:
 	
 	LLPointer<LLImageJPEG> mJPEGImage;
 	LLPointer<LLViewerTexture> mViewerImage;
@@ -78,7 +78,7 @@ protected:
 	LLAssetID mAssetID;
 	LLVector2 mImageScale;
 	LLVector3d mPosTakenGlobal;
-	boolean mHasFirstMsgFocus;
+	bool mHasFirstMsgFocus;
 };
 
 
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 05a46ad894..00c46666f6 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -42,6 +42,8 @@
 #include "llglheaders.h"
 #include "llregionflags.h"
 #include "llstl.h"
+#include "llvfile.h"
+#include "llxfermanager.h"
 #include "indra_constants.h"
 #include "message.h"
 
@@ -53,7 +55,6 @@
 #include "llcheckboxctrl.h"
 #include "llcombobox.h"
 #include "llfilepicker.h"
-#include "llfloaterdaycycle.h"
 #include "llfloatergodtools.h"	// for send_sim_wide_deletes()
 #include "llfloatertopobjects.h" // added to fix SL-32336
 #include "llfloatergroups.h"
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index a3b91223b7..42ed5b6f42 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -35,9 +35,12 @@
 #define LL_LLFLOATERREGIONINFO_H
 
 #include <vector>
+#include "llassettype.h"
 #include "llfloater.h"
+#include "llhost.h"
 #include "llpanel.h"
 
+class LLDispatcher;
 class LLLineEditor;
 class LLMessageSystem;
 class LLPanelRegionInfo;
@@ -51,6 +54,7 @@ class LLNameListCtrl;
 class LLSliderCtrl;
 class LLSpinCtrl;
 class LLTextBox;
+class LLVFS;
 
 class LLPanelRegionGeneralInfo;
 class LLPanelRegionDebugInfo;
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 1f3bd50d5b..d9fcf6f7b7 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -40,12 +40,15 @@
 // linden library includes
 #include "llassetstorage.h"
 #include "llfontgl.h"
-#include "llgl.h"			// for renderer
+#include "llimagej2c.h"
 #include "llinventory.h"
 #include "llnotificationsutil.h"
 #include "llstring.h"
 #include "llsys.h"
 #include "llversionviewer.h"
+#include "llvfile.h"
+#include "llvfs.h"
+#include "mean_collision_data.h"
 #include "message.h"
 #include "v3math.h"
 
diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp
index 3b9321a876..4b67cbb308 100644
--- a/indra/newview/llfloaterurldisplay.cpp
+++ b/indra/newview/llfloaterurldisplay.cpp
@@ -33,13 +33,14 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llregionhandle.h"
+#include "v3dmath.h"
+
 #include "llfloaterurldisplay.h"
 
 #include "llpanelplace.h"
 #include "lluictrlfactory.h"
 
-#include "v3dmath.h"
-
 ////////////////////////////////////////////////////////////////////////////
 // LLFloaterURLDisplay
 
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 5e769feea6..91d0f0e370 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -32,6 +32,8 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llhttpclient.h"
+
 #include "llfloaterurlentry.h"
 
 #include "llpanellandmedia.h"
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 7ca491a698..98f9171237 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -74,8 +74,8 @@
 #include "llmapimagetype.h"
 #include "llweb.h"
 #include "llslider.h"
+#include "message.h"
 
-#include "llglheaders.h"
 #include "llwindow.h"			// copyTextToClipboard()
 
 //---------------------------------------------------------------------------
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index fdb2b886a6..4c7e71f040 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -35,6 +35,8 @@
 
 #include "llgroupactions.h"
 
+#include "message.h"
+
 #include "llagent.h"
 #include "llcommandhandler.h"
 #include "llfloaterreg.h"
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index f90bc35c34..ab3e15c6b2 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -33,9 +33,10 @@
 #ifndef LL_IMFLOATER_H
 #define LL_IMFLOATER_H
 
-#include "lltransientdockablefloater.h"
+#include "llinstantmessage.h"
 #include "lllogchat.h"
 #include "lltooldraganddrop.h"
+#include "lltransientdockablefloater.h"
 
 class LLLineEditor;
 class LLPanelChatControlPanel;
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 08d56f8b9f..f25d2ef574 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -38,6 +38,7 @@
 #include "llinventory.h"
 #include "lllandmark.h"
 #include "llparcel.h"
+#include "llregionhandle.h"
 
 #include "llnotificationsutil.h"
 
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index e65b7d8a0c..45ae8bdbb1 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -34,10 +34,12 @@
 
 #include "llnavigationbar.h"
 
-#include <llfloaterreg.h>
-#include <llfocusmgr.h>
-#include <lliconctrl.h>
-#include <llmenugl.h>
+#include "llregionhandle.h"
+
+#include "llfloaterreg.h"
+#include "llfocusmgr.h"
+#include "lliconctrl.h"
+#include "llmenugl.h"
 
 #include "llagent.h"
 #include "llviewerregion.h"
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 8fb4ea4211..8dbaa5ac53 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -32,6 +32,8 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "message.h"
+
 #include "llfloaterreg.h"
 #include "lltrans.h"
 
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 4ce6d14faa..4c99fca2dd 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -37,6 +37,7 @@
 #include "llfloaterreg.h"
 #include "llsdutil.h"
 #include "llsdutil_math.h"
+#include "llregionhandle.h"
 
 #include "llaccordionctrl.h"
 #include "llaccordionctrltab.h"
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index cc6e88a9d2..1569c102be 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -37,6 +37,7 @@
 #include "llagent.h"
 #include "llagentpicksinfo.h"
 #include "llavatarconstants.h"
+#include "lldispatcher.h"
 #include "llflatlistview.h"
 #include "llfloaterreg.h"
 #include "llfloaterworldmap.h"
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index 71d763b562..6985b73200 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -40,6 +40,7 @@
 #include "llsecondlifeurls.h"
 #include "llfloater.h"
 #include "llfloaterreg.h"
+#include "llregionhandle.h"
 
 #include "llagent.h"
 #include "llviewerwindow.h"
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 6ba3790fe2..b845f38ace 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -39,6 +39,8 @@
 #include "llsecondlifeurls.h"
 
 #include "llsdutil_math.h"
+#include "llregionhandle.h"
+#include "message.h"
 
 #include "lliconctrl.h"
 #include "lltextbox.h"
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 0c7cc9af38..402d50ba9c 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -35,6 +35,7 @@
 #include "llpanelplaceprofile.h"
 
 #include "llparcel.h"
+#include "message.h"
 
 #include "lliconctrl.h"
 #include "lllineeditor.h"
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 9d26539453..6241869e18 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -46,6 +46,7 @@ class LLScrollListItem;
 class LLButton;
 class LLGestureStep;
 class LLRadioGroup;
+class LLVFS;
 
 class LLPreviewGesture : public LLPreview
 {
diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h
index 3a16e25ef6..c04f6b1858 100644
--- a/indra/newview/llremoteparcelrequest.h
+++ b/indra/newview/llremoteparcelrequest.h
@@ -38,6 +38,7 @@
 #include "llhttpclient.h"
 #include "llpanel.h"
 
+class LLMessageSystem;
 class LLRemoteParcelInfoObserver;
 
 class LLRemoteParcelRequestResponder : public LLHTTPClient::Responder
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 8d3dcf8a99..72ef383be9 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -31,8 +31,14 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-#include "llagent.h"
+
 #include "lltexlayer.h"
+
+#include "llagent.h"
+#include "llimagej2c.h"
+#include "llimagetga.h"
+#include "llvfile.h"
+#include "llvfs.h"
 #include "llviewerstats.h"
 #include "llviewerregion.h"
 #include "llvoavatar.h"
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index 0c7e61d00e..d55468841d 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -30,11 +30,14 @@
  */
 
 #include "llviewerprecompiledheaders.h"
+
+#include "lltexlayerparams.h"
+
 #include "llagent.h"
+#include "llimagetga.h"
 #include "lltexlayer.h"
 #include "llvoavatarself.h"
 #include "llwearable.h"
-#include "lltexlayerparams.h"
 #include "llui.h"
 
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2b80dbdba4..93d01352d4 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -34,7 +34,11 @@
 
 #include "llviewervisualparam.h"
 
+class LLImageRaw;
+class LLImageTGA;
 class LLTexLayer;
+class LLTexLayerInterface;
+class LLViewerTexture;
 class LLVOAvatar;
 class LLWearable;
 
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index bc9c988648..4203cbbc43 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -40,6 +40,7 @@
 
 #include "llworkerthread.h"
 
+class LLImageFormatted;
 class LLTextureCacheWorker;
 
 class LLTextureCache : public LLWorkerThread
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 9bb2a4ad0a..40ee042eb1 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -43,8 +43,10 @@
 #include "llhttpclient.h"
 #include "llhttpstatuscodes.h"
 #include "llimage.h"
+#include "llimagej2c.h"
 #include "llimageworker.h"
 #include "llworkerthread.h"
+#include "message.h"
 
 #include "llagent.h"
 #include "lltexturecache.h"
diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp
index e0358e1fca..1df73db9b0 100644
--- a/indra/newview/lltexturestatsuploader.cpp
+++ b/indra/newview/lltexturestatsuploader.cpp
@@ -34,6 +34,8 @@
 
 #include "lltexturestatsuploader.h"
 
+#include "llhttpclient.h"
+
 LLTextureStatsUploader::LLTextureStatsUploader()
 {
 }
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index f928b5f243..ae1f87b6cf 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -34,6 +34,7 @@
 #include "lltoastimpanel.h"
 
 #include "llnotifications.h"
+#include "llinstantmessage.h"
 
 const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT	= 6;
 
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 6b9bff7b9e..766cf83a01 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -38,6 +38,7 @@
 #include "llviewercontrol.h"
 
 // library includes
+#include "lldbstrings.h"
 #include "llnotifications.h"
 #include "lluiconstants.h"
 #include "llrect.h"
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 46618d4026..164a45eed1 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -41,6 +41,7 @@
 #include "llfloaterurldisplay.h"
 #include "llfloaterworldmap.h"
 #include "llpanellogin.h"
+#include "llregionhandle.h"
 #include "llsidetray.h"
 #include "llslurl.h"
 #include "llstartup.h"			// gStartupState
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index c32e67ef90..440828da68 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -32,13 +32,14 @@
 
 #include "llviewerprecompiledheaders.h"
 
-#include "linden_common.h"
-
-#include "llagent.h"
 #include "llviewerassetstorage.h"
-#include "llviewerbuild.h"
+
 #include "llvfile.h"
 #include "llvfs.h"
+#include "message.h"
+
+#include "llagent.h"
+#include "llviewerbuild.h"
 
 LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
 										   LLVFS *vfs, const LLHost &upstream_host)
diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h
index 6e1f0945b8..6b0a2e5d81 100644
--- a/indra/newview/llviewergenericmessage.h
+++ b/indra/newview/llviewergenericmessage.h
@@ -36,6 +36,7 @@
 
 class LLUUID;
 class LLDispatcher;
+class LLMessageSystem;
 
 
 void send_generic_message(const std::string& method,
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index 0e993a2ebe..08c4ec36fd 100644
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -37,7 +37,6 @@
 // Header Files
 //-----------------------------------------------------------------------------
 #include "lljoint.h"
-#include "llapr.h"
 
 class LLFace;
 class LLViewerJointMesh;
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index 543679c44b..d62b0ada85 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -37,7 +37,6 @@
 #include "llviewertexture.h"
 #include "llpolymesh.h"
 #include "v4color.h"
-#include "llapr.h"
 
 class LLDrawable;
 class LLFace;
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 01a6b34170..8266452d85 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -36,6 +36,7 @@
 #include "llmenugl.h"
 #include "llsafehandle.h"
 
+class LLMessageSystem;
 class LLSD;
 class LLUICtrl;
 class LLView;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 4b0dc8f668..576528d543 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -40,6 +40,12 @@
 #include "llfloaterreg.h"
 #include "llfloaterbuycurrency.h"
 #include "llfloatersnapshot.h"
+#include "llimage.h"
+#include "llimagebmp.h"
+#include "llimagepng.h"
+#include "llimagej2c.h"
+#include "llimagejpeg.h"
+#include "llimagetga.h"
 #include "llinventorymodel.h"	// gInventory
 #include "llresourcedata.h"
 #include "llfloaterperms.h"
@@ -47,6 +53,8 @@
 #include "llviewercontrol.h"	// gSavedSettings
 #include "llviewertexturelist.h"
 #include "lluictrlfactory.h"
+#include "llvfile.h"
+#include "llvfs.h"
 #include "llviewerinventory.h"
 #include "llviewermenu.h"	// gMenuHolder
 #include "llviewerregion.h"
@@ -67,6 +75,7 @@
 #include "lltransactiontypes.h"
 #include "lluuid.h"
 #include "llvorbisencode.h"
+#include "message.h"
 
 // system libraries
 #include <boost/tokenizer.hpp>
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index da78537a29..1e6d13f1c6 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -34,6 +34,7 @@
 #define LLVIEWERMENUFILE_H
 
 #include "llfoldertype.h"
+#include "llassetstorage.h"
 #include "llinventorytype.h"
 
 class LLTransactionID;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 23d02af73d..33361f72cd 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -59,6 +59,8 @@
 #include "llteleportflags.h"
 #include "lltracker.h"
 #include "lltransactionflags.h"
+#include "llvfile.h"
+#include "llvfs.h"
 #include "llxfermanager.h"
 #include "message.h"
 #include "sound_ids.h"
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 1a98828010..8404d6fde0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -33,10 +33,12 @@
 #ifndef LL_LLVIEWERMESSAGE_H
 #define LL_LLVIEWERMESSAGE_H
 
+#include "llassettype.h"
 #include "llinstantmessage.h"
 #include "llpointer.h"
 #include "lltransactiontypes.h"
 #include "lluuid.h"
+#include "message.h"
 #include "stdenums.h"
 
 //
@@ -47,6 +49,7 @@ class LLInventoryObject;
 class LLInventoryItem;
 class LLMeanCollisionData;
 class LLMessageSystem;
+class LLVFS;
 class LLViewerObject;
 class LLViewerRegion;
 
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 801c46035a..d7b55d7e97 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -34,8 +34,11 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llviewernetwork.h"
-#include "llviewercontrol.h"
+
 #include "llevents.h"
+#include "net.h"
+
+#include "llviewercontrol.h"
 #include "lllogin.h"
 
 struct LLGridData
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 86f59b6e2f..93a980d9e8 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -41,17 +41,6 @@
 
 #include "linden_common.h"
 
-// We may want to take the windows.h include out, but it used to be in 
-// linden_common.h, and hence in all the libraries.  This is better. JC
-#if LL_WINDOWS
-	// Limit Windows API to small and manageable set.
-	// If you get undefined symbols, find the appropriate
-	// Windows header file and include that in your .cpp file.
-	#define WIN32_LEAN_AND_MEAN
-	#include <winsock2.h>
-	#include <windows.h>
-#endif
-
 // Work around stupid Microsoft STL warning
 #ifdef LL_WINDOWS
 #pragma warning (disable : 4702) // warning C4702: unreachable code
@@ -76,21 +65,14 @@
 //#include "llpreprocessor.h"
 #include "llallocator.h"
 #include "llapp.h"
-#include "llapr.h"
 #include "llcriticaldamp.h"
-//#include "lldarray.h"
-//#include "lldarrayptr.h"
 #include "lldefs.h"
 #include "lldepthstack.h"
-//#include "lldqueueptr.h"
-#include "llendianswizzle.h"
 #include "llerror.h"
 #include "llfasttimer.h"
 #include "llframetimer.h"
 #include "llhash.h"
 #include "lllocalidhashmap.h"
-#include "llmap.h"
-//#include "llmemory.h"
 #include "llnametable.h"
 #include "llpointer.h"
 #include "llpriqueuemap.h"
@@ -100,7 +82,6 @@
 //#include "llsecondlifeurls.h"
 #include "llsd.h"
 #include "llsingleton.h"
-#include "llstack.h"
 #include "llstat.h"
 #include "llstl.h"
 #include "llstrider.h"
@@ -118,19 +99,7 @@
 #include "timing.h"
 #include "u64.h"
 
-// Library includes from llimage
-//#include "llblockdata.h"
-#include "llimage.h"
-#include "llimagebmp.h"
-#include "llimagepng.h"
-#include "llimagej2c.h"
-#include "llimagejpeg.h"
-#include "llimagetga.h"
-#include "llmapimagetype.h"
-
 // Library includes from llmath project
-//#include "camera.h"
-//#include "coordframe.h"
 #include "llmath.h"
 #include "llbboxlocal.h"
 #include "llcamera.h"
@@ -158,80 +127,11 @@
 ////#include "vmath.h"
 #include "xform.h"
 
-// Library includes from llmessage project
-//#include "llassetstorage.h"
-#include "llcachename.h"
-#include "llcircuit.h"
-#include "lldatapacker.h"
-#include "lldbstrings.h"
-#include "lldispatcher.h"
-#include "lleventflags.h"
-#include "llhost.h"
-#include "llinstantmessage.h"
-#include "llinvite.h"
-//#include "llloginflags.h"
-#include "llmail.h"
-#include "llmessagethrottle.h"
-#include "llnamevalue.h"
-#include "llpacketack.h"
-#include "llpacketbuffer.h"
-#include "llpacketring.h"
-#include "llpartdata.h"
-//#include "llqueryflags.h"
-//#include "llregionflags.h"
-#include "llregionhandle.h"
-#include "lltaskname.h"
-#include "llteleportflags.h"
-#include "llthrottle.h"
-#include "lltransfermanager.h"
-#include "lltransfersourceasset.h"
-#include "lltransfersourcefile.h"
-#include "lltransfertargetfile.h"
-#include "lltransfertargetvfile.h"
-#include "lluseroperation.h"
-#include "llvehicleparams.h"
-#include "llxfer.h"
-#include "llxfer_file.h"
-#include "llxfer_mem.h"
-#include "llxfer_vfile.h"
-#include "llxfermanager.h"
-#include "machine.h"
-#include "mean_collision_data.h"
-#include "message.h"
-#include "message_prehash.h"
-#include "net.h"
-//#include "network.h"
-#include "partsyspacket.h"
-#include "patch_code.h"
-#include "patch_dct.h"
-#include "sound_ids.h"
-
-// Builds work with all headers below commented out as of 2009-09-10 JC
-
-// Library includes from llprimitive
-#include "imageids.h"
-#include "legacy_object_types.h"
-#include "llmaterialtable.h"
-//#include "llprimitive.h"
-#include "lltextureanim.h"
-//#include "lltextureentry.h"
-#include "lltreeparams.h"
-//#include "llvolume.h"
-#include "llvolumemgr.h"
-#include "material_codes.h"
-
 // Library includes from llvfs
-#include "llassettype.h"
 #include "lldir.h"
-//#include "lldir_linux.h"
-//#include "lldir_mac.h"
-//#include "lldir_win32.h"
-#include "llvfile.h"
-#include "llvfs.h"
 
-// Library includes from llui
-// In skinning-7, llui.h dependencies are changing too often.
-//#include "llui.h"
+// Library includes from llmessage project
+#include "llcachename.h"
 
 // llxuixml
 #include "llinitparam.h"
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 939d5e3970..a1a3bc6d6a 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -39,6 +39,7 @@
 #include "llfloaterreg.h"
 #include "llmemory.h"
 #include "lltimer.h"
+#include "llvfile.h"
 
 #include "llappviewer.h"
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 0d29efaedf..304b045423 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -108,6 +108,19 @@ const F64 log_2 = log(2.0);
 //----------------------------------------------------------------------------------------------
 //namespace: LLViewerTextureAccess
 //----------------------------------------------------------------------------------------------
+
+LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb,
+					  S32 discard_level,
+					  BOOL need_imageraw, // Needs image raw for the callback
+					  void* userdata ) 
+	: mCallback(cb),
+	  mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
+	  mDesiredDiscard(discard_level),
+	  mNeedsImageRaw(need_imageraw),
+	  mUserData(userdata)
+{
+}
+
 LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image)
 {
 	return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ;		
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 141979052d..d6fbd5d570 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -49,12 +49,14 @@
 
 class LLFace;
 class LLImageGL ;
+class LLImageRaw;
 class LLViewerObject;
 class LLViewerTexture;
 class LLViewerFetchedTexture ;
 class LLViewerMediaTexture ;
 class LLTexturePipelineTester ;
 
+
 typedef	void	(*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
 
 class LLVFile;
@@ -68,14 +70,7 @@ public:
 	LLLoadedCallbackEntry(loaded_callback_func cb,
 						  S32 discard_level,
 						  BOOL need_imageraw, // Needs image raw for the callback
-						  void* userdata ) 
-		: mCallback(cb),
-		  mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
-		  mDesiredDiscard(discard_level),
-		  mNeedsImageRaw(need_imageraw),
-		  mUserData(userdata)
-	{
-	}
+						  void* userdata );
 
 	loaded_callback_func	mCallback;
 	S32						mLastUsedDiscard;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 028f8441ab..ab55bfd04d 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -53,6 +53,7 @@ const BOOL GL_TEXTURE_NO = FALSE;
 const BOOL IMMEDIATE_YES = TRUE;
 const BOOL IMMEDIATE_NO = FALSE;
 
+class LLImageJ2C;
 class LLMessageSystem;
 class LLTextureView;
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9ba056a17c..e9f369ab1d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -32,6 +32,8 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llviewerwindow.h"
+
 #if LL_WINDOWS
 #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
 #endif
@@ -46,7 +48,6 @@
 #include "llpanellogin.h"
 #include "llviewerkeyboard.h"
 #include "llviewermenu.h"
-#include "llviewerwindow.h"
 
 #include "llviewquery.h"
 #include "llxmltree.h"
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 1d564a1338..2b87fabb4f 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -50,6 +50,7 @@
 #include "llmousehandler.h"
 #include "llcursortypes.h"
 #include "llhandle.h"
+#include "llimage.h"
 
 #include <boost/function.hpp>
 #include <boost/signals2.hpp>
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a9194c0c3b..9ff5769a3e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -45,6 +45,7 @@
 
 #include "llaudioengine.h"
 #include "noise.h"
+#include "sound_ids.h"
 
 #include "llagent.h" //  Get state values from here
 #include "llagentwearables.h"
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 06e214b41e..5e42b9fad4 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -37,7 +37,6 @@
 #include "llviewertexture.h"
 #include "llviewermedia.h"
 #include "llframetimer.h"
-#include "llapr.h"
 #include "m3math.h"		// LLMatrix3
 #include "m4math.h"		// LLMatrix4
 #include <map>
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index c8cc6a3d8e..839fc30688 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -51,16 +51,13 @@
 #include "llsdserialize.h"
 
 #include "v4math.h"
-#include "llviewerdisplay.h"
 #include "llviewercontrol.h"
-#include "llviewerwindow.h"
 #include "lldrawpoolwater.h"
 #include "llagent.h"
 #include "llviewerregion.h"
 
 #include "llwlparammanager.h"
 #include "llwaterparamset.h"
-#include "llpostprocess.h"
 #include "llfloaterwater.h"
 
 #include "curl/curl.h"
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index fcc43c2b1f..000d50795f 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -33,11 +33,13 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llwldaycycle.h"
-#include "llsdserialize.h"
-#include "llwlparammanager.h"
+
 #include "llnotificationsutil.h"
+#include "llsdserialize.h"
 #include "llxmlnode.h"
 
+#include "llwlparammanager.h"
+
 #include <map>
 
 LLWLDayCycle::LLWLDayCycle() : mDayRate(120)
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index c6fd35c142..d11a840545 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -42,17 +42,12 @@
 #include "llspinctrl.h"
 #include "llcheckboxctrl.h"
 #include "lluictrlfactory.h"
-#include "llviewercamera.h"
 #include "llcombobox.h"
 #include "lllineeditor.h"
 #include "llsdserialize.h"
 
 #include "v4math.h"
-#include "llviewerdisplay.h"
 #include "llviewercontrol.h"
-#include "llviewerwindow.h"
-#include "lldrawpoolwater.h"
-#include "llviewerregion.h"
 
 #include "llwlparamset.h"
 #include "llpostprocess.h"
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 6a074d9697..06040a574c 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -33,6 +33,7 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llworldmapmessage.h"
+#include "message.h"
 
 #include "llworldmap.h"
 #include "llagent.h"
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index af8cb6b9fb..15417614af 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -21,13 +21,14 @@
 // external library headers
 #include <boost/scoped_ptr.hpp>
 #include <boost/range.hpp>          // boost::begin(), boost::end()
+#include <xmlrpc-epi/xmlrpc.h>
+#include "curl/curl.h"
+
 // other Linden headers
 #include "llerror.h"
 #include "stringize.h"
 #include "llxmlrpctransaction.h"
 
-#include <xmlrpc-epi/xmlrpc.h>
-
 #if LL_WINDOWS
 #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
 #endif
-- 
cgit v1.2.3


From 256b8aba31ad92200d6449305d59bf5937f0563b Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 2 Dec 2009 20:20:12 -0800
Subject: Fixed some more header file usage after the recent rebasing of my old
 precompiled header work.

---
 indra/newview/llagent.cpp             | 2 +-
 indra/newview/lllogchat.cpp           | 2 ++
 indra/newview/llnotificationhandler.h | 1 +
 indra/newview/llpreviewgesture.h      | 3 ++-
 indra/newview/llpreviewscript.h       | 1 +
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2b582c90f0..628982973c 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -38,7 +38,6 @@
 #include "llagentlistener.h"
 #include "llagentwearables.h"
 #include "llagentui.h"
-
 #include "llanimationstates.h"
 #include "llbottomtray.h"
 #include "llcallingcard.h"
@@ -65,6 +64,7 @@
 #include "llsky.h"
 #include "llsmoothstep.h"
 #include "llstatusbar.h"
+#include "llteleportflags.h"
 #include "lltool.h"
 #include "lltoolmgr.h"
 #include "lltrans.h"
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 33fd3e3bf1..fc9654e9ad 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -39,6 +39,8 @@
 #include "lltrans.h"
 #include "llviewercontrol.h"
 
+#include "llinstantmessage.h"
+
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/regex.hpp>
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index da8928321a..c5f2ab9f46 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -39,6 +39,7 @@
 //#include "llnotificationsutil.h"
 #include "llchannelmanager.h"
 #include "llchat.h"
+#include "llinstantmessage.h"
 #include "llnotificationptr.h"
 
 namespace LLNotificationsUI
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 6241869e18..19fa1dcc37 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -33,8 +33,9 @@
 #ifndef LL_LLPREVIEWGESTURE_H
 #define LL_LLPREVIEWGESTURE_H
 
-#include "llpreview.h"
+#include "llassettype.h"
 #include "llmultigesture.h"
+#include "llpreview.h"
 
 class LLMultiGesture;
 class LLLineEditor;
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 28a409d3ee..9d194c5557 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -51,6 +51,7 @@ struct 	LLEntryAndEdCore;
 class LLMenuBarGL;
 class LLFloaterScriptSearch;
 class LLKeywordToken;
+class LLVFS;
 class LLViewerInventoryItem;
 
 // Inner, implementation class.  LLPreviewScript and LLLiveLSLEditor each own one of these.
-- 
cgit v1.2.3


From 7c69928ff8892f0cb4a3a6ad155106ebef7e1f8a Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 7 Dec 2009 18:43:47 -0800
Subject: Fixups for things broken after the last merge and for the linux
 build.

---
 indra/llcommon/llapp.h            | 3 +++
 indra/newview/llfilepicker.h      | 5 -----
 indra/newview/llviewermessage.cpp | 4 ++++
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index 72b81f382c..963ea38249 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -39,8 +39,11 @@
 #include "lloptioninterface.h"
 
 // Forward declarations
+template <typename Type> class LLAtomic32;
+typedef LLAtomic32<U32> LLAtomicU32;
 class LLErrorThread;
 class LLLiveFile;
+typedef struct siginfo siginfo_t;
 
 typedef void (*LLAppErrorHandler)();
 typedef void (*LLAppChildCallback)(int pid, bool exited, int status);
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index ab2455620f..7ecbc3db60 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -64,11 +64,6 @@ extern "C" {
 #if LL_GTK
 # include "gtk/gtk.h"
 #endif // LL_GTK
-
-// also mostly for Linux, for some X11-specific filepicker usability tweaks
-#if LL_X11
-#include "SDL/SDL_syswm.h"
-#endif
 }
 
 class LLFilePicker
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f72bbb70bf..d15214ed4b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -38,10 +38,14 @@
 #include "lleconomy.h"
 #include "llfloaterreg.h"
 #include "llfollowcamparams.h"
+#include "llregionhandle.h"
 #include "llsdserialize.h"
+#include "llteleportflags.h"
 #include "lltransactionflags.h"
 #include "llvfile.h"
 #include "llvfs.h"
+#include "llxfermanager.h"
+#include "mean_collision_data.h"
 
 #include "llagent.h"
 #include "llcallingcard.h"
-- 
cgit v1.2.3


From 08c0d3876bcddb2beeabb6fb2cd1a620eeb02576 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Thu, 10 Dec 2009 14:45:41 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- Implemented
 Actions to Mute/Unmute Participants without using Agent's Block List  --
 Updated missing strings to show error while moderating

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp            | 101 ++++++++++++++++++++-----
 indra/newview/llparticipantlist.h              |   4 +-
 indra/newview/skins/default/xui/en/strings.xml |   3 +
 3 files changed, 90 insertions(+), 18 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 48a7a32a3b..a42b5e48cc 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -341,7 +341,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const
 	if (uuids.size() == 0) return;
 
 	const LLUUID speaker_id = mUUIDs.front();
-	BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat);
+	BOOL is_muted = isMuted(speaker_id);
 
 	if (is_muted)
 	{
@@ -353,7 +353,6 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const
 		LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false);
 		LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false);
 	}
-
 }
 
 void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata)
@@ -390,14 +389,14 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u
 				{
 					gIMMgr->showSessionEventError(
 						"mute",
-						"not_a_moderator",
+						"not_a_mod_error",
 						mSessionID);
 				}
 				else
 				{
 					gIMMgr->showSessionEventError(
 						"mute",
-						"generic",
+						"generic_request_error",
 						mSessionID);
 				}
 			}
@@ -450,34 +449,102 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
 	toggleMute(userdata, LLMute::flagVoiceChat);
 }
 
+bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id)
+{
+	LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
+	if (!selected_speakerp) return true;
+
+	return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+}
+
 void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata)
 {
+	if (!gAgent.getRegion()) return;
 
+	bool moderate_selected = userdata.asString() == "selected";
+	const LLUUID& selected_avatar_id = mUUIDs.front();
+	bool is_muted = isMuted(selected_avatar_id);
+
+	if (moderate_selected)
+	{
+		moderateVoiceParticipant(selected_avatar_id, is_muted);
+	}
+	else
+	{
+		moderateVoiceOtherParticipants(selected_avatar_id, is_muted);
+	}
 }
-void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata)
+
+void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
+{
+	if (gAgentID == avatar_id) return; // do not process myself
+
+	std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+	LLSD data;
+	data["method"] = "mute update";
+	data["session-id"] = mParent.mSpeakerMgr->getSessionID();
+	data["params"] = LLSD::emptyMap();
+	data["params"]["agent_id"] = avatar_id;
+	data["params"]["mute_info"] = LLSD::emptyMap();
+	data["params"]["mute_info"]["voice"] = !unmute;
+
+	class MuteVoiceResponder : public LLHTTPClient::Responder
+	{
+	public:
+		MuteVoiceResponder(const LLUUID& session_id)
+		{
+			mSessionID = session_id;
+		}
+
+		virtual void error(U32 status, const std::string& reason)
+		{
+			llwarns << status << ": " << reason << llendl;
+
+			if ( gIMMgr )
+			{
+				//403 == you're not a mod
+				//should be disabled if you're not a moderator
+				if ( 403 == status )
+				{
+					gIMMgr->showSessionEventError(
+						"mute",
+						"not_a_mod_error",
+						mSessionID);
+				}
+				else
+				{
+					gIMMgr->showSessionEventError(
+						"mute",
+						"generic_request_error",
+						mSessionID);
+				}
+			}
+		}
+
+	private:
+		LLUUID mSessionID;
+	};
+
+	LLHTTPClient::post(
+		url,
+		data,
+		new MuteVoiceResponder(mParent.mSpeakerMgr->getSessionID()));
+}
+
+void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute)
 {
 	LLSpeakerMgr::speaker_list_t speakers;
 	mParent.mSpeakerMgr->getSpeakerList(&speakers, true);
 
-	const LLUUID& excluded_avatar_id = mUUIDs.front();
-	bool should_mute = userdata.asString() == "mute";
 	for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin();
 		iter != speakers.end(); ++iter)
 	{
 		LLSpeaker* speakerp = (*iter).get();
 		LLUUID speaker_id = speakerp->mID;
-		if (excluded_avatar_id == speaker_id) continue;
 
-		LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT);
+		if (excluded_avatar_id == speaker_id) continue;
 
-		if (should_mute)
-		{
-			LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat);
-		}
-		else
-		{
-			LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat);
-		}
+		moderateVoiceParticipant(speaker_id, unmute);
 	}
 
 }
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 83191a5b8d..388d0b4fee 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -130,8 +130,10 @@ class LLParticipantList
 			void toggleMuteVoice(const LLSD& userdata);
 		
 			// Voice moderation support
+			bool isMuted(const LLUUID& avatar_id);
 			void moderateVoice(const LLSD& userdata);
-			void moderateVoiceOtherParticipants(const LLSD& userdata);
+			void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
+			void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
 		};
 
 	private:
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c3650c71c3..8ac4ca95b9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2900,6 +2900,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
   <string name="message_session_event">
     Unable to send your message to the chat session with [RECIPIENT].
   </string>
+  <string name="mute">
+    Error while moderating.
+  </string>
   <string name="removed_from_group">
     You have been removed from the group.
   </string>
-- 
cgit v1.2.3


From e8d3afc99c3914a060384ee9eb6d2b673e76e36f Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Thu, 10 Dec 2009 15:15:45 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- Refactored
 moderating of text & voice chats to use the only LLHTTPClient::Responder
 class  -- added doxygen comments for voice moderation functions

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp | 118 +++++++++++++-----------------------
 indra/newview/llparticipantlist.h   |  39 ++++++++++++
 2 files changed, 81 insertions(+), 76 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index a42b5e48cc..9a6cafe0de 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -47,6 +47,44 @@
 #if LL_MSVC
 #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
 #endif
+
+class ModerationResponder : public LLHTTPClient::Responder
+{
+public:
+	ModerationResponder(const LLUUID& session_id)
+	{
+		mSessionID = session_id;
+	}
+
+	virtual void error(U32 status, const std::string& reason)
+	{
+		llwarns << status << ": " << reason << llendl;
+
+		if ( gIMMgr )
+		{
+			//403 == you're not a mod
+			//should be disabled if you're not a moderator
+			if ( 403 == status )
+			{
+				gIMMgr->showSessionEventError(
+					"mute",
+					"not_a_mod_error",
+					mSessionID);
+			}
+			else
+			{
+				gIMMgr->showSessionEventError(
+					"mute",
+					"generic_request_error",
+					mSessionID);
+			}
+		}
+	}
+
+private:
+	LLUUID mSessionID;
+};
+
 LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list,  bool use_context_menu/* = true*/):
 	mSpeakerMgr(data_source),
 	mAvatarList(avatar_list),
@@ -369,47 +407,10 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u
 	//current value represents ability to type, so invert
 	data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText;
 
-	class MuteTextResponder : public LLHTTPClient::Responder
-	{
-	public:
-		MuteTextResponder(const LLUUID& session_id)
-		{
-			mSessionID = session_id;
-		}
-
-		virtual void error(U32 status, const std::string& reason)
-		{
-			llwarns << status << ": " << reason << llendl;
-
-			if ( gIMMgr )
-			{
-				//403 == you're not a mod
-				//should be disabled if you're not a moderator
-				if ( 403 == status )
-				{
-					gIMMgr->showSessionEventError(
-						"mute",
-						"not_a_mod_error",
-						mSessionID);
-				}
-				else
-				{
-					gIMMgr->showSessionEventError(
-						"mute",
-						"generic_request_error",
-						mSessionID);
-				}
-			}
-		}
-
-	private:
-		LLUUID mSessionID;
-	};
-
 	LLHTTPClient::post(
 		url,
 		data,
-		new MuteTextResponder(mParent.mSpeakerMgr->getSessionID()));
+		new ModerationResponder(mParent.mSpeakerMgr->getSessionID()));
 }
 
 void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags)
@@ -488,47 +489,10 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL
 	data["params"]["mute_info"] = LLSD::emptyMap();
 	data["params"]["mute_info"]["voice"] = !unmute;
 
-	class MuteVoiceResponder : public LLHTTPClient::Responder
-	{
-	public:
-		MuteVoiceResponder(const LLUUID& session_id)
-		{
-			mSessionID = session_id;
-		}
-
-		virtual void error(U32 status, const std::string& reason)
-		{
-			llwarns << status << ": " << reason << llendl;
-
-			if ( gIMMgr )
-			{
-				//403 == you're not a mod
-				//should be disabled if you're not a moderator
-				if ( 403 == status )
-				{
-					gIMMgr->showSessionEventError(
-						"mute",
-						"not_a_mod_error",
-						mSessionID);
-				}
-				else
-				{
-					gIMMgr->showSessionEventError(
-						"mute",
-						"generic_request_error",
-						mSessionID);
-				}
-			}
-		}
-
-	private:
-		LLUUID mSessionID;
-	};
-
 	LLHTTPClient::post(
 		url,
 		data,
-		new MuteVoiceResponder(mParent.mSpeakerMgr->getSessionID()));
+		new ModerationResponder(mParent.mSpeakerMgr->getSessionID()));
 }
 
 void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute)
@@ -583,3 +547,5 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD&
 		}
 	return false;
 }
+
+//EOF
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 388d0b4fee..a130edb553 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -130,9 +130,48 @@ class LLParticipantList
 			void toggleMuteVoice(const LLSD& userdata);
 		
 			// Voice moderation support
+			/**
+			 * Check whether specified by argument avatar is muted for group chat or not.
+			 */
 			bool isMuted(const LLUUID& avatar_id);
+
+			/**
+			 * Processes Voice moderation menu items.
+			 *
+			 * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on
+			 * passed parameter.
+			 *
+			 * @param userdata can be "selected" or "others".
+			 *
+			 * @see moderateVoiceParticipant()
+			 * @see moderateVoiceOtherParticipants()
+			 */
 			void moderateVoice(const LLSD& userdata);
+
+			/**
+			 * Mutes/Unmutes avatar for current group voice chat.
+			 *
+			 * It only marks avatar as muted for session and does not use local Agent's Block list.
+			 * It does not mute Agent itself.
+			 *
+			 * @param[in] avatar_id UUID of avatar to be processed
+			 * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted.
+			 *
+			 * @see moderateVoiceOtherParticipants()
+			 */
 			void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
+
+			/**
+			 * Mutes/Unmutes all avatars except specified for current group voice chat.
+			 *
+			 * It only marks avatars as muted for session and does not use local Agent's Block list.
+			 * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted.
+			 *
+			 * @param[in] excluded_avatar_id UUID of avatar NOT to be processed
+			 * @param[in] unmute if true - avatars will be muted, otherwise - unmuted.
+			 *
+			 * @see moderateVoiceParticipant()
+			 */
 			void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute);
 		};
 
-- 
cgit v1.2.3


From 862681b53a61783d292782c2415e8c5caddde136 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Thu, 10 Dec 2009 20:07:16 +0200
Subject: Fixed normal bug EXT-3095 (Mute sign is shown in Voice control panel
 for speaking avatar (refer to screenshot))

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 895b4ed80e..d9fc4d54ab 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -263,13 +263,18 @@ void LLCallFloater::updateTitle()
 
 void LLCallFloater::initAgentData()
 {
-	childSetValue("user_icon", gAgentID);
+	LLPanel* my_panel = getChild<LLPanel> ("my_panel");
 
-	std::string name;
-	gCacheName->getFullName(gAgentID, name);
-	childSetValue("user_text", name);
+	if ( my_panel )
+	{
+		my_panel->childSetValue("user_icon", gAgentID);
+
+		std::string name;
+		gCacheName->getFullName(gAgentID, name);
+		my_panel->childSetValue("user_text", name);
 
-	LLOutputMonitorCtrl* speaking_indicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
-	speaking_indicator->setSpeakerId(gAgentID);
+		LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+		speaking_indicator->setSpeakerId(gAgentID);
+	}
 }
 //EOF
-- 
cgit v1.2.3


From 1967034ca0a71f95ddcd793187a3e07d3acc6639 Mon Sep 17 00:00:00 2001
From: Denis Serdjuk <dserduk@productengine.com>
Date: Thu, 10 Dec 2009 21:40:46 +0200
Subject: implemented task EXT-2609   Implement 'block' option for inventory
 offers

--HG--
branch : product-engine
---
 indra/newview/llscreenchannel.cpp                  | 37 ++++++++++++++++++++++
 indra/newview/llscreenchannel.h                    | 11 +++++++
 indra/newview/lltoast.h                            |  1 +
 indra/newview/llviewermessage.cpp                  | 30 ++++++++++++++----
 .../newview/skins/default/xui/en/notifications.xml |  8 ++---
 5 files changed, 76 insertions(+), 11 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index f66f725070..790be83e74 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -151,6 +151,33 @@ LLScreenChannel::~LLScreenChannel()
 	
 }
 
+std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
+{
+	std::list<LLToast*> res;
+
+	// collect stored toasts
+	for (std::vector<ToastElem>::iterator it = mStoredToastList.begin(); it
+			!= mStoredToastList.end(); it++)
+	{
+		if (matcher.matches(it->toast->getNotification()))
+		{
+			res.push_back(it->toast);
+		}
+	}
+
+	// collect displayed toasts
+	for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
+			!= mToastList.end(); it++)
+	{
+		if (matcher.matches(it->toast->getNotification()))
+		{
+			res.push_back(it->toast);
+		}
+	}
+
+	return res;
+}
+
 //--------------------------------------------------------------------------
 void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
 {
@@ -375,6 +402,16 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id)
 	}
 }
 
+void LLScreenChannel::killMatchedToasts(const Matcher& matcher)
+{
+	std::list<LLToast*> to_delete = findToasts(matcher);
+	for (std::list<LLToast*>::iterator it = to_delete.begin(); it
+			!= to_delete.end(); it++)
+	{
+		killToastByNotificationID((*it)-> getNotificationID());
+	}
+}
+
 //--------------------------------------------------------------------------
 void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
 {
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index b8efbb148f..321fb244a1 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -151,6 +151,16 @@ public:
 	LLScreenChannel(LLUUID& id);
 	virtual ~LLScreenChannel();
 
+	class Matcher
+	{
+	public:
+		Matcher(){}
+		virtual ~Matcher() {}
+		virtual bool matches(const LLNotificationPtr) const = 0;
+	};
+
+	std::list<LLToast*> findToasts(const Matcher& matcher);
+
 	// Channel's outfit-functions
 	// update channel's size and position in the World View
 	void		updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
@@ -162,6 +172,7 @@ public:
 	void		addToast(const LLToast::Params& p);
 	// kill or modify a toast by its ID
 	void		killToastByNotificationID(LLUUID id);
+	void		killMatchedToasts(const Matcher& matcher);
 	void		modifyToastByNotificationID(LLUUID id, LLPanel* panel);
 	// hide all toasts from screen, but not remove them from a channel
 	void		hideToastsFromScreen();
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 0c3c598704..3d25fd4f02 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -139,6 +139,7 @@ public:
 	// set whether this toast considered as hidden or not
 	void setIsHidden( bool is_toast_hidden ) { mIsHidden = is_toast_hidden; }
 
+	const LLNotificationPtr& getNotification() { return mNotification;}
 
 	// Registers signals/callbacks for events
 	toast_signal_t mOnFadeSignal;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 31bd264e3a..93d040844c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -926,34 +926,40 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
 void inventory_offer_mute_callback(const LLUUID& blocked_id,
 								   const std::string& first_name,
 								   const std::string& last_name,
-								   BOOL is_group)
+								   BOOL is_group, LLOfferInfo* offer = NULL)
 {
 	std::string from_name;
 	LLMute::EType type;
-
 	if (is_group)
 	{
 		type = LLMute::GROUP;
 		from_name = first_name;
 	}
+	else if(offer && offer->mFromObject)
+	{
+		//we have to block object by name because blocked_id is an id of owner
+		type = LLMute::BY_NAME;
+		from_name = offer->mFromName;
+	}
 	else
 	{
 		type = LLMute::AGENT;
 		from_name = first_name + " " + last_name;
 	}
 
-	LLMute mute(blocked_id, from_name, type);
+	// id should be null for BY_NAME mute, see  LLMuteList::add for details  
+	LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type);
 	if (LLMuteList::getInstance()->add(mute))
 	{
 		LLPanelBlockedList::showPanelAndSelect(blocked_id);
 	}
 
 	// purge the message queue of any previously queued inventory offers from the same source.
-	class OfferMatcher : public LLNotifyBoxView::Matcher
+	class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
 	{
 	public:
 		OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
-		BOOL matches(const LLNotificationPtr notification) const
+		bool matches(const LLNotificationPtr notification) const
 		{
 			if(notification->getName() == "ObjectGiveItem" 
 				|| notification->getName() == "ObjectGiveItemUnknownUser"
@@ -966,7 +972,17 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
 	private:
 		const LLUUID& blocked_id;
 	};
-	gNotifyBoxView->purgeMessagesMatching(OfferMatcher(blocked_id));
+
+	using namespace LLNotificationsUI;
+	LLChannelManager* channel_manager = LLChannelManager::getInstance();
+	LLScreenChannel
+			* screen_channel =
+					dynamic_cast<LLScreenChannel*> (channel_manager->findChannelByID(
+							LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+	if (screen_channel != NULL)
+	{
+		screen_channel->killMatchedToasts(OfferMatcher(blocked_id));
+	}
 }
 
 LLOfferInfo::LLOfferInfo(const LLSD& sd)
@@ -1196,7 +1212,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
 	// * we can't build two messages at once.
 	if (2 == button)
 	{
-		gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback);
+		gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
 	}
 	
 	LLMessageSystem* msg = gMessageSystem;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a6ed1f4c86..8c69699bb5 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5026,14 +5026,14 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O
        index="0"
        name="Keep"
        text="Keep"/>
-      <button
-       index="4"
-       name="Show"
-       text="Show"/> 
       <button
        index="1"
        name="Discard"
        text="Discard"/>
+      <button
+       index="2"
+       name="Mute"
+       text="Block"/>
     </form>
   </notification>
 
-- 
cgit v1.2.3


From b8b619ddebaeee68cd1cef694d43773d24cc5c7b Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Thu, 10 Dec 2009 22:49:19 +0200
Subject: Fixed broken highlighting of items matching filter in teleport
 history. Some forgot to replace all references to mFilterSubstring with
 sFilterSubstring.

--HG--
branch : product-engine
---
 indra/newview/llpanelteleporthistory.cpp | 6 +++---
 indra/newview/llpanelteleporthistory.h   | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 43f80f6d6a..596bd2909a 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -505,7 +505,7 @@ void LLTeleportHistoryPanel::refresh()
 			tab->setVisible(true);
 
 			// Expand all accordion tabs when filtering
-			if(!mFilterSubString.empty())
+			if(!sFilterSubString.empty())
 			{
 				tab->setDisplayChildren(true);
 			}
@@ -521,7 +521,7 @@ void LLTeleportHistoryPanel::refresh()
 
 		if (curr_flat_view)
 		{
-			LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString);
+			LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, sFilterSubString);
 			curr_flat_view->addItem(item);
 
 			if (mLastSelectedItemIndex == mCurrentItem)
@@ -569,7 +569,7 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
 	LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below
 									&mContextMenu,
 									history_items[history_items.size() - 1].mTitle, // Most recent item, it was
-									mFilterSubString);
+									sFilterSubString);
 															 // added instead of removed
 	fv->addItem(item, LLUUID::null, ADD_TOP);
 
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index f646fea355..0c0f891f32 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -109,7 +109,6 @@ private:
 	S32				mLastSelectedItemIndex;
 	bool				mDirty;
 	S32				mCurrentItem;
-	std::string				mFilterSubString;
 
 	typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t;
 	item_containers_t mItemContainers;
-- 
cgit v1.2.3


From 791465bab968a738568ddf0abaa5fa6766eb020d Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Fri, 11 Dec 2009 09:20:58 +0200
Subject: no ticket. fixing at least win build

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 93d040844c..bdc996c7d9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1078,7 +1078,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
 	// * we can't build two messages at once.
 	if (2 == button)
 	{
-		gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback);
+		gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
 	}
 
 	std::string from_string; // Used in the pop-up.
-- 
cgit v1.2.3


From 5e0bd59c616dea79cde604827074bc4be39a7cd1 Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Fri, 11 Dec 2009 12:13:52 +0200
Subject: synchronized creation of notification chiclet and notification window
 to avoid skipping notifications from notification window;

--HG--
branch : product-engine
---
 indra/newview/llchiclet.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 30967677e8..9671c048ef 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -53,6 +53,7 @@
 #include "llgroupmgr.h"
 #include "llnotificationmanager.h"
 #include "lltransientfloatermgr.h"
+#include "llsyswellwindow.h"
 
 static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
 static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well");
@@ -233,6 +234,10 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
 	connectCounterUpdatersToSignal("notify");
 	connectCounterUpdatersToSignal("groupnotify");
 	connectCounterUpdatersToSignal("offer");
+
+	// ensure that notification well window exists, to synchronously
+	// handle toast add/delete events.
+	LLNotificationWellWindow::getInstance();
 }
 
 void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type)
-- 
cgit v1.2.3


From ce621eafd8a115cc6c13a124453bbbda1bc43e13 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 11 Dec 2009 13:31:43 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- initial
 implementation of the speacker listener to handle moderation mute  -- added
 doxygen comments for voice moderation functions

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp | 56 ++++++++++++++++++++++++++++++++-----
 indra/newview/llparticipantlist.h   | 22 ++++++++++++++-
 2 files changed, 70 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 9a6cafe0de..e99a9a5d12 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -95,6 +95,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
 	mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
 	mSpeakerClearListener = new SpeakerClearListener(*this);
 	mSpeakerModeratorListener = new SpeakerModeratorUpdateListener(*this);
+	mSpeakerMuteListener = new SpeakerMuteListener(*this);
 
 	mSpeakerMgr->addListener(mSpeakerAddListener, "add");
 	mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove");
@@ -125,6 +126,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
 	for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++)
 	{
 		const LLPointer<LLSpeaker>& speakerp = *it;
+
 		addAvatarIDExceptAgent(group_members, speakerp->mID);
 		if ( speakerp->mIsModerator )
 		{
@@ -286,6 +288,24 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e
 	return true;
 }
 
+bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+	LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource();
+	if (speakerp.isNull()) return false;
+
+	// update UI on confirmation of moderator mutes
+	if (event->getValue().asString() == "voice")
+	{
+		LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mAvatarList->getItemByValue(speakerp->mID));
+		if (item)
+		{
+			LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+			indicator->setIsMuted(speakerp->mModeratorMutedVoice);
+		}
+	}
+	return true;
+}
+
 void LLParticipantList::sort()
 {
 	if ( !mAvatarList )
@@ -302,13 +322,21 @@ void LLParticipantList::sort()
 	}
 }
 
-// static
 void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id)
 {
-	if (gAgent.getID() != avatar_id)
-	{
-		existing_list.push_back(avatar_id);
-	}
+	if (gAgent.getID() == avatar_id) return;
+
+	existing_list.push_back(avatar_id);
+	adjustParticipant(avatar_id);
+}
+
+void LLParticipantList::adjustParticipant(const LLUUID& speaker_id)
+{
+	LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id);
+	if (speakerp.isNull()) return;
+
+	// add listener to process moderation changes
+	speakerp->addListener(mSpeakerMuteListener);
 }
 
 //
@@ -353,6 +381,11 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL
 		return mParent.onModeratorUpdateEvent(event, userdata);
 }
 
+bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+	return mParent.onSpeakerMuteEvent(event, userdata);
+}
+
 LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
 {
 	// set up the callbacks for all of the avatar menu items
@@ -480,6 +513,16 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL
 {
 	if (gAgentID == avatar_id) return; // do not process myself
 
+	LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
+	if (!speakerp) return;
+
+	// *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for
+	// text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE)
+	bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+
+	// do not send voice moderation changes for avatars not in voice channel
+	if (!is_in_voice) return;
+
 	std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
 	LLSD data;
 	data["method"] = "mute update";
@@ -498,7 +541,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL
 void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute)
 {
 	LLSpeakerMgr::speaker_list_t speakers;
-	mParent.mSpeakerMgr->getSpeakerList(&speakers, true);
+	mParent.mSpeakerMgr->getSpeakerList(&speakers, FALSE);
 
 	for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin();
 		iter != speakers.end(); ++iter)
@@ -510,7 +553,6 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co
 
 		moderateVoiceParticipant(speaker_id, unmute);
 	}
-
 }
 
 bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index a130edb553..229769ec09 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -64,6 +64,7 @@ class LLParticipantList
 		bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
 		bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
 		bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+		bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
 
 		/**
 		 * Sorts the Avatarlist by stored order
@@ -109,6 +110,14 @@ class LLParticipantList
 			/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
 		};
 		
+		class SpeakerMuteListener : public BaseSpeakerListner
+		{
+		public:
+			SpeakerMuteListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {}
+
+			/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+		};
+
 		/**
 		 * Menu used in the participant list.
 		 */
@@ -181,8 +190,18 @@ class LLParticipantList
 
 		/**
 		 * Adds specified avatar ID to the existing list if it is not Agent's ID
+		 *
+		 * @param[in, out] existing_list - vector with avatars' UUIDs already in the list
+		 * @param[in] avatar_id - Avatar UUID to be added into the list
+		 */
+		void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+
+		/**
+		 * Adjusts passed participant to work properly.
+		 *
+		 * Adds SpeakerMuteListener to process moderation actions.
 		 */
-		static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id);
+		void adjustParticipant(const LLUUID& speaker_id);
 
 		LLSpeakerMgr*		mSpeakerMgr;
 		LLAvatarList*		mAvatarList;
@@ -194,6 +213,7 @@ class LLParticipantList
 		LLPointer<SpeakerRemoveListener>			mSpeakerRemoveListener;
 		LLPointer<SpeakerClearListener>				mSpeakerClearListener;
 		LLPointer<SpeakerModeratorUpdateListener>	mSpeakerModeratorListener;
+		LLPointer<SpeakerMuteListener>				mSpeakerMuteListener;
 
 		LLParticipantListMenu*    mParticipantListMenu;
 
-- 
cgit v1.2.3


From 4fc7b91a795fb4ad0eaf3b6c7a1779679889fcbf Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Fri, 11 Dec 2009 14:26:27 +0200
Subject: =?UTF-8?q?implemented=20EXT-2323=20=E2=80=9CGet=20rid=20from=20ob?=
 =?UTF-8?q?solete=20notification=20widgets=E2=80=9D;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/llui/CMakeLists.txt                 |  2 --
 indra/llui/llpanel.cpp                    |  1 -
 indra/newview/CMakeLists.txt              |  4 ----
 indra/newview/llagentwearables.cpp        |  1 -
 indra/newview/llappviewer.cpp             |  2 --
 indra/newview/llassetuploadresponders.cpp |  1 -
 indra/newview/llcallingcard.cpp           |  1 -
 indra/newview/llchannelmanager.cpp        | 11 +++++++++++
 indra/newview/llchannelmanager.h          |  5 +++++
 indra/newview/lldelayedgestureerror.cpp   |  1 -
 indra/newview/lleventnotifier.cpp         |  1 -
 indra/newview/llfirstuse.cpp              |  1 -
 indra/newview/llfloaterauction.cpp        |  1 -
 indra/newview/llfloaterbuy.cpp            |  1 -
 indra/newview/llfloaterbuycontents.cpp    |  1 -
 indra/newview/llfloaterbuyland.cpp        |  1 -
 indra/newview/llfloaterfriends.cpp        |  1 -
 indra/newview/llfloatergodtools.cpp       |  2 --
 indra/newview/llfloaterhud.cpp            |  1 -
 indra/newview/llfloaterland.cpp           |  1 -
 indra/newview/llfloateropenobject.cpp     |  1 -
 indra/newview/llfloaterperms.cpp          |  1 -
 indra/newview/llfloaterregioninfo.cpp     |  2 --
 indra/newview/llfloatersellland.cpp       |  1 -
 indra/newview/llgesturemgr.cpp            |  1 -
 indra/newview/llimpanel.cpp               |  1 -
 indra/newview/llimview.cpp                |  1 -
 indra/newview/lllandmarklist.cpp          |  1 -
 indra/newview/llmenucommands.cpp          |  1 -
 indra/newview/llpanelclassified.cpp       |  1 -
 indra/newview/llpanelgrouproles.cpp       |  1 -
 indra/newview/llpanellogin.cpp            |  1 -
 indra/newview/llpreviewgesture.cpp        |  1 -
 indra/newview/llpreviewnotecard.cpp       |  1 -
 indra/newview/llpreviewscript.cpp         |  1 -
 indra/newview/llstartup.cpp               |  1 -
 indra/newview/llstatusbar.cpp             |  1 -
 indra/newview/lltoastalertpanel.cpp       |  6 +-----
 indra/newview/lltoastalertpanel.h         | 19 +++++++++++--------
 indra/newview/lltoastgroupnotifypanel.cpp |  1 -
 indra/newview/llviewercontrol.cpp         |  5 -----
 indra/newview/llviewerinventory.cpp       |  1 -
 indra/newview/llviewermessage.cpp         | 24 ++++++++----------------
 indra/newview/llviewerparcelmgr.cpp       |  1 -
 indra/newview/llviewertexteditor.cpp      |  1 -
 indra/newview/llviewerwindow.cpp          |  9 ---------
 indra/newview/llvoavatar.cpp              |  1 -
 indra/newview/llwearablelist.cpp          |  1 -
 indra/newview/llweb.cpp                   |  4 +---
 49 files changed, 37 insertions(+), 94 deletions(-)

diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 74b49b846e..82ec02d2eb 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -26,7 +26,6 @@ include_directories(
     )
 
 set(llui_SOURCE_FILES
-    llalertdialog.cpp
     llbutton.cpp
     llcheckboxctrl.cpp
     llclipboard.cpp
@@ -112,7 +111,6 @@ set(llui_SOURCE_FILES
 set(llui_HEADER_FILES
     CMakeLists.txt
 
-    llalertdialog.h
     llbutton.h
     llcallbackmap.h
     llcheckboxctrl.h
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 750b190953..de2b43bf13 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -37,7 +37,6 @@
 #define LLPANEL_CPP
 #include "llpanel.h"
 
-#include "llalertdialog.h"
 #include "llfocusmgr.h"
 #include "llfontgl.h"
 #include "llrect.h"
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index be6bce8054..a9dc1eed24 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -227,7 +227,6 @@ set(viewer_SOURCE_FILES
     llgroupactions.cpp
     llgrouplist.cpp
     llgroupmgr.cpp
-    llgroupnotify.cpp
     llhomelocationresponder.cpp
     llhudeffect.cpp
     llhudeffectbeam.cpp
@@ -298,7 +297,6 @@ set(viewer_SOURCE_FILES
     llnotificationofferhandler.cpp
     llnotificationscripthandler.cpp
     llnotificationtiphandler.cpp
-    llnotify.cpp
     lloutputmonitorctrl.cpp
     lloverlaybar.cpp
     llpanelavatar.cpp
@@ -734,7 +732,6 @@ set(viewer_HEADER_FILES
     llgroupactions.h
     llgrouplist.h
     llgroupmgr.h
-    llgroupnotify.h
     llhomelocationresponder.h
     llhudeffect.h
     llhudeffectbeam.h
@@ -800,7 +797,6 @@ set(viewer_HEADER_FILES
     llnetmap.h
     llnotificationhandler.h
     llnotificationmanager.h
-    llnotify.h
     lloutputmonitorctrl.h
     lloverlaybar.h
     llpanelavatar.h
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 3114a37ada..1e2eac39eb 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -41,7 +41,6 @@
 #include "llinventoryobserver.h"
 #include "llinventorypanel.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llviewerregion.h"
 #include "llvoavatarself.h"
 #include "llwearable.h"
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9a1b749ba7..2fc7a630ae 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -39,7 +39,6 @@
 #include "llfeaturemanager.h"
 #include "lluictrlfactory.h"
 #include "lltexteditor.h"
-#include "llalertdialog.h"
 #include "llerrorcontrol.h"
 #include "llviewertexturelist.h"
 #include "llgroupmgr.h"
@@ -109,7 +108,6 @@
 #include "apr_dso.h"
 #include <boost/lexical_cast.hpp>
 
-#include "llnotify.h"
 #include "llviewerkeyboard.h"
 #include "lllfsthread.h"
 #include "llworkerthread.h"
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 1d03cc8823..a2322e28b4 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -39,7 +39,6 @@
 #include "llcompilequeue.h"
 #include "llfloaterbuycurrency.h"
 #include "llfilepicker.h"
-#include "llnotify.h"
 #include "llinventoryobserver.h"
 #include "llinventorypanel.h"
 #include "llpermissionsflags.h"
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 714bd20ab8..82413878ad 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -55,7 +55,6 @@
 #include "llinventorymodel.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llresmgr.h"
 #include "llimview.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 415c118ff1..cbb566b3a7 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -228,3 +228,14 @@ void LLChannelManager::muteAllChannels(bool mute)
 	}
 }
 
+void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher)
+{
+	LLScreenChannel
+			* screen_channel =
+					dynamic_cast<LLScreenChannel*> (findChannelByID(channel_id));
+	if (screen_channel != NULL)
+	{
+		screen_channel->killMatchedToasts(matcher);
+	}
+}
+
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index 4b66a1ef89..c2be39122f 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -109,6 +109,11 @@ public:
 	 */
 	void muteAllChannels(bool mute);
 
+	/**
+	 * Kills matched toasts from specified  toast screen channel.
+	 */
+	void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher);
+
 private:
 
 	LLScreenChannel* createChannel(LLChannelManager::Params& p);
diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp
index 411cb331a8..ead377deb0 100644
--- a/indra/newview/lldelayedgestureerror.cpp
+++ b/indra/newview/lldelayedgestureerror.cpp
@@ -36,7 +36,6 @@
 
 #include <list>
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llcallbacklist.h"
 #include "llinventory.h"
 #include "llviewerinventory.h"
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index b64799bd86..edfb9dc864 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -37,7 +37,6 @@
 #include "llnotificationsutil.h"
 #include "message.h"
 
-#include "llnotify.h"
 #include "lleventinfo.h"
 #include "llfloaterreg.h"
 #include "llfloaterworldmap.h"
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 0bcdad5da1..7fd0e070be 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -40,7 +40,6 @@
 
 // viewer includes
 #include "llagent.h"	// for gAgent.inPrelude()
-#include "llnotify.h"
 #include "llviewercontrol.h"
 #include "llui.h"
 #include "llappviewer.h"
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index b63bcccf6b..c1a4a845e5 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -48,7 +48,6 @@
 #include "llcombobox.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llsavedsettingsglue.h"
 #include "llviewertexturelist.h"
 #include "llviewerparcelmgr.h"
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 16a5bb63e7..fba557c656 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -41,7 +41,6 @@
 #include "llfloaterbuy.h"
 
 #include "llagent.h"			// for agent id
-#include "llalertdialog.h"
 #include "llinventorymodel.h"	// for gInventory
 #include "llfloaterreg.h"
 #include "llfloaterinventory.h"	// for get_item_icon
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 39c7bc02af..0daef27af2 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -43,7 +43,6 @@
 #include "llcachename.h"
 
 #include "llagent.h"			// for agent id
-#include "llalertdialog.h"
 #include "llcheckboxctrl.h"
 #include "llinventoryfunctions.h"
 #include "llinventorymodel.h"	// for gInventory
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 3a8c3ab4d2..9b88923e7e 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -49,7 +49,6 @@
 #include "lliconctrl.h"
 #include "lllineeditor.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llparcel.h"
 #include "llslurl.h"
 #include "llstatusbar.h"
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 1482d3fe21..56291c57a6 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -50,7 +50,6 @@
 #include "llinventorymodel.h"
 #include "llnamelistctrl.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llresmgr.h"
 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 04ba11530a..e1409b8ad5 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -45,7 +45,6 @@
 #include "message.h"
 
 #include "llagent.h"
-#include "llalertdialog.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
 #include "llcombobox.h"
@@ -69,7 +68,6 @@
 #include "llviewerwindow.h"
 #include "llworld.h"
 #include "llfloateravatarpicker.h"
-#include "llnotify.h"
 #include "llxfermanager.h"
 #include "llvlcomposition.h"
 #include "llsurface.h"
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 14cff3bcc3..d2ee3e44c5 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -37,7 +37,6 @@
 // Viewer libs
 #include "llviewercontrol.h"
 #include "llmediactrl.h"
-#include "llalertdialog.h"
 
 // Linden libs
 #include "llnotificationsutil.h"
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index ed0f24d160..7a4a12d3dc 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -55,7 +55,6 @@
 #include "llavataractions.h"
 #include "lllineeditor.h"
 #include "llnamelistctrl.h"
-#include "llnotify.h"
 #include "llpanellandaudio.h"
 #include "llpanellandmedia.h"
 #include "llradiogroup.h"
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 56a86c2cb7..51c18196f2 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -44,7 +44,6 @@
 #include "llnotificationsutil.h"
 #include "lltextbox.h"
 
-#include "llalertdialog.h"
 #include "llinventorybridge.h"
 #include "llfloaterinventory.h"
 #include "llinventorymodel.h"
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 17bb8221ad..7edc27d4c3 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -32,7 +32,6 @@
  */
 
 #include "llviewerprecompiledheaders.h"
-#include "llalertdialog.h"
 #include "llcheckboxctrl.h"
 #include "llfloaterperms.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 05a46ad894..4e5b7e45ac 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -46,7 +46,6 @@
 #include "message.h"
 
 #include "llagent.h"
-#include "llalertdialog.h"
 #include "llappviewer.h"
 #include "llfloateravatarpicker.h"
 #include "llbutton.h" 
@@ -62,7 +61,6 @@
 #include "llfloaterwindlight.h"
 #include "llinventorymodel.h"
 #include "lllineeditor.h"
-#include "llalertdialog.h"
 #include "llnamelistctrl.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 49e8f9c956..e5260aa7b9 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -39,7 +39,6 @@
 #include "lllineeditor.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llparcel.h"
 #include "llselectmgr.h"
 #include "lltexturectrl.h"
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 4f487ddf04..df7aa9eabf 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -52,7 +52,6 @@
 #include "llagent.h"
 #include "lldelayedgestureerror.h"
 #include "llinventorymodel.h"
-#include "llnotify.h"
 #include "llviewermessage.h"
 #include "llvoavatarself.h"
 #include "llviewerstats.h"
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index e6ded5f371..8b6762ce38 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -66,7 +66,6 @@
 #include "llimview.h"                  // for LLIMModel to get other avatar id in chat
 #include "llkeyboard.h"
 #include "lllineeditor.h"
-#include "llnotify.h"
 #include "llpanelimcontrolpanel.h"
 #include "llrecentpeople.h"
 #include "llresmgr.h"
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fd1fb38914..95b4196f5f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -72,7 +72,6 @@
 #include "llviewerwindow.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llnearbychat.h"
 #include "llviewerregion.h"
 #include "llvoicechannel.h"
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index d613cf6ba4..bd9d22c327 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -39,7 +39,6 @@
 
 #include "llappviewer.h"
 #include "llagent.h"
-#include "llnotify.h"
 #include "llvfile.h"
 #include "llviewerstats.h"
 
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
index 28ddaa61c4..a2aef9ba63 100644
--- a/indra/newview/llmenucommands.cpp
+++ b/indra/newview/llmenucommands.cpp
@@ -49,7 +49,6 @@
 #include "llfloaterchat.h"
 #include "llfloaterworldmap.h"
 #include "lllineeditor.h"
-#include "llnotify.h"
 #include "llstatusbar.h"
 #include "llimview.h"
 #include "lltextbox.h"
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 70d92442ad..0dae667e7f 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -48,7 +48,6 @@
 #include "message.h"
 
 #include "llagent.h"
-#include "llalertdialog.h"
 #include "llavataractions.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index b6c58808ae..29b647415c 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -44,7 +44,6 @@
 #include "llnamelistctrl.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llpanelgrouproles.h"
 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index a729b8c06f..47dc2fb984 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -62,7 +62,6 @@
 #include "llviewermenu.h"			// for handle_preferences()
 #include "llviewernetwork.h"
 #include "llviewerwindow.h"			// to link into child list
-#include "llnotify.h"
 #include "llurlsimstring.h"
 #include "lluictrlfactory.h"
 #include "llhttpclient.h"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 30cb21c83c..f1891aa421 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -59,7 +59,6 @@
 #include "llinventorymodel.h"
 #include "llkeyboard.h"
 #include "lllineeditor.h"
-#include "llnotify.h"
 #include "llradiogroup.h"
 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 5d675fcda6..95756ac5f3 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -44,7 +44,6 @@
 #include "llinventorymodel.h"
 #include "lllineeditor.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llresmgr.h"
 #include "roles_constants.h"
 #include "llscrollbar.h"
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 8d80310769..646c9fb6a4 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -61,7 +61,6 @@
 #include "llvfile.h"
 
 #include "llagent.h"
-#include "llnotify.h"
 #include "llmenugl.h"
 #include "roles_constants.h"
 #include "llselectmgr.h"
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index d8d1760c38..84d6d66413 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -121,7 +121,6 @@
 #include "lllogininstance.h" // Host the login module.
 #include "llpanellogin.h"
 #include "llmutelist.h"
-#include "llnotify.h"
 #include "llpanelavatar.h"
 #include "llavatarpropertiesprocessor.h"
 #include "llpanelevent.h"
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 4915720036..9e72464237 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -50,7 +50,6 @@
 #include "llkeyboard.h"
 #include "lllineeditor.h"
 #include "llmenugl.h"
-#include "llnotify.h"
 #include "llimview.h"
 #include "llsd.h"
 #include "lltextbox.h"
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index a4f5164a8d..c48301fa1e 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -30,10 +30,6 @@
  * $/LicenseInfo$
  */
 
-// *NOTE: this module is a copy-paste of llui/llalertdialog.h
-// Can we re-implement this as a subclass of LLAlertDialog and
-// avoid all this code duplication? It already caused EXT-2232.
-
 #include "llviewerprecompiledheaders.h" // must be first include
 
 #include "linden_common.h"
@@ -60,7 +56,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f;
 const S32 MSG_PAD = 8;
 
 /*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
-/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader;
+/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
 
 //-----------------------------------------------------------------------------
 // Private methods
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index 38a635e8a4..875ab82c54 100644
--- a/indra/newview/lltoastalertpanel.h
+++ b/indra/newview/lltoastalertpanel.h
@@ -30,10 +30,6 @@
  * $/LicenseInfo$
  */
 
-// *NOTE: this module is a copy-paste of llui/llalertdialog.h
-// Can we re-implement this as a subclass of LLAlertDialog and
-// avoid all this code duplication? It already caused EXT-2232.
-
 #ifndef LL_TOASTALERTPANEL_H
 #define LL_TOASTALERTPANEL_H
 
@@ -41,11 +37,9 @@
 #include "llfloater.h"
 #include "llui.h"
 #include "llnotificationptr.h"
-#include "llalertdialog.h"
 
 class LLButton;
 class LLCheckBoxCtrl;
-class LLAlertDialogTemplate;
 class LLLineEditor;
 
 /**
@@ -62,7 +56,16 @@ class LLToastAlertPanel
 public:
 	typedef bool (*display_callback_t)(S32 modal);
 
-	static void setURLLoader(LLAlertURLLoader* loader)
+	class URLLoader
+	{
+	public:
+		virtual void load(const std::string& url, bool force_open_externally = 0) = 0;
+		virtual ~URLLoader()
+		{
+		}
+	};
+
+	static void setURLLoader(URLLoader* loader)
 	{
 		sURLLoader = loader;
 	}
@@ -95,7 +98,7 @@ private:
 	BOOL hasTitleBar() const;
 
 private:
-	static LLAlertURLLoader* sURLLoader;
+	static URLLoader* sURLLoader;
 	static LLControlGroup* sSettings;
 
 	struct ButtonData
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index eacc077a65..e49044cdca 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -40,7 +40,6 @@
 #include "lliconctrl.h"
 #include "llinventoryfunctions.h"
 #include "llnotifications.h"
-#include "llnotify.h"
 #include "llviewertexteditor.h"
 
 #include "lluiconstants.h"
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 6339d23fa7..91de7d9ba2 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -63,7 +63,6 @@
 #include "llviewerjoystick.h"
 #include "llviewerparcelmgr.h"
 #include "llparcel.h"
-#include "llnotify.h"
 #include "lloverlaybar.h"
 #include "llkeyboard.h"
 #include "llerrorcontrol.h"
@@ -517,14 +516,12 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
 bool toggle_show_navigation_panel(const LLSD& newvalue)
 {
 	LLRect floater_view_rect = gFloaterView->getRect();
-	LLRect notify_view_rect = gNotifyBoxView->getRect();
 	LLNavigationBar* navbar = LLNavigationBar::getInstance();
 	
 	//if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher, 
 	//and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
 	int pm=newvalue.asBoolean()?-1:1;
 	floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
-	notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
 	gFloaterView->setRect(floater_view_rect);
 	floater_view_rect = gFloaterView->getRect();
 	navbar->showNavigationPanel(newvalue.asBoolean());
@@ -534,14 +531,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue)
 bool toggle_show_favorites_panel(const LLSD& newvalue)
 {
 	LLRect floater_view_rect = gFloaterView->getRect();
-	LLRect notify_view_rect = gNotifyBoxView->getRect();
 	LLNavigationBar* navbar = LLNavigationBar::getInstance();
 	
 	//if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher, 
 	//and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
 	int pm=newvalue.asBoolean()?-1:1;
 	floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
-	notify_view_rect.mTop += pm*navbar->getDefFavBarHeight();
 	gFloaterView->setRect(floater_view_rect);
 	navbar->showFavoritesPanel(newvalue.asBoolean());
 	return true;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9856cb2b7f..72031a699f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -43,7 +43,6 @@
 #include "llviewercontrol.h"
 #include "llconsole.h"
 #include "llinventorymodel.h"
-#include "llnotify.h"
 #include "llgesturemgr.h"
 
 #include "llinventorybridge.h"
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index bdc996c7d9..8fe18c56c9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -59,7 +59,6 @@
 #include "llnearbychat.h"
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llpanelgrouplandmoney.h"
 #include "llpanelplaces.h"
 #include "llrecentpeople.h"
@@ -973,16 +972,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
 		const LLUUID& blocked_id;
 	};
 
-	using namespace LLNotificationsUI;
-	LLChannelManager* channel_manager = LLChannelManager::getInstance();
-	LLScreenChannel
-			* screen_channel =
-					dynamic_cast<LLScreenChannel*> (channel_manager->findChannelByID(
-							LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
-	if (screen_channel != NULL)
-	{
-		screen_channel->killMatchedToasts(OfferMatcher(blocked_id));
-	}
+	LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
+			gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));
 }
 
 LLOfferInfo::LLOfferInfo(const LLSD& sd)
@@ -4847,24 +4838,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
 		LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT));
 
 		// purge the message queue of any previously queued requests from the same source. DEV-4879
-		class OfferMatcher : public LLNotifyBoxView::Matcher
+		class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
 		{
 		public:
 			OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
-			BOOL matches(const LLNotificationPtr notification) const
+			bool matches(const LLNotificationPtr notification) const
 			{
 				if (notification->getName() == "ScriptQuestionCaution"
 					|| notification->getName() == "ScriptQuestion")
 				{
 					return (notification->getPayload()["item_id"].asUUID() == blocked_id);
 				}
-				return FALSE;
+				return false;
 			}
 		private:
 			const LLUUID& blocked_id;
 		};
-		// should do this via the channel
-		gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id));
+
+		LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
+				gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id));
 	}
 
 	if (response["Details"])
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 7a1abfd4e8..be68a2ef42 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -54,7 +54,6 @@
 #include "llfloatergroups.h"
 #include "llfloatersellland.h"
 #include "llfloatertools.h"
-#include "llnotify.h"
 #include "llparcelselection.h"
 #include "llresmgr.h"
 #include "llsdutil.h"
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index e0091145ce..300aea1620 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -51,7 +51,6 @@
 #include "llmenugl.h"
 #include "llnotecard.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llpanelplaces.h"
 #include "llpreview.h"
 #include "llpreviewnotecard.h"
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8529a93527..79c113f036 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -82,7 +82,6 @@
 
 // newview includes
 #include "llagent.h"
-#include "llalertdialog.h"
 #include "llbox.h"
 #include "llconsole.h"
 #include "llviewercontrol.h"
@@ -129,7 +128,6 @@
 #include "llmorphview.h"
 #include "llmoveview.h"
 #include "llnavigationbar.h"
-#include "llnotify.h"
 #include "lloverlaybar.h"
 #include "llpreviewtexture.h"
 #include "llprogressview.h"
@@ -1450,7 +1448,6 @@ void LLViewerWindow::initBase()
 
 	gDebugView = getRootView()->getChild<LLDebugView>("DebugView");
 	gDebugView->init();
-	gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container");
 	gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view");
 
 	// Add the progress bar view (startup view), which overrides everything
@@ -1628,8 +1625,6 @@ void LLViewerWindow::shutdownViews()
 	gMorphView = NULL;
 
 	gHUDView = NULL;
-
-	gNotifyBoxView = NULL;
 }
 
 void LLViewerWindow::shutdownGL()
@@ -1997,9 +1992,6 @@ void LLViewerWindow::draw()
 #if LL_DEBUG
 	LLView::sIsDrawing = FALSE;
 #endif
-	
-	// UI post-draw Updates
-	gNotifyBoxView->updateNotifyBoxView();	
 }
 
 // Takes a single keydown event, usually when UI is visible
@@ -2595,7 +2587,6 @@ void LLViewerWindow::updateUI()
 				else if (dynamic_cast<LLUICtrl*>(viewp) 
 						&& viewp != gMenuHolder
 						&& viewp != gFloaterView
-						&& viewp != gNotifyBoxView
 						&& viewp != gConsole) 
 				{
 					if (dynamic_cast<LLFloater*>(viewp))
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 93b0ad4a5b..8828ebff6a 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -64,7 +64,6 @@
 #include "llkeyframewalkmotion.h"
 #include "llmutelist.h"
 #include "llmoveview.h"
-#include "llnotify.h"
 #include "llquantize.h"
 #include "llregionhandle.h"
 #include "llresmgr.h"
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 31047413ef..bd7619f7e5 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -41,7 +41,6 @@
 #include "llviewerinventory.h"
 #include "llviewerstats.h"
 #include "llnotificationsutil.h"
-#include "llnotify.h"
 #include "llinventorymodel.h"
 #include "lltrans.h"
 
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 72431bd22f..c056c84e19 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -42,10 +42,9 @@
 #include "llviewercontrol.h"
 #include "llfloatermediabrowser.h"
 #include "llfloaterreg.h"
-#include "llalertdialog.h"
 #include "lltoastalertpanel.h"
 
-class URLLoader : public LLAlertURLLoader
+class URLLoader : public LLToastAlertPanel::URLLoader
 {
 	virtual void load(const std::string& url , bool force_open_externally)
 	{
@@ -65,7 +64,6 @@ static URLLoader sAlertURLLoader;
 // static
 void LLWeb::initClass()
 {
-	LLAlertDialog::setURLLoader(&sAlertURLLoader);
 	LLToastAlertPanel::setURLLoader(&sAlertURLLoader);
 }
 
-- 
cgit v1.2.3


From 12fb5d3a2de9fe49c75b302353f09fc724245a1b Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Fri, 11 Dec 2009 14:54:48 +0200
Subject: fixed EXT-3152 (Group Voice chat Notification and Invitation should
 include group's name) and corrected titles of Voice Control Panel

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp                    | 13 +++++++++-
 indra/newview/llimview.cpp                         | 28 ++++++++++++++--------
 .../skins/default/xui/en/floater_incoming_call.xml |  4 ++++
 3 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index d9fc4d54ab..4ab5ea1812 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -35,6 +35,7 @@
 
 #include "llcallfloater.h"
 
+#include "llagent.h"
 #include "llagentdata.h" // for gAgentID
 #include "llavatarlist.h"
 #include "llbottomtray.h"
@@ -165,9 +166,19 @@ void LLCallFloater::updateSession()
 			mVoiceType = VC_PEER_TO_PEER;
 			break;
 		case IM_SESSION_CONFERENCE_START:
-			mVoiceType = VC_AD_HOC_CHAT;
+		case IM_SESSION_GROUP_START:
+		case IM_SESSION_INVITE:
+			if (gAgent.isInGroup(session_id))
+			{
+				mVoiceType = VC_GROUP_CHAT;
+			}
+			else
+			{
+				mVoiceType = VC_AD_HOC_CHAT;				
+			}
 			break;
 		default:
+			llwarning("Failed to determine voice call IM type", 0);
 			mVoiceType = VC_GROUP_CHAT;
 			break;
 		}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fd1fb38914..65874f87e8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1484,26 +1484,34 @@ BOOL LLIncomingCallDialog::postBuild()
 {
 	LLDockableFloater::postBuild();
 
+	LLUUID session_id = mPayload["session_id"].asUUID();
 	LLSD caller_id = mPayload["caller_id"];
-	EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
-
-	std::string call_type = getString("VoiceInviteP2P");
 	std::string caller_name = mPayload["caller_name"].asString();
+	
+	std::string call_type;
+	if (gAgent.isInGroup(session_id))
+	{
+		LLStringUtil::format_map_t args;
+		LLGroupData data;
+		if (gAgent.getGroupData(session_id, data))
+		{
+			args["[GROUP]"] = data.mName;
+			call_type = getString(mPayload["notify_box_type"], args);
+		}
+	}
+	else
+	{
+		call_type = getString(mPayload["notify_box_type"]);
+	}
+		
 	if (caller_name == "anonymous")
 	{
 		caller_name = getString("anonymous");
 	}
 	
 	setTitle(caller_name + " " + call_type);
-	
-	// If it is not a P2P invite, then it's an AdHoc invite
-	if ( type != IM_SESSION_P2P_INVITE )
-	{
-		call_type = getString("VoiceInviteAdHoc");
-	}
 
 	// check to see if this is an Avaline call
-	LLUUID session_id = mPayload["session_id"].asUUID();
 	bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
 	childSetVisible("Start IM", is_avatar); // no IM for avaline
 
diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
index acd59b6f09..81c54ae55e 100644
--- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
@@ -26,6 +26,10 @@
      name="VoiceInviteAdHoc">
         has joined a Voice Chat call with a conference chat.
     </floater.string>
+    <floater.string
+     name="VoiceInviteGroup">
+        has joined a Voice Chat call with the group [GROUP].
+    </floater.string>
     <avatar_icon
      enabled="false"
      follows="left|top"
-- 
cgit v1.2.3


From 069051afeb2a749664d40d813dc1cdf4437f7644 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 11 Dec 2009 16:34:38 +0200
Subject: Changed lables

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/menu_participant_list.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index 0422972cd4..ffe5430c55 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -49,7 +49,7 @@
          function="Avatar.Pay" />
     </menu_item_call>
     <menu_item_check
-     label="Block/Unblock"
+     label="BlockVoice/Unblock"
      layout="topleft"
      name="Block/Unblock">
         <menu_item_check.on_click
@@ -64,7 +64,7 @@
         <menu_item_separator
          layout="topleft" />
     <menu_item_check
-     label="Mute Text"
+     label="Block Text"
      layout="topleft"
      name="MuteText">
         <on_check
-- 
cgit v1.2.3


From 28b507dd605724af21d2cf587aaf0c9dfb8dd25e Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Fri, 11 Dec 2009 12:20:38 +0200
Subject: Updated comment.

--HG--
branch : product-engine
---
 indra/newview/llscreenchannel.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 790be83e74..79bae76e5f 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -813,8 +813,6 @@ void LLScreenChannel::updateShowToastsState()
 		return;
 	}
 
-	// *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow?
-	// See EXT-3081 for details
 	// for Message Well floater showed in a docked state - adjust channel's height
 	if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater))
 	{
-- 
cgit v1.2.3


From e699dcb0c9ea378682d0d0cfbbb933f9e5c94332 Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Fri, 11 Dec 2009 12:24:19 +0200
Subject: fix for normall bug EXT-3245 Icon of group in list in "Group" tab is
 refreshed only after restarting Viewer

--HG--
branch : product-engine
---
 indra/newview/llgrouplist.cpp | 17 +++++++++++++++++
 indra/newview/llgrouplist.h   |  4 ++++
 indra/newview/llgroupmgr.cpp  |  3 ++-
 indra/newview/llgroupmgr.h    |  1 +
 4 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 80b706a215..ab9db10f38 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -225,6 +225,11 @@ mGroupID(LLUUID::null)
 	}
 }
 
+LLGroupListItem::~LLGroupListItem()
+{
+	LLGroupMgr::getInstance()->removeObserver(this);
+}
+
 //virtual
 BOOL  LLGroupListItem::postBuild()
 {
@@ -277,8 +282,13 @@ void LLGroupListItem::setName(const std::string& name, const std::string& highli
 
 void LLGroupListItem::setGroupID(const LLUUID& group_id)
 {
+	LLGroupMgr::getInstance()->removeObserver(this);
+	
+	mID = group_id;
 	mGroupID = group_id;
 	setActive(group_id == gAgent.getGroupID());
+
+	LLGroupMgr::getInstance()->addObserver(this);
 }
 
 void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id)
@@ -337,4 +347,11 @@ void LLGroupListItem::onProfileBtnClick()
 	LLGroupActions::show(mGroupID);
 }
 
+void LLGroupListItem::changed(LLGroupChange gc)
+{
+	LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID);
+	if(group_data)
+		setGroupIconID(group_data->mInsigniaID);
+}
+
 //EOF
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index 41b4d01711..33cfe005b9 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -38,6 +38,7 @@
 #include "llpanel.h"
 #include "llpointer.h"
 #include "llstyle.h"
+#include "llgroupmgr.h"
 
 /**
  * Auto-updating list of agent groups.
@@ -80,9 +81,11 @@ class LLIconCtrl;
 class LLTextBox;
 
 class LLGroupListItem : public LLPanel
+	, public LLGroupMgrObserver
 {
 public:
 	LLGroupListItem();
+	~LLGroupListItem();
 	/*virtual*/ BOOL postBuild();
 	/*virtual*/ void setValue(const LLSD& value);
 	void onMouseEnter(S32 x, S32 y, MASK mask);
@@ -96,6 +99,7 @@ public:
 	void setGroupIconID(const LLUUID& group_icon_id);
 	void setGroupIconVisible(bool visible);
 
+	virtual void changed(LLGroupChange gc);
 private:
 	void setActive(bool active);
 	void onInfoBtnClick();
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index ebb5feb2bf..af58e81ca4 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -758,7 +758,8 @@ void LLGroupMgr::clearGroupData(const LLUUID& group_id)
 
 void LLGroupMgr::addObserver(LLGroupMgrObserver* observer) 
 { 
-	mObservers.insert(std::pair<LLUUID, LLGroupMgrObserver*>(observer->getID(), observer));
+	if( observer->getID() != LLUUID::null )
+		mObservers.insert(std::pair<LLUUID, LLGroupMgrObserver*>(observer->getID(), observer));
 }
 
 void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index a0604be57e..487fdd4c5b 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -45,6 +45,7 @@ class LLGroupMgrObserver
 {
 public:
 	LLGroupMgrObserver(const LLUUID& id) : mID(id){};
+	LLGroupMgrObserver() : mID(LLUUID::null){};
 	virtual ~LLGroupMgrObserver(){};
 	virtual void changed(LLGroupChange gc) = 0;
 	const LLUUID& getID() { return mID; }
-- 
cgit v1.2.3


From 77b5ee1b4d7fb03f757efdaa4169ab38fb754b25 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Fri, 11 Dec 2009 18:33:37 +0200
Subject: Implemented major task EXT-3390 - Move Moderation options into
 submenu.

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp                   | 19 ++++++++++++++++---
 indra/newview/llparticipantlist.h                     |  5 +++++
 .../skins/default/xui/en/menu_participant_list.xml    |  5 +++++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index e99a9a5d12..1986a98fb7 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -401,8 +401,13 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
 	enable_registrar.add("ParticipantList.CheckItem",  boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem,	this, _2));
 
 	// create the context menu from the XUI
-	return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
+	LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
 		"menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+
+	main_menu->setItemVisible("Moderator Options", isGroupModerator());
+	main_menu->arrangeAndClear();
+
+	return main_menu;
 }
 
 void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y)
@@ -483,6 +488,15 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
 	toggleMute(userdata, LLMute::flagVoiceChat);
 }
 
+bool LLParticipantList::LLParticipantListMenu::isGroupModerator()
+{
+	// Agent is in Group Call
+	bool is_in_group = gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID());
+	// Agent is Moderator
+	bool is_moderator = mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+	return is_in_group && is_moderator;
+}
+
 bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id)
 {
 	LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
@@ -565,8 +579,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
 	else
 		if (item == "can_allow_text_chat" || "can_moderate_voice" == item)
 		{
-			LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID());
-			return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+			return isGroupModerator();
 		}
 	return true;
 }
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 229769ec09..9d7d3a0cbe 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -138,6 +138,11 @@ class LLParticipantList
 			void toggleMuteText(const LLSD& userdata);
 			void toggleMuteVoice(const LLSD& userdata);
 		
+			/**
+			 * Return true if Agent is group moderator(and moderator of group call).
+			 */
+			bool isGroupModerator();
+
 			// Voice moderation support
 			/**
 			 * Check whether specified by argument avatar is muted for group chat or not.
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index ffe5430c55..adf4bd70e1 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -76,6 +76,10 @@
          function="ParticipantList.EnableItem"
          parameter="can_mute_text" />
     </menu_item_check>
+    <context_menu
+     label="Moderator Options &gt;"
+     layout="topleft"
+     name="Moderator Options" >
     <menu_item_check
      label="Allow text chat"
      layout="topleft"
@@ -136,4 +140,5 @@
          function="ParticipantList.EnableItem"
          parameter="can_moderate_voice" />
     </menu_item_call>
+    </context_menu>
 </context_menu>
-- 
cgit v1.2.3


From 5f0b2624bc40c6c7580fa7c02f137c3dee330b94 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Fri, 11 Dec 2009 18:53:55 +0200
Subject: Update for major task EXT-3390 - Move Moderation options into
 submenu. Minor code change.

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 1986a98fb7..b787699a66 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -491,10 +491,12 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
 bool LLParticipantList::LLParticipantListMenu::isGroupModerator()
 {
 	// Agent is in Group Call
-	bool is_in_group = gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID());
-	// Agent is Moderator
-	bool is_moderator = mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
-	return is_in_group && is_moderator;
+	if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID()))
+	{
+		// Agent is Moderator
+		return mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+	}
+	return false;
 }
 
 bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id)
-- 
cgit v1.2.3


From e56dae206e4774e16003d1f404a6814fd81a04d3 Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Fri, 11 Dec 2009 18:58:16 +0200
Subject: fix for normal EXT-3285 Inactive expanded accordion panels have
 "selected" state

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/widgets/accordion_tab.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
index 9990324d03..102dc0c16d 100644
--- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
@@ -8,7 +8,7 @@
     header_image="Accordion_Off"
     header_image_over="Accordion_Over"
     header_image_pressed="Accordion_Press"
-    header_image_expanded="Accordion_Selected"
+    header_image_focused="Accordion_Selected"
     header_text_color="LtGray"
     font="SansSerif"
     />
-- 
cgit v1.2.3


From ee7683f6311c95c8ae57ad0dd49121437de28908 Mon Sep 17 00:00:00 2001
From: Dmitry Oleshko <doleshko@productengine.com>
Date: Fri, 11 Dec 2009 19:53:19 +0200
Subject: fixed normal bug (EXT-3246) Do not show "Calling to..." notification
 dialog for incoming group and ad-hoc calls

now is is able to get a direction of calls through the voice channel's signal for its state changing
also choosing of type of IMSession was fixed and was moved from a separate function to the constructor

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp       | 71 +++++++++++++++++-----------------------
 indra/newview/llimview.h         |  7 ++--
 indra/newview/llvoicechannel.cpp |  3 +-
 indra/newview/llvoicechannel.h   | 17 +++++++---
 indra/newview/llvoiceclient.cpp  | 15 ---------
 indra/newview/llvoiceclient.h    |  2 --
 6 files changed, 48 insertions(+), 67 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index fbed1494ff..bc35260983 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -169,22 +169,39 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
 	mOtherParticipantIsAvatar(true),
 	mStartCallOnInitialize(false)
 {
+	// set P2P type by default
+	mSessionType = P2P_SESSION;
+
 	if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type)
 	{
 		mVoiceChannel  = new LLVoiceChannelP2P(session_id, name, other_participant_id);
+
+		// check if it was AVALINE call
+		if (!mOtherParticipantIsAvatar)
+		{
+			mSessionType = AVALINE_SESSION;
+		} 
 	}
 	else
 	{
 		mVoiceChannel = new LLVoiceChannelGroup(session_id, name);
+
+		// determine whether it is group or conference session
+		if (gAgent.isInGroup(mSessionID))
+		{
+			mSessionType = GROUP_SESSION;
+		}
+		else
+		{
+			mSessionType = ADHOC_SESSION;
+		} 
 	}
 
 	if(mVoiceChannel)
 	{
-		mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2));
+		mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2, _3));
 	}
-	// define what type of session was opened
-	setSessionType();
-	
+		
 	mSpeakers = new LLIMSpeakerMgr(mVoiceChannel);
 
 	// All participants will be added to the list of people we've recently interacted with.
@@ -217,45 +234,18 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
 	}
 }
 
-void LLIMModel::LLIMSession::setSessionType()
-{
-	// set P2P type by default
-	mSessionType = P2P_SESSION;
-
-	if (dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel) && !mOtherParticipantIsAvatar) // P2P AVALINE channel was opened
-	{
-		mSessionType = AVALINE_SESSION;
-		return;
-	} 
-	else if(dynamic_cast<LLVoiceChannelGroup*>(mVoiceChannel)) // GROUP channel was opened
-	{
-		if (mType == IM_SESSION_CONFERENCE_START)
-		{
-			mSessionType = ADHOC_SESSION;
-			return;
-		} 
-		else if(mType == IM_SESSION_GROUP_START)
-		{
-			mSessionType = GROUP_SESSION;
-			return;
-		}		
-	}
-}
-
-void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
+void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
 {
 	// *TODO: remove hardcoded string!!!!!!!!!!!
 
 	bool is_p2p_session = dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel);
-	bool is_incoming_call = false;
 	std::string other_avatar_name;
 
 	if(is_p2p_session)
 	{
-		is_incoming_call = static_cast<LLVoiceChannelP2P*>(mVoiceChannel)->isIncomingCall();
 		gCacheName->getFullName(mOtherParticipantID, other_avatar_name);
 
-		if(is_incoming_call)
+		if(direction == LLVoiceChannel::INCOMING_CALL)
 		{
 			switch(new_state)
 			{
@@ -1059,7 +1049,7 @@ public:
 
 			if (LLIMMgr::INVITATION_TYPE_VOICE == mInvitiationType)
 			{
-				gIMMgr->startCall(mSessionID);
+				gIMMgr->startCall(mSessionID, LLVoiceChannel::INCOMING_CALL);
 			}
 
 			if ((mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE 
@@ -1270,11 +1260,10 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id)
 	sCurrentSessionlName = session->mName;
 }
 
-void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
+void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
 {
 	LLSD mCallDialogPayload;
 	LLOutgoingCallDialog* ocd;
-	bool is_incoming;
 
 	mCallDialogPayload["session_id"] = sSession->mSessionID;
 	mCallDialogPayload["session_name"] = sSession->mName;
@@ -1285,9 +1274,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat
 	{			
 	case LLVoiceChannel::STATE_CALL_STARTED :
 		// do not show "Calling to..." if it is incoming call
-		is_incoming = LLVoiceClient::getInstance()->isSessionIncoming(sSession->mSessionID);
-		// *TODO: implement for AdHoc and Group voice chats
-		if(is_incoming)
+		if(direction == LLVoiceChannel::INCOMING_CALL)
 		{
 			return;
 		}
@@ -1469,6 +1456,7 @@ BOOL LLOutgoingCallDialog::postBuild()
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLIncomingCallDialog
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
 LLCallDialog(payload)
 {
@@ -1594,7 +1582,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
 
 			if (voice)
 			{
-				if (gIMMgr->startCall(session_id))
+				if (gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL))
 				{
 					// always open IM window when connecting to voice
 					LLIMFloater::show(session_id);
@@ -2445,11 +2433,12 @@ void LLIMMgr::removeSessionObserver(LLIMSessionObserver *observer)
 	mSessionObservers.remove(observer);
 }
 
-bool LLIMMgr::startCall(const LLUUID& session_id)
+bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction)
 {
 	LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id);
 	if (!voice_channel) return false;
 	
+	voice_channel->setCallDirection(direction);
 	voice_channel->activate();
 	return true;
 }
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index f26889ac91..e2fcd63e28 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -69,10 +69,9 @@ public:
 		virtual ~LLIMSession();
 
 		void sessionInitReplyReceived(const LLUUID& new_session_id);
-		void setSessionType(); //define what type of session was opened
 		void addMessagesFromHistory(const std::list<LLSD>& history);
 		void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time);
-		void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
+		void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction);
 		static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata);
 
 		LLUUID mSessionID;
@@ -384,7 +383,7 @@ public:
 	 * Start call in a session
 	 * @return false if voice channel doesn't exist
 	 **/
-	bool startCall(const LLUUID& session_id);
+	bool startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction = LLVoiceChannel::OUTGOING_CALL);
 
 	/**
 	 * End call in a session
@@ -448,7 +447,7 @@ public:
 
 	static void initClass();
 	static void onVoiceChannelChanged(const LLUUID &session_id);
-	static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
+	static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction);
 
 protected:
 	static std::string sPreviousSessionlName;
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 175b6f1d10..fd4e7bb91f 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -122,6 +122,7 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess
 	mSessionID(session_id), 
 	mState(STATE_NO_CHANNEL_INFO), 
 	mSessionName(session_name),
+	mCallDirection(OUTGOING_CALL),
 	mIgnoreNextSessionLeave(FALSE)
 {
 	mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName;
@@ -405,7 +406,7 @@ void LLVoiceChannel::doSetState(const EState& new_state)
 	EState old_state = mState;
 	mState = new_state;
 	if (!mStateChangedCallback.empty())
-		mStateChangedCallback(old_state, mState);
+		mStateChangedCallback(old_state, mState, mCallDirection);
 }
 
 //static
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 1bed329ba2..77801142cb 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -52,7 +52,13 @@ public:
 		STATE_CONNECTED
 	} EState;
 
-	typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state)> state_changed_signal_t;
+	typedef enum e_voice_channel_direction
+	{
+		INCOMING_CALL,
+		OUTGOING_CALL
+	} EDirection;
+
+	typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction)> state_changed_signal_t;
 
 	// on current channel changed signal
 	typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
@@ -87,6 +93,9 @@ public:
 	void updateSessionID(const LLUUID& new_session_id);
 	const LLSD& getNotifyArgs() { return mNotifyArgs; }
 
+	void setCallDirection(EDirection direction) {mCallDirection = direction;}
+	EDirection getCallDirection() {return mCallDirection;}
+
 	static LLVoiceChannel* getChannelByID(const LLUUID& session_id);
 	static LLVoiceChannel* getChannelByURI(std::string uri);
 	static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; }
@@ -103,6 +112,9 @@ protected:
 	void doSetState(const EState& state);
 	void setURI(std::string uri);
 
+	// there can be two directions ICOMING and OUTGOING
+	EDirection mCallDirection;
+
 	std::string	mURI;
 	std::string	mCredentials;
 	LLUUID		mSessionID;
@@ -175,9 +187,6 @@ public:
 
 	void setSessionHandle(const std::string& handle, const std::string &inURI);
 
-	// returns TRUE if call is incoming and FALSE otherwise
-	BOOL isIncomingCall() { return mReceivedCall; }
-
 protected:
 	virtual void setState(EState state);
 
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 63acba50e7..7e1e7c940f 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -4279,7 +4279,6 @@ void LLVoiceClient::mediaStreamUpdatedEvent(
 				{
 					// Send the voice chat invite to the GUI layer
 					// *TODO: Question: Should we correlate with the mute list here?
-					session->mIncoming = true;
 					session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID);
 					session->mVoiceInvitePending = true;
 					if(session->mName.empty())
@@ -6354,20 +6353,6 @@ LLVoiceClient::sessionState *LLVoiceClient::findSession(const LLUUID &participan
 	return result;
 }
 
-bool LLVoiceClient::isSessionIncoming(const LLUUID &session_id)
-{
-	for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++)
-	{
-		sessionState *session = *iter;
-		if(session->mIMSessionID == session_id)
-		{
-			return session->mIncoming;
-			break;
-		}
-	}
-	return false;
-}
-
 LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, const std::string &handle)
 {
 	sessionState *result = NULL;
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index edfe0173f8..347fae6156 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -527,8 +527,6 @@ static	void updatePosition(void);
 		// Currently this will be false only for PSTN P2P calls.
 		// NOTE: this will return true if the session can't be found. 
 		bool isSessionTextIMPossible(const LLUUID &session_id);
-
-		bool isSessionIncoming(const LLUUID &session_id);
 		
 	private:
 
-- 
cgit v1.2.3


From eca66a2aa6b507bad1e168bcfafb18e4d389caa1 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 11 Dec 2009 17:00:49 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- added updating
 of participant list to display participants not in voice as disabled. 
 Unfortunatly I have to perform refreshing in a draw to mad it workable till
 beta 0.

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp     | 29 +++++++++++++++++++++++++++++
 indra/newview/llcallfloater.h       | 11 ++++++++++-
 indra/newview/llparticipantlist.cpp | 21 +++++++++++++++++++++
 indra/newview/llparticipantlist.h   | 10 ++++++++--
 4 files changed, 68 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 4ab5ea1812..e6a6910d6d 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -82,6 +82,7 @@ LLCallFloater::LLCallFloater(const LLSD& key)
 , mVoiceType(VC_LOCAL_CHAT)
 {
 	mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
+	LLVoiceClient::getInstance()->addObserver(this);
 }
 
 LLCallFloater::~LLCallFloater()
@@ -89,6 +90,13 @@ LLCallFloater::~LLCallFloater()
 	mChannelChangedConnection.disconnect();
 	delete mPaticipants;
 	mPaticipants = NULL;
+
+	// Don't use LLVoiceClient::getInstance() here 
+	// singleton MAY have already been destroyed.
+	if(gVoiceClient)
+	{
+		gVoiceClient->removeObserver(this);
+	}
 }
 
 // virtual
@@ -121,6 +129,26 @@ void LLCallFloater::onOpen(const LLSD& /*key*/)
 {
 }
 
+// virtual
+void LLCallFloater::draw()
+{
+	// we have to refresh participants to display ones not in voice as disabled.
+	// It should be done only when she joins or leaves voice chat.
+	// But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement.
+	// *TODO: mantipov: remove from draw()
+	onChange();
+	LLDockableFloater::draw();
+}
+
+// virtual
+void LLCallFloater::onChange()
+{
+	if (NULL == mPaticipants) return;
+
+	mPaticipants->refreshVoiceState();
+}
+
+
 //////////////////////////////////////////////////////////////////////////
 /// PRIVATE SECTION
 //////////////////////////////////////////////////////////////////////////
@@ -231,6 +259,7 @@ void LLCallFloater::refreshPartisipantList()
 		{
 			mAvatarList->setNoItemsCommentText(getString("no_one_near"));
 		}
+		mPaticipants->refreshVoiceState();	
 	}
 }
 
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index b615f57d5b..52f9595435 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -35,6 +35,7 @@
 #define LL_LLCALLFLOATER_H
 
 #include "lldockablefloater.h"
+#include "llvoiceclient.h"
 
 class LLAvatarList;
 class LLNonAvatarCaller;
@@ -52,7 +53,7 @@ class LLSpeakerMgr;
  * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel also provides an 
  * 'Leave Call' button to allow the Resident to leave that voice channel.
  */
-class LLCallFloater : public LLDockableFloater
+class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver
 {
 public:
 	LLCallFloater(const LLSD& key);
@@ -60,6 +61,14 @@ public:
 
 	/*virtual*/ BOOL postBuild();
 	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void draw();
+
+	/**
+	 * Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed.
+	 *
+	 * Refreshes list to display participants not in voice as disabled.
+	 */
+	/*virtual*/ void onChange();
 
 private:
 	typedef enum e_voice_controls_type
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b787699a66..6b3f468ff1 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -224,6 +224,27 @@ void LLParticipantList::setSortOrder(EParticipantSortOrder order)
 	}
 }
 
+void LLParticipantList::refreshVoiceState()
+{
+	LLSpeakerMgr::speaker_list_t speakers;
+	mSpeakerMgr->getSpeakerList(&speakers, TRUE);
+
+	for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin();
+		iter != speakers.end(); ++iter)
+	{
+		LLSpeaker* speakerp = (*iter).get();
+		const LLUUID& speaker_id = speakerp->mID;
+		LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*> (mAvatarList->getItemByValue(speaker_id));
+		if ( item )
+		{
+			// if voice is disabled for this speaker show non voice speakers as disabled
+			bool is_in_voice = speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE
+				&& speakerp->mStatus != LLSpeaker::STATUS_MUTED;
+			item->setOnline(!is_in_voice);
+		}
+	}
+}
+
 bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
 {
 	LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 9d7d3a0cbe..bc6c6c2b50 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -52,10 +52,16 @@ class LLParticipantList
 		} EParticipantSortOrder;
 
 		/**
-		  * Set and sort Avatarlist by given order
-		  */
+		 * Set and sort Avatarlist by given order
+		 */
 		void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME);
 
+		/**
+		 * Refreshes participants to display ones not in voice as disabled.
+		 * TODO: mantipov: probably should be moved into derived class for LLFloaterCall
+		 */
+		void refreshVoiceState();
+
 	protected:
 		/**
 		 * LLSpeakerMgr event handlers
-- 
cgit v1.2.3


From f0188645c72126782f08f27fe7104d73e635ddb9 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 11 Dec 2009 18:38:29 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- added showing
 notification that user was muted by moderator

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 27 +++++++++++++++++++++++++--
 indra/newview/llcallfloater.h   |  4 +++-
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index e6a6910d6d..87863e829d 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -33,6 +33,8 @@
 
 #include "llviewerprecompiledheaders.h"
 
+#include "llnotificationsutil.h"
+
 #include "llcallfloater.h"
 
 #include "llagent.h"
@@ -80,6 +82,8 @@ LLCallFloater::LLCallFloater(const LLSD& key)
 , mAvatarList(NULL)
 , mNonAvatarCaller(NULL)
 , mVoiceType(VC_LOCAL_CHAT)
+, mSpeakingIndicator(NULL)
+, mIsModeratorMutedVoice(false)
 {
 	mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL);
 	LLVoiceClient::getInstance()->addObserver(this);
@@ -137,6 +141,14 @@ void LLCallFloater::draw()
 	// But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement.
 	// *TODO: mantipov: remove from draw()
 	onChange();
+
+	bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID);
+
+	if (mIsModeratorMutedVoice != is_moderator_muted)
+	{
+		setModeratorMutedVoice(is_moderator_muted);
+	}
+
 	LLDockableFloater::draw();
 }
 
@@ -313,8 +325,19 @@ void LLCallFloater::initAgentData()
 		gCacheName->getFullName(gAgentID, name);
 		my_panel->childSetValue("user_text", name);
 
-		LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
-		speaking_indicator->setSpeakerId(gAgentID);
+		mSpeakingIndicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+		mSpeakingIndicator->setSpeakerId(gAgentID);
+	}
+}
+
+void LLCallFloater::setModeratorMutedVoice(bool moderator_muted)
+{
+	mIsModeratorMutedVoice = moderator_muted;
+
+	if (moderator_muted)
+	{
+		LLNotificationsUtil::add("VoiceIsMutedByModerator");
 	}
+	mSpeakingIndicator->setIsMuted(moderator_muted);
 }
 //EOF
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 52f9595435..931f830937 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -39,9 +39,9 @@
 
 class LLAvatarList;
 class LLNonAvatarCaller;
+class LLOutputMonitorCtrl;
 class LLParticipantList;
 class LLSpeakerMgr;
-
 /**
  * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button.
  * It can be torn-off and freely positioned onscreen.
@@ -103,6 +103,8 @@ private:
 	LLAvatarList* mAvatarList;
 	LLNonAvatarCaller* mNonAvatarCaller;
 	EVoiceControls mVoiceType;
+	LLOutputMonitorCtrl* mSpeakingIndicator;
+	bool mIsModeratorMuted;
 
 	boost::signals2::connection mChannelChangedConnection;
 };
-- 
cgit v1.2.3


From c57138b64777a51289d62e575ef73c04d060c344 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 11 Dec 2009 19:29:41 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- added showing
 notification that user was muted by moderator (missing changes in the header
 file)

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 931f830937..79b0fca061 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -96,6 +96,7 @@ private:
 	void onCurrentChannelChanged(const LLUUID& session_id);
 	void updateTitle();
 	void initAgentData();
+	void setModeratorMutedVoice(bool moderator_muted);
 
 private:
 	LLSpeakerMgr* mSpeakerManager;
@@ -104,7 +105,7 @@ private:
 	LLNonAvatarCaller* mNonAvatarCaller;
 	EVoiceControls mVoiceType;
 	LLOutputMonitorCtrl* mSpeakingIndicator;
-	bool mIsModeratorMuted;
+	bool mIsModeratorMutedVoice;
 
 	boost::signals2::connection mChannelChangedConnection;
 };
-- 
cgit v1.2.3


From a5f4531315f8f8c5711e2298019586c6ae0dba76 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Fri, 11 Dec 2009 19:56:45 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- added showing
 Moderator label near the agent's name if she is a group moderator

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 30 +++++++++++++++++++++++++-----
 indra/newview/llcallfloater.h   |  2 ++
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 87863e829d..75fc9f1f7b 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -34,6 +34,7 @@
 #include "llviewerprecompiledheaders.h"
 
 #include "llnotificationsutil.h"
+#include "lltrans.h"
 
 #include "llcallfloater.h"
 
@@ -82,6 +83,7 @@ LLCallFloater::LLCallFloater(const LLSD& key)
 , mAvatarList(NULL)
 , mNonAvatarCaller(NULL)
 , mVoiceType(VC_LOCAL_CHAT)
+, mAgentPanel(NULL)
 , mSpeakingIndicator(NULL)
 , mIsModeratorMutedVoice(false)
 {
@@ -239,6 +241,7 @@ void LLCallFloater::updateSession()
 	childSetVisible("leave_btn_panel", !is_local_chat);
 	
 	refreshPartisipantList();
+	updateModeratorState();
 }
 
 void LLCallFloater::refreshPartisipantList()
@@ -315,17 +318,17 @@ void LLCallFloater::updateTitle()
 
 void LLCallFloater::initAgentData()
 {
-	LLPanel* my_panel = getChild<LLPanel> ("my_panel");
+	mAgentPanel = getChild<LLPanel> ("my_panel");
 
-	if ( my_panel )
+	if ( mAgentPanel )
 	{
-		my_panel->childSetValue("user_icon", gAgentID);
+		mAgentPanel->childSetValue("user_icon", gAgentID);
 
 		std::string name;
 		gCacheName->getFullName(gAgentID, name);
-		my_panel->childSetValue("user_text", name);
+		mAgentPanel->childSetValue("user_text", name);
 
-		mSpeakingIndicator = my_panel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
+		mSpeakingIndicator = mAgentPanel->getChild<LLOutputMonitorCtrl>("speaking_indicator");
 		mSpeakingIndicator->setSpeakerId(gAgentID);
 	}
 }
@@ -340,4 +343,21 @@ void LLCallFloater::setModeratorMutedVoice(bool moderator_muted)
 	}
 	mSpeakingIndicator->setIsMuted(moderator_muted);
 }
+
+void LLCallFloater::updateModeratorState()
+{
+	std::string name;
+	gCacheName->getFullName(gAgentID, name);
+
+	if(gAgent.isInGroup(mSpeakerManager->getSessionID()))
+	{
+		// Agent is Moderator
+		if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator)
+		{
+			const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); 
+			name += " " + moderator_indicator;
+		}
+	}
+	mAgentPanel->childSetValue("user_text", name);
+}
 //EOF
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 79b0fca061..b2288a42ff 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -97,6 +97,7 @@ private:
 	void updateTitle();
 	void initAgentData();
 	void setModeratorMutedVoice(bool moderator_muted);
+	void updateModeratorState();
 
 private:
 	LLSpeakerMgr* mSpeakerManager;
@@ -104,6 +105,7 @@ private:
 	LLAvatarList* mAvatarList;
 	LLNonAvatarCaller* mNonAvatarCaller;
 	EVoiceControls mVoiceType;
+	LLPanel* mAgentPanel;
 	LLOutputMonitorCtrl* mSpeakingIndicator;
 	bool mIsModeratorMutedVoice;
 
-- 
cgit v1.2.3


From 58f17bb735dce95031619ef20c2d5d35ae59896d Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 11 Dec 2009 20:26:20 +0200
Subject: Fixed normal bug EXT-3263 (Cut and Paste from text chat loses new
 lines)

--HG--
branch : product-engine
---
 indra/newview/llchathistory.cpp | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index efe9ea4c35..1512707a26 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -49,6 +49,8 @@
 
 static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
 
+const static std::string NEW_LINE(rawstr_to_utf8("\n"));
+
 class LLChatHistoryHeader: public LLPanel
 {
 public:
@@ -454,10 +456,21 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
 
 		if (chat.mFromName.size() > 0)
 			appendText(chat.mFromName + " ", TRUE, style_params);
-		appendText(chat.mText.substr(4), FALSE, style_params);
+		// Ensure that message ends with NewLine, to avoid losing of new lines
+		// while copy/paste from text chat. See EXT-3263.
+		appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params);
 	}
 	else
-		appendText(chat.mText, FALSE, style_params);
+	{
+		std::string message(chat.mText);
+		if ( message.size() > 0 && !LLStringOps::isSpace(message[message.size() - 1]) )
+		{
+			// Ensure that message ends with NewLine, to avoid losing of new lines
+			// while copy/paste from text chat. See EXT-3263.
+			message += NEW_LINE;
+		}
+		appendText(message, FALSE, style_params);
+	}
 	blockUndo();
 }
 
-- 
cgit v1.2.3


From 7863d7d412ecd4dbbb7a27978493e85f446250fb Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 11 Dec 2009 20:36:32 +0200
Subject: Related to normal sub-task EXT-2478: Implemened chiclet + chiclet
 window should spawn only for offers from objects. Offers from persons should
 be shown as toasts

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 8fe18c56c9..d1f1d781ee 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1480,6 +1480,8 @@ void inventory_offer_handler(LLOfferInfo* info)
 		// Note: sets inventory_task_offer_callback as the callback
 		p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_task_offer_callback, info, _1, _2));
 		p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser";
+		// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
+		LLNotifications::instance().add(p);
 	}
 	else // Agent -> Agent Inventory Offer
 	{
@@ -1503,18 +1505,14 @@ void inventory_offer_handler(LLOfferInfo* info)
 		
 		// In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages).
 		info->send_auto_receive_response();
-	}
-
-	// Pop up inv offer notification and let the user accept (keep), or reject (and silently delete) the inventory.
-	LLNotifications::instance().add(p);
 
-	// TODO(EM): Recheck this after we will know how script notifications should look like.
-	// Inform user that there is a script floater via toast system
-	// {
-	// 	payload["give_inventory_notification"] = TRUE;
-	// 	LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); 
-	// 	LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID());
-	// }
+		// Inform user that there is a script floater via toast system
+		{
+			payload["give_inventory_notification"] = TRUE;
+			LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); 
+			LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID());
+		}
+	}
 }
 
 bool lure_callback(const LLSD& notification, const LLSD& response)
-- 
cgit v1.2.3


From b418328083db09f430e2e93e603d16ce7bca3e20 Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Fri, 11 Dec 2009 10:50:48 -0800
Subject: When building llmediaplugintest on the mac, copy the llcommon dylib
 so it can actually run.

---
 indra/test_apps/llplugintest/CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 0011daaec6..20ae1be1a2 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -338,6 +338,13 @@ add_custom_command(TARGET llmediaplugintest POST_BUILD
   DEPENDS ${BUILT_SLPLUGIN}
 )
 
+get_target_property(BUILT_LLCOMMON llcommon LOCATION)
+add_custom_command(TARGET llmediaplugintest POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_LLCOMMON}  ${PLUGINS_DESTINATION_DIR}
+  DEPENDS ${BUILT_LLCOMMON}
+)
+
+
 if (DARWIN OR WINDOWS)
   get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION)
   add_custom_command(TARGET llmediaplugintest POST_BUILD
-- 
cgit v1.2.3


From bf9609294fa0c5c4cf37e7b84f128cd05ec39403 Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Fri, 11 Dec 2009 10:43:23 -0800
Subject: Enable plugins in the Mac build of the webkit plugin.

---
 indra/media_plugins/webkit/media_plugin_webkit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 276ad39dfb..ae4f4d810f 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -211,7 +211,7 @@ private:
 			LLQtWebKit::getInstance()->enablePlugins(true);
 #elif LL_DARWIN
 			// Disable plugins
-			LLQtWebKit::getInstance()->enablePlugins(false);
+			LLQtWebKit::getInstance()->enablePlugins(true);
 #elif LL_LINUX
 			// Disable plugins
 			LLQtWebKit::getInstance()->enablePlugins(false);
-- 
cgit v1.2.3


From 2acb204c4b1bdc4cc11c7af51ebfd09c47c3e231 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Fri, 11 Dec 2009 21:40:29 +0200
Subject: Fixed normal bug EXT-3281 (Group : Disable "Leave Group" for none).

--HG--
branch : product-engine
---
 indra/newview/llpanelpeople.cpp                                     | 6 ++++++
 indra/newview/llpanelpeople.h                                       | 2 ++
 indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 5fb7dab7be..79a593a8c9 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -586,6 +586,7 @@ BOOL LLPanelPeople::postBuild()
 	registrar.add("People.Groups.ViewSort.Action",  boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked,  this, _2));
 	registrar.add("People.Recent.ViewSort.Action",  boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked,  this, _2));
 
+	enable_registrar.add("People.Group.Minus.Enable",	boost::bind(&LLPanelPeople::isRealGroup,	this));
 	enable_registrar.add("People.Friends.ViewSort.CheckItem",	boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck,	this, _2));
 	enable_registrar.add("People.Recent.ViewSort.CheckItem",	boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck,	this, _2));
 	enable_registrar.add("People.Nearby.ViewSort.CheckItem",	boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck,	this, _2));
@@ -921,6 +922,11 @@ void LLPanelPeople::reSelectedCurrentTab()
 	mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
 }
 
+bool LLPanelPeople::isRealGroup()
+{
+	return getCurrentItemID() != LLUUID::null;
+}
+
 void LLPanelPeople::onFilterEdit(const std::string& search_string)
 {
 	std::string search_upper = search_string;
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index a9cc6d0ccb..750d3b573f 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -118,6 +118,8 @@ private:
 	void					onGroupsViewSortMenuItemClicked(const LLSD& userdata);
 	void					onRecentViewSortMenuItemClicked(const LLSD& userdata);
 
+	//returns false only if group is "none"
+	bool					isRealGroup();
 	bool					onFriendsViewSortMenuItemCheck(const LLSD& userdata);
 	bool					onRecentViewSortMenuItemCheck(const LLSD& userdata);
 	bool					onNearbyViewSortMenuItemCheck(const LLSD& userdata);
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
index 304492bedb..df3cb26b04 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
@@ -19,5 +19,7 @@
    name="Leave Selected Group">
       <menu_item_call.on_click
        function="People.Group.Minus.Action"/>
+      <menu_item_call.on_enable
+       function="People.Group.Minus.Enable"/>
   </menu_item_call>
 </menu>
-- 
cgit v1.2.3


From fd99f8701cfe4cbcd95f847b77e985703937a581 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Fri, 11 Dec 2009 21:44:48 +0200
Subject: Fixed normal bug EXT - 2863 (Group Chat List Names right click do not
 contain view profile or send private message)

--HG--
branch : product-engine
---
 indra/newview/llparticipantlist.cpp                | 61 ++++++++++++++++++----
 .../skins/default/xui/en/menu_participant_list.xml | 15 +++---
 2 files changed, 61 insertions(+), 15 deletions(-)

diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 6b3f468ff1..47b9f29b48 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -42,6 +42,7 @@
 #include "llavatarlist.h"
 #include "llspeakers.h"
 #include "llviewermenu.h"
+#include "llvoiceclient.h"
 
 //LLParticipantList retrieves add, clear and remove events and updates view accordingly 
 #if LL_MSVC
@@ -416,6 +417,14 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
 	registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2));
 	registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2));
 
+	registrar.add("Avatar.Profile",	boost::bind(&LLAvatarActions::showProfile, mUUIDs.front()));
+	registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, mUUIDs.front()));
+	registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs.front()));
+	registrar.add("Avatar.BlockUnblock", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteVoice, this, _2));
+	registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, mUUIDs.front()));
+	registrar.add("Avatar.Pay",	boost::bind(&LLAvatarActions::pay, mUUIDs.front()));
+	registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, mUUIDs.front()));
+
 	registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2));
 
 	enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem,	this, _2));
@@ -604,6 +613,33 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD&
 		{
 			return isGroupModerator();
 		}
+	else if (item == std::string("can_add"))
+		{
+			// We can add friends if:
+			// - there are selected people
+			// - and there are no friends among selection yet.
+
+			bool result = (mUUIDs.size() > 0);
+
+			std::vector<LLUUID>::const_iterator
+				id = mUUIDs.begin(),
+				uuids_end = mUUIDs.end();
+
+			for (;id != uuids_end; ++id)
+			{
+				if ( LLAvatarActions::isFriend(*id) )
+				{
+					result = false;
+					break;
+				}
+			}
+			return result;
+		}
+	else if (item == "can_call")
+	{
+		return LLVoiceClient::voiceEnabled();
+	}
+
 	return true;
 }
 
@@ -611,18 +647,25 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD&
 {
 	std::string item = userdata.asString();
 	const LLUUID& id = mUUIDs.front();
+
 	if (item == "is_muted")
-		return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat); 
-	else
-		if (item == "is_allowed_text_chat")
-		{
-			LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id);
+	{
+		return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat);
+	}
+	else if (item == "is_allowed_text_chat")
+	{
+		LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id);
 
-			if (selected_speakerp.notNull())
-			{
-				return !selected_speakerp->mModeratorMutedText;
-			}
+		if (selected_speakerp.notNull())
+		{
+			return !selected_speakerp->mModeratorMutedText;
 		}
+	}
+	else if(item == "is_blocked")
+	{
+		return LLMuteList::getInstance()->isMuted(id, LLMute::flagVoiceChat);
+	}
+
 	return false;
 }
 
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index adf4bd70e1..449202aaaa 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -16,7 +16,7 @@
         <menu_item_call.on_click
          function="Avatar.AddFriend" />
         <menu_item_call.on_enable
-         function="Avatar.EnableItem"
+         function="ParticipantList.EnableItem"
          parameter="can_add" />
     </menu_item_call>
     <menu_item_call
@@ -30,11 +30,14 @@
      label="Call"
      layout="topleft"
      name="Call">
-        <menu_item_call.on_click
+         <menu_item_call.on_click
          function="Avatar.Call" />
+        <menu_item_call.on_enable
+         function="ParticipantList.EnableItem"
+         parameter="can_call" />
     </menu_item_call>
     <menu_item_call
-     enabled="false"
+     enabled="true"
      label="Share"
      layout="topleft"
      name="Share">
@@ -49,16 +52,16 @@
          function="Avatar.Pay" />
     </menu_item_call>
     <menu_item_check
-     label="BlockVoice/Unblock"
+     label="Block Voice"
      layout="topleft"
      name="Block/Unblock">
         <menu_item_check.on_click
          function="Avatar.BlockUnblock" />
         <menu_item_check.on_check
-         function="Avatar.CheckItem"
+         function="ParticipantList.CheckItem"
          parameter="is_blocked" />
         <menu_item_check.on_enable
-         function="Avatar.EnableItem"
+         function="ParticipantList.EnableItem"
          parameter="can_block" />
     </menu_item_check>
         <menu_item_separator
-- 
cgit v1.2.3


From b6b861eaaf7a5c4a5bac6064c90fcee88f177dda Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Fri, 11 Dec 2009 22:03:17 +0200
Subject: Fixed normal bug EXT-2724 (Mini map mimimizes underneath Nav bar when
 Favorites bar has been hidden) and partially fixed EXT-2742 (Invalid menu
 appearance after hiding navigation bar and/or favorites bar). Problem in
 fixed part of EXT-2742 was the same as the one which caused EXT-2724.

--HG--
branch : product-engine
---
 indra/newview/llviewercontrol.cpp | 21 ++-------------------
 indra/newview/llviewerwindow.cpp  |  4 ++--
 2 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 91de7d9ba2..f3db0ab170 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -515,30 +515,13 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
 
 bool toggle_show_navigation_panel(const LLSD& newvalue)
 {
-	LLRect floater_view_rect = gFloaterView->getRect();
-	LLNavigationBar* navbar = LLNavigationBar::getInstance();
-	
-	//if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher, 
-	//and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
-	int pm=newvalue.asBoolean()?-1:1;
-	floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
-	gFloaterView->setRect(floater_view_rect);
-	floater_view_rect = gFloaterView->getRect();
-	navbar->showNavigationPanel(newvalue.asBoolean());
+	LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean());
 	return true;
 }
 
 bool toggle_show_favorites_panel(const LLSD& newvalue)
 {
-	LLRect floater_view_rect = gFloaterView->getRect();
-	LLNavigationBar* navbar = LLNavigationBar::getInstance();
-	
-	//if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher, 
-	//and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
-	int pm=newvalue.asBoolean()?-1:1;
-	floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
-	gFloaterView->setRect(floater_view_rect);
-	navbar->showFavoritesPanel(newvalue.asBoolean());
+	LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean());
 	return true;
 }
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 79c113f036..944fddbb50 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1526,12 +1526,12 @@ void LLViewerWindow::initWorldUI()
 	
 	if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
 	{
-		toggle_show_navigation_panel(LLSD(0));
+		navbar->showNavigationPanel(FALSE);
 	}
 
 	if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"))
 	{
-		toggle_show_favorites_panel(LLSD(0));
+		navbar->showFavoritesPanel(FALSE);
 	}
 
 	if (!gSavedSettings.getBOOL("ShowCameraButton"))
-- 
cgit v1.2.3


From b2badcaf695304847312445d9b9184958d705fe1 Mon Sep 17 00:00:00 2001
From: Sergei Litovchuk <slitovchuk@productengine.com>
Date: Fri, 11 Dec 2009 22:13:46 +0200
Subject: Regression fix for major bug EXT-3135 "Crash after dragging LM from
 'Inventory' accordion to fav bar". - Disabled opening sidetray inventory
 panel on drag-n-drop operations with landmarks in sidetray places panel.

--HG--
branch : product-engine
---
 indra/newview/llinventorybridge.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 52ebefabea..089f90fe2b 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2965,7 +2965,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 			// everything in the active window so that we don't follow
 			// the selection to its new location (which is very
 			// annoying).
-			LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+			LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
 			if (active_panel)
 			{
 				LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
-- 
cgit v1.2.3


From 612c7a2960492a7838b55dd3706a3ddcec0d0c30 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 11 Dec 2009 22:49:16 +0200
Subject: Additional commit for normal sub-task EXT-3142("new message"
 indicator for object chiclets)

--HG--
branch : product-engine
---
 indra/newview/llscriptfloater.cpp | 29 +++++++++++++++++++++++++++--
 indra/newview/llscriptfloater.h   |  5 +++++
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 5c4f6e8860..9884aec2e3 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -66,6 +66,7 @@ LLScriptFloater::LLScriptFloater(const LLSD& key)
 : LLDockableFloater(NULL, true, key)
 , mScriptForm(NULL)
 {
+	setMouseDownCallback(boost::bind(&LLScriptFloater::onMouseDown, this));
 }
 
 bool LLScriptFloater::toggle(const LLUUID& object_id)
@@ -180,6 +181,23 @@ void LLScriptFloater::setVisible(BOOL visible)
 	hideToastsIfNeeded();
 }
 
+void LLScriptFloater::onMouseDown()
+{
+	if(getObjectId().notNull())
+	{
+		// Remove new message icon
+		LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getObjectId());
+		if (chiclet == NULL)
+		{
+			llerror("Dock chiclet for LLScriptFloater doesn't exist", 0);
+		}
+		else
+		{
+			chiclet->setShowNewMessagesIcon(false);
+		}
+	}
+}
+
 void LLScriptFloater::hideToastsIfNeeded()
 {
 	using namespace LLNotificationsUI;
@@ -217,11 +235,18 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
 	script_notification_map_t::iterator it = mNotifications.find(object_id);
 	if(it != mNotifications.end())
 	{
+		LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(object_id);
+		if(chiclet)
+		{
+			// Pass the new_message icon state further.
+			set_new_message = chiclet->getShowNewMessagesIcon();
+		}
+
 		LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->second.notification_id);
 		if(floater)
 		{
-			// Generate chiclet with a "new message" indicator if a docked window was opened. See EXT-3142.
-			set_new_message = floater->isShown();
+			// Generate chiclet with a "new message" indicator if a docked window was opened but not in focus. See EXT-3142.
+			set_new_message |= !floater->hasFocus();
 		}
 
 		onRemoveNotification(it->second.notification_id);
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index 95ec5a4d9c..ed10dc5fe9 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -169,6 +169,11 @@ protected:
 	 */
 	static void hideToastsIfNeeded();
 
+	/**
+	 * Removes chiclets new messages icon
+	 */
+	void onMouseDown();
+
 private:
 	LLToastNotifyPanel* mScriptForm;
 	LLUUID mObjectId;
-- 
cgit v1.2.3


From d345153bfe6065efc990d829722de55d45a551d8 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Mon, 14 Dec 2009 10:38:16 +0200
Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and
 text) to the Voice Control Panel (Active Speakers List))  -- Fixed crash if
 press Call button quickly in just opened IM Group floater Reason: voice
 channel is in STATE_NO_CHANNEL_INFO, in this case there are no any speakers
 yet. Fix: added NULL validating of finding speaker before determining if
 Agent is a moderator.

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 75fc9f1f7b..785591e7e3 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -351,11 +351,17 @@ void LLCallFloater::updateModeratorState()
 
 	if(gAgent.isInGroup(mSpeakerManager->getSessionID()))
 	{
-		// Agent is Moderator
-		if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator)
+		// This method can be called when LLVoiceChannel.mState == STATE_NO_CHANNEL_INFO
+		// in this case there are no any speakers yet.
+		if (mSpeakerManager->findSpeaker(gAgentID))
 		{
-			const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); 
-			name += " " + moderator_indicator;
+			// Agent is Moderator
+			if (mSpeakerManager->findSpeaker(gAgentID)->mIsModerator)
+
+			{
+				const std::string moderator_indicator(LLTrans::getString("IM_moderator_label")); 
+				name += " " + moderator_indicator;
+			}
 		}
 	}
 	mAgentPanel->childSetValue("user_text", name);
-- 
cgit v1.2.3


From 72032eb8863b0ad39e5d731c30070d17feb9b06b Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Mon, 14 Dec 2009 12:18:28 +0200
Subject: Improvements for normal task EXT-3147 (Implement new states for
 message indicators)  -- Fixed: wells should flash every time new message
 arrives even if "new message" state is already set  -- Also fixed: Well
 leaves in 'Lit' state if incomeing notification is resolved while flashing to
 the "Lit" state

--HG--
branch : product-engine
---
 indra/newview/llchiclet.cpp | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 9671c048ef..960d9e02b2 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -112,6 +112,11 @@ public:
 		mEventTimer.start();
 	}
 
+	void stopFlashing()
+	{
+		mEventTimer.stop();
+	}
+
 private:
 	callback_t		mCallback;
 	S32 mFlashCount;
@@ -174,10 +179,18 @@ void LLSysWellChiclet::setCounter(S32 counter)
 	*/
 	mButton->setForcePressedState(counter > 0);
 
-	if (mCounter == 0 && counter > 0)
+	// we have to flash to 'Lit' state each time new unread message is comming.
+	if (counter > mCounter)
 	{
 		mFlashToLitTimer->flash();
 	}
+	else if (counter == 0)
+	{
+		// if notification is resolved while well is flashing it can leave in the 'Lit' state
+		// when flashing finishes itself. Let break flashing here.
+		mFlashToLitTimer->stopFlashing();
+	}
+
 	mCounter = counter;
 }
 
-- 
cgit v1.2.3


From f2e2f1a7a7a93de404b56fa73d6672a32381906d Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Mon, 14 Dec 2009 12:20:41 +0200
Subject: =?UTF-8?q?mplemented=20EXT-3392=20=E2=80=9CTeleport=20offers=20re?=
 =?UTF-8?q?corded=20in=20IM=20history=20should=20include=20a=20SLURL=20to?=
 =?UTF-8?q?=20the=20TP=20location=E2=80=9D,=20teleport=20offer=20message?=
 =?UTF-8?q?=20supplement=20with=20teleport=20location=20URL;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d1f1d781ee..487db16e6e 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5298,6 +5298,7 @@ void send_group_notice(const LLUUID& group_id,
 bool handle_lure_callback(const LLSD& notification, const LLSD& response)
 {
 	std::string text = response["message"].asString();
+	text.append("\r\n").append(LLAgentUI::buildSLURL());
 	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
 
 	if(0 == option)
-- 
cgit v1.2.3


From dfd1d698ea81873b45dc9927989cde232739498d Mon Sep 17 00:00:00 2001
From: Dmitry Oleshko <doleshko@productengine.com>
Date: Mon, 14 Dec 2009 12:36:10 +0200
Subject: fixed low bug (EXT-3293) overflow toast can be dragged

--HG--
branch : product-engine
---
 indra/newview/lltoast.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 4131e2755a..2a56b2cd3a 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -72,6 +72,8 @@ LLToast::LLToast(const LLToast::Params& p)
 {
 	LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
 
+	setCanDrag(FALSE);
+
 	if(mPanel)
 	{
 		insertPanel(mPanel);
-- 
cgit v1.2.3


From f446e2b94d05315a09e3068b258a606986ec8872 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Mon, 14 Dec 2009 12:49:48 +0200
Subject: Fixed Normal bug EXT-3115 ("Unable to start new chat session"
 MissingString(generic)) -- added string with name="generic" with the same
 value as "generic_request_error" into strings.xml (because "generic" is a
 part of server's response body)

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/strings.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 8ac4ca95b9..00bbe71447 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2873,6 +2873,14 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
   <string name="muted_message">
     You have blocked this resident. Sending a message will automatically unblock them.
   </string>
+  <!--Some times string name is getting from the body of server response.
+  For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. 
+  In case of the EXT-3115 issue 'generic' is passed into the gIMMgr::showSessionStartError as a string name.
+  Also there are some other places where "generic" is used.
+  So, let add string with name="generic" with the same value as "generic_request_error" -->
+  <string name="generic">
+    Error making request, please try again later.
+  </string>
   <string name="generic_request_error">
     Error making request, please try again later.
   </string>
-- 
cgit v1.2.3


From c159d9165dda268f3d8d16e95dac81bc8a9e12be Mon Sep 17 00:00:00 2001
From: Dmitry Oleshko <doleshko@productengine.com>
Date: Mon, 14 Dec 2009 16:09:29 +0200
Subject: fixed normal bug (EXT-1093) Dialog boxes should be centered in the
 viewport(game area)

Alert dialogs' behavior was broken in 6132:32b8dcff3b67 of PE brunch

--HG--
branch : product-engine
---
 indra/newview/llscreenchannel.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 79bae76e5f..78cc7c54dc 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -184,15 +184,16 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
 	S32 right_delta = old_world_rect.mRight - new_world_rect.mRight;
 	LLRect this_rect = getRect();
 
-	this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 	switch(mChannelAlignment)
 	{
 	case CA_LEFT :
+		this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 		break;
 	case CA_CENTRE :
-		this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight());
-		break;
+		LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect);
+		return;
 	case CA_RIGHT :
+		this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 		this_rect.mLeft -= right_delta;
 		this_rect.mRight -= right_delta;
 	}
-- 
cgit v1.2.3


From 222dfaef0aa16ced2fd6285763467e5bfa8ed574 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Mon, 14 Dec 2009 16:43:34 +0200
Subject: fixed EXT-3372  [BSI] Typing notification in IM displayed although
 Resident isn't typing

Added explicit resetting of IM floater's title as it was done in 1.23

--HG--
branch : product-engine
---
 indra/newview/llimfloater.cpp | 17 +++++++++++++++++
 indra/newview/llimfloater.h   |  3 +++
 indra/newview/llimview.cpp    |  2 ++
 3 files changed, 22 insertions(+)

diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 47a168e354..22d5b47ae4 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -947,3 +947,20 @@ void LLIMFloater::initIMFloater()
 	// init chat window type before user changed it in preferences
 	isChatMultiTab();
 }
+
+//static
+void LLIMFloater::sRemoveTypingIndicator(const LLSD& data)
+{
+	LLUUID session_id = data["session_id"];
+	if (session_id.isNull()) return;
+
+	LLUUID from_id = data["from_id"];
+	if (gAgentID == from_id || LLUUID::null == from_id) return;
+
+	LLIMFloater* floater = LLIMFloater::findInstance(session_id);
+	if (!floater) return;
+
+	if (IM_NOTHING_SPECIAL != floater->mDialog) return;
+
+	floater->removeTypingIndicator();
+}
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index f90bc35c34..3184fd8e35 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -109,6 +109,9 @@ public:
 
 	static void initIMFloater();
 
+	//used as a callback on receiving new IM message
+	static void sRemoveTypingIndicator(const LLSD& data);
+
 private:
 	// process focus events to set a currently active session
 	/* virtual */ void onFocusLost();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index bc35260983..b50d4674f7 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1793,6 +1793,8 @@ LLIMMgr::LLIMMgr() :
 {
 	mPendingInvitations = LLSD::emptyMap();
 	mPendingAgentListUpdates = LLSD::emptyMap();
+
+	LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLIMFloater::sRemoveTypingIndicator, _1));
 }
 
 // Add a message to a session. 
-- 
cgit v1.2.3


From a137125afdfcf729b626a92d876a4c652c97c50c Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Mon, 14 Dec 2009 18:03:41 +0200
Subject: fixed build

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b31c484529..b50d4674f7 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2043,12 +2043,11 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
 LLUUID LLIMMgr::addSession(
 	const std::string& name,
 	EInstantMessage dialog,
-	const LLUUID& other_participant_id,
-	bool voice = false)
+	const LLUUID& other_participant_id)
 {
 	LLDynamicArray<LLUUID> ids;
 	ids.put(other_participant_id);
-	return addSession(name, dialog, other_participant_id, ids, voice = false);
+	return addSession(name, dialog, other_participant_id, ids);
 }
 
 // Adds a session using the given session_id.  If the session already exists 
@@ -2057,8 +2056,7 @@ LLUUID LLIMMgr::addSession(
 	const std::string& name,
 	EInstantMessage dialog,
 	const LLUUID& other_participant_id,
-	const LLDynamicArray<LLUUID>& ids,
-	bool voice = false)
+	const LLDynamicArray<LLUUID>& ids)
 {
 	if (0 == ids.getLength())
 	{
-- 
cgit v1.2.3


From 6f7b7ef32bb6258ccaf5d5df60a5ede2101ae5de Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Mon, 14 Dec 2009 18:05:24 +0200
Subject: Fixed critical bug EXT-3427 - Viewer chashes if select Moderator
 Options submenu in Voice controls quickly.

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 785591e7e3..4f1164788d 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -280,6 +280,10 @@ void LLCallFloater::refreshPartisipantList()
 
 void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/)
 {
+	if(LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState())
+	{
+		return;
+	}
 	// Forget speaker manager from the previous session to avoid using it after session was destroyed.
 	mSpeakerManager = NULL;
 	updateSession();
-- 
cgit v1.2.3


From e398f41074f40c0779d7cc29a8127540ac78b1f9 Mon Sep 17 00:00:00 2001
From: Andrew Polunin <apolunin@productengine.com>
Date: Wed, 16 Dec 2009 10:13:54 +0200
Subject: implemented major task EXT-3473 Increase min width of IM Floater
 (increased by 20%)

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/floater_im_session.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 645c2973d8..a4ade9d0df 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -12,14 +12,14 @@
  can_dock="false"
  can_minimize="false"
  visible="true"
- width="300"
+ width="360"
  can_resize="true"
- min_width="300"
+ min_width="360"
  min_height="350">
   <layout_stack
   follows="all"
   height="320"
-  width="300"
+  width="360"
   layout="topleft"
   orientation="horizontal"
   name="im_panels"
@@ -36,7 +36,7 @@
        left="0"
        top="0"
        height="200"
-	     width="185"
+	     width="245"
        user_resize="false">
         <button
           height="20"
@@ -63,7 +63,7 @@
          parse_highlights="true"
          allow_html="true"
         left="1"
-         width="180">
+         width="240">
         </chat_history>
         <line_editor
          bottom="0" 
@@ -73,7 +73,7 @@
          label="To"
          layout="bottomleft"
          name="chat_editor"
-         width="180">
+         width="240">
         </line_editor>
     </layout_panel>
   </layout_stack>
-- 
cgit v1.2.3


From 9dd2b290318f657b3dca81278f597cc702a6e149 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Wed, 16 Dec 2009 15:30:33 +0200
Subject: fixed EXT-2884 Initiation of a voice call should not bring text chat
 (p2p, ad-hoc, group)

Added flag to an LLIMSession which indicated whether it has been created for a voice call.

--HG--
branch : product-engine
---
 indra/newview/llavataractions.cpp |   9 +---
 indra/newview/llbottomtray.cpp    |  58 +++++++++++++-------
 indra/newview/llbottomtray.h      |   2 +
 indra/newview/llimview.cpp        | 110 ++++++++++++++++++++------------------
 indra/newview/llimview.h          |  22 ++++++--
 indra/newview/llsyswellwindow.cpp |  18 +++----
 6 files changed, 128 insertions(+), 91 deletions(-)

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 33dc7ee2c8..636b1de4d4 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -211,11 +211,9 @@ void LLAvatarActions::startCall(const LLUUID& id)
 
 	std::string name;
 	gCacheName->getFullName(id, name);
-	LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
+	LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id, true);
 	if (session_id != LLUUID::null)
 	{
-		// always open IM window when connecting to voice
-		LLIMFloater::show(session_id);
 		gIMMgr->startCall(session_id);
 	}
 	make_ui_sound("UISndStartIM");
@@ -239,15 +237,12 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
 	// create the new ad hoc voice session
 	const std::string title = LLTrans::getString("conference-title");
 	LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START,
-										   ids[0], id_array);
+										   ids[0], id_array, true);
 	if (session_id == LLUUID::null)
 	{
 		return;
 	}
 
-	// always open IM window when connecting to voice
-	LLIMFloater::show(session_id);
-
 	// start the call once the session has fully initialized
 	gIMMgr->autoStartCallOnStartup(session_id);
 
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 8c793873f4..8389895479 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -78,6 +78,9 @@ LLBottomTray::LLBottomTray(const LLSD&)
 	LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2));
 	LLIMMgr::getInstance()->addSessionObserver(this);
 
+	//managing chiclets for voice calls
+	LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLBottomTray::onNewIM, this, _1));
+
 	//this is to fix a crash that occurs because LLBottomTray is a singleton
 	//and thus is deleted at the end of the viewers lifetime, but to be cleanly
 	//destroyed LLBottomTray requires some subsystems that are long gone
@@ -143,25 +146,22 @@ LLIMChiclet* LLBottomTray::createIMChiclet(const LLUUID& session_id)
 //virtual
 void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
 {
-	if(getChicletPanel())
-	{
-		if(getChicletPanel()->findChiclet<LLChiclet>(session_id))
-		{
+	if (!getChicletPanel()) return;
 
-		}
-		else
-		{
-			LLIMChiclet* chiclet = createIMChiclet(session_id);
-			if(chiclet)
-			{
-				chiclet->setIMSessionName(name);
-				chiclet->setOtherParticipantId(other_participant_id);
-			}
-			else
-			{
-				llerrs << "Could not create chiclet" << llendl;
-			}
-		}
+	if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return;
+
+	// For im sessions started as voice call chiclet gets created on the first incoming message
+	if (gIMMgr->isVoiceCall(session_id)) return;
+
+	LLIMChiclet* chiclet = createIMChiclet(session_id);
+	if(chiclet)
+	{
+		chiclet->setIMSessionName(name);
+		chiclet->setOtherParticipantId(other_participant_id);
+	}
+	else
+	{
+		llerrs << "Could not create chiclet" << llendl;
 	}
 }
 
@@ -194,6 +194,28 @@ void LLBottomTray::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID&
 	}
 }
 
+void LLBottomTray::onNewIM(const LLSD& data)
+{
+	LLUUID from_id = data["from_id"];
+	if (from_id.isNull() || gAgentID == from_id) return;
+
+	LLUUID session_id = data["session_id"];
+	if (session_id.isNull()) return;
+
+	if (!gIMMgr->isVoiceCall(session_id)) return;
+
+	if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return;
+
+	//first real message, time to create chiclet
+	LLIMChiclet* chiclet = createIMChiclet(session_id);
+	if(chiclet)
+	{
+		chiclet->setIMSessionName(LLIMModel::getInstance()->getName(session_id));
+		chiclet->setOtherParticipantId(LLIMModel::getInstance()->getOtherParticipantID(session_id));
+	}
+}
+
+
 // virtual
 void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal)
 {
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index fa204ee9ea..1adea24ee4 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -75,6 +75,8 @@ public:
 	virtual void sessionRemoved(const LLUUID& session_id);
 	void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
 
+	void onNewIM(const LLSD& data);
+
 	virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
 
 	virtual void onFocusLost();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b50d4674f7..ea3b57a358 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -153,7 +153,7 @@ LLIMModel::LLIMModel()
 	addNewMsgCallback(toast_callback);
 }
 
-LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids)
+LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice)
 :	mSessionID(session_id),
 	mName(name),
 	mType(type),
@@ -167,7 +167,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
 	mCallBackEnabled(true),
 	mTextIMPossible(true),
 	mOtherParticipantIsAvatar(true),
-	mStartCallOnInitialize(false)
+	mStartCallOnInitialize(false),
+	mStartedAsIMCall(voice)
 {
 	// set P2P type by default
 	mSessionType = P2P_SESSION;
@@ -250,10 +251,10 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
 			switch(new_state)
 			{
 			case LLVoiceChannel::STATE_CALL_STARTED :
-				LLIMModel::getInstance()->addMessage(mSessionID, other_avatar_name, mOtherParticipantID, "Started a voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Started a voice call");
 				break;
 			case LLVoiceChannel::STATE_CONNECTED :
-				LLIMModel::getInstance()->addMessage(mSessionID, "You", gAgent.getID(), "Joined the voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Joined the voice call");
 			default:
 				break;
 			}
@@ -263,10 +264,10 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
 			switch(new_state)
 			{
 			case LLVoiceChannel::STATE_CALL_STARTED :
-				LLIMModel::getInstance()->addMessage(mSessionID, "You", gAgent.getID(), "Started a voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Started a voice call");
 				break;
 			case LLVoiceChannel::STATE_CONNECTED :
-				LLIMModel::getInstance()->addMessage(mSessionID, other_avatar_name, mOtherParticipantID, "Joined the voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Joined the voice call");
 			default:
 				break;
 			}
@@ -452,7 +453,7 @@ void LLIMModel::testMessages()
 
 //session name should not be empty
 bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, 
-						   const LLUUID& other_participant_id, const std::vector<LLUUID>& ids)
+						   const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice)
 {
 	if (name.empty())
 	{
@@ -466,7 +467,7 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
 		return false;
 	}
 
-	LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids);
+	LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids, voice);
 	mId2SessionMap[session_id] = session;
 
 	LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, name, other_participant_id);
@@ -475,6 +476,12 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
 
 }
 
+bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice)
+{
+	std::vector<LLUUID> no_ids;
+	return newSession(session_id, name, type, other_participant_id, no_ids, voice);
+}
+
 bool LLIMModel::clearSession(const LLUUID& session_id)
 {
 	if (mId2SessionMap.find(session_id) == mId2SessionMap.end()) return false;
@@ -574,12 +581,33 @@ bool LLIMModel::proccessOnlineOfflineNotification(
 
 bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, 
 						   const std::string& utf8_text, bool log2file /* = true */) { 
+
+	LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file);
+	if (!session) return false;
+
+	// notify listeners
+	LLSD arg;
+	arg["session_id"] = session_id;
+	arg["num_unread"] = session->mNumUnread;
+	arg["participant_unread"] = session->mParticipantUnreadMessageCount;
+	arg["message"] = utf8_text;
+	arg["from"] = from;
+	arg["from_id"] = from_id;
+	arg["time"] = LLLogChat::timestamp(false);
+	mNewMsgSignal(arg);
+
+	return true;
+}
+
+LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, 
+													 const std::string& utf8_text, bool log2file /* = true */)
+{
 	LLIMSession* session = findIMSession(session_id);
 
 	if (!session)
 	{
 		llwarns << "session " << session_id << "does not exist " << llendl;
-		return false;
+		return NULL;
 	}
 
 	addToHistory(session_id, from, from_id, utf8_text);
@@ -593,19 +621,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
 		++(session->mParticipantUnreadMessageCount);
 	}
 
-
-	// notify listeners
-	LLSD arg;
-	arg["session_id"] = session_id;
-	arg["num_unread"] = session->mNumUnread;
-	arg["participant_unread"] = session->mParticipantUnreadMessageCount;
-	arg["message"] = utf8_text;
-	arg["from"] = from;
-	arg["from_id"] = from_id;
-	arg["time"] = LLLogChat::timestamp(false);
-	mNewMsgSignal(arg);
-
-	return true;
+	return session;
 }
 
 
@@ -1056,8 +1072,8 @@ public:
 				|| mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE)
 				&& LLIMModel::getInstance()->findIMSession(mSessionID))
 			{
-				// always open IM window when connecting to voice
-				LLIMFloater::show(mSessionID);
+				// TODO remove in 2010, for voice calls we do not open an IM window
+				//LLIMFloater::show(mSessionID);
 			}
 
 			gIMMgr->clearPendingAgentListUpdates(mSessionID);
@@ -1582,11 +1598,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
 
 			if (voice)
 			{
-				if (gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL))
-				{
-					// always open IM window when connecting to voice
-					LLIMFloater::show(session_id);
-				}
+				gIMMgr->startCall(session_id, LLVoiceChannel::INCOMING_CALL);
 			}
 
 			gIMMgr->clearPendingAgentListUpdates(session_id);
@@ -1625,11 +1637,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
 				}
 			}
 			
-			LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id);
-			if (new_session_id != LLUUID::null)
-			{
-				LLIMFloater::show(new_session_id);
-			}
+			LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id, true);
 
 			std::string url = gAgent.getRegion()->getCapability(
 				"ChatSessionRequest");
@@ -1705,11 +1713,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
 					payload["session_handle"].asString(),
 					payload["session_uri"].asString());
 
-				if (gIMMgr->startCall(session_id))
-				{
-					// always open IM window when connecting to voice
-					LLIMFloater::show(session_id);
-				}
+				gIMMgr->startCall(session_id);
 
 				gIMMgr->clearPendingAgentListUpdates(session_id);
 				gIMMgr->clearPendingInvitation(session_id);
@@ -1719,11 +1723,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
 				LLUUID new_session_id = gIMMgr->addSession(
 					payload["session_name"].asString(),
 					type,
-					session_id);
-				if (new_session_id != LLUUID::null)
-				{
-					LLIMFloater::show(new_session_id);
-				}
+					session_id, true);
 
 				std::string url = gAgent.getRegion()->getCapability(
 					"ChatSessionRequest");
@@ -2018,11 +2018,7 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
 							const std::string& voice_session_handle,
 							const std::string& caller_uri)
 {
-	LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id);
-	if (session_id != LLUUID::null)
-	{
-		LLIMFloater::show(session_id);
-	}
+	LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id, true);
 
 	LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id);
 	if (speaker_mgr)
@@ -2043,11 +2039,11 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
 LLUUID LLIMMgr::addSession(
 	const std::string& name,
 	EInstantMessage dialog,
-	const LLUUID& other_participant_id)
+	const LLUUID& other_participant_id, bool voice)
 {
 	LLDynamicArray<LLUUID> ids;
 	ids.put(other_participant_id);
-	return addSession(name, dialog, other_participant_id, ids);
+	return addSession(name, dialog, other_participant_id, ids, voice);
 }
 
 // Adds a session using the given session_id.  If the session already exists 
@@ -2056,7 +2052,7 @@ LLUUID LLIMMgr::addSession(
 	const std::string& name,
 	EInstantMessage dialog,
 	const LLUUID& other_participant_id,
-	const LLDynamicArray<LLUUID>& ids)
+	const LLDynamicArray<LLUUID>& ids, bool voice)
 {
 	if (0 == ids.getLength())
 	{
@@ -2075,7 +2071,7 @@ LLUUID LLIMMgr::addSession(
 
 	if (new_session)
 	{
-		LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids);
+		LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice);
 	}
 
 
@@ -2454,6 +2450,14 @@ bool LLIMMgr::endCall(const LLUUID& session_id)
 	return true;
 }
 
+bool LLIMMgr::isVoiceCall(const LLUUID& session_id)
+{
+	LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id);
+	if (!im_session) return false;
+
+	return im_session->mStartedAsIMCall;
+}
+
 // create a floater and update internal representation for
 // consistency. Returns the pointer, caller (the class instance since
 // it is a private method) is not responsible for deleting the
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index e2fcd63e28..6eb3f3d07f 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -65,7 +65,7 @@ public:
 		} SType;
 
 		LLIMSession(const LLUUID& session_id, const std::string& name, 
-			const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids);
+			const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice);
 		virtual ~LLIMSession();
 
 		void sessionInitReplyReceived(const LLUUID& new_session_id);
@@ -104,6 +104,9 @@ public:
 		bool mTextIMPossible;
 		bool mOtherParticipantIsAvatar;
 		bool mStartCallOnInitialize;
+
+		//if IM session is created for a voice call
+		bool mStartedAsIMCall;
 	};
 	
 
@@ -143,7 +146,10 @@ public:
 	 * @param name session name should not be empty, will return false if empty
 	 */
 	bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, 
-		const std::vector<LLUUID>& ids = std::vector<LLUUID>());
+		const std::vector<LLUUID>& ids, bool voice = false);
+
+	bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type,
+		const LLUUID& other_participant_id, bool voice = false);
 
 	/**
 	 * Remove all session data associated with a session specified by session_id
@@ -162,6 +168,12 @@ public:
 	 */
 	bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true);
 
+	/**
+	 * Similar to addMessage(...) above but won't send a signal about a new message added
+	 */
+	LLIMModel::LLIMSession* addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, 
+		const std::string& utf8_text, bool log2file = true);
+
 	/**
 	 * Add a system message to an IM Model
 	 */
@@ -284,14 +296,14 @@ public:
 	// session.
 	LLUUID addSession(const std::string& name,
 					  EInstantMessage dialog,
-					  const LLUUID& other_participant_id);
+					  const LLUUID& other_participant_id, bool voice = false);
 
 	// Adds a session using a specific group of starting agents
 	// the dialog type is assumed correct. Returns the uuid of the session.
 	LLUUID addSession(const std::string& name,
 					  EInstantMessage dialog,
 					  const LLUUID& other_participant_id,
-					  const LLDynamicArray<LLUUID>& ids);
+					  const LLDynamicArray<LLUUID>& ids, bool voice = false);
 
 	/**
 	 * Creates a P2P session with the requisite handle for responding to voice calls.
@@ -391,6 +403,8 @@ public:
 	 **/
 	bool endCall(const LLUUID& session_id);
 
+	bool isVoiceCall(const LLUUID& session_id);
+
 private:
 
 	/**
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index ea49f9c32e..f49e7ef0da 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -709,15 +709,15 @@ BOOL LLIMWellWindow::postBuild()
 void LLIMWellWindow::sessionAdded(const LLUUID& session_id,
 								   const std::string& name, const LLUUID& other_participant_id)
 {
-	if (mMessageList->getItemByValue(session_id) == NULL)
-	{
-		S32 chicletCounter = LLIMModel::getInstance()->getNumUnread(session_id);
-		if (chicletCounter > -1)
-		{
-			addIMRow(session_id, chicletCounter, name, other_participant_id);	
-			reshapeWindow();
-		}
-	}
+	if (!mMessageList->getItemByValue(session_id)) return;
+	
+	// For im sessions started as voice call chiclet gets created on the first incoming message
+	if (gIMMgr->isVoiceCall(session_id)) return;
+
+	if (!gIMMgr->hasSession(session_id)) return;
+
+	addIMRow(session_id, 0, name, other_participant_id);	
+	reshapeWindow();
 }
 
 //virtual
-- 
cgit v1.2.3


From ffcf4dee5268f34e0e2782bc85509cdcf4c3810b Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Wed, 16 Dec 2009 17:11:41 +0200
Subject: Fixed low bug EXT-3188 ("There are no picks/classfields here" message
 should appear in "Picks" tab after the server response and not to).

- added "Loading..." message

- changed condition on which "There are no picks/classfields here" is
  shown and moved message string to strings.xml

--HG--
branch : product-engine
---
 indra/newview/llpanelpicks.cpp                     | 21 ++++++++++++++++++---
 indra/newview/llpanelpicks.h                       |  5 +++++
 indra/newview/skins/default/xui/en/panel_picks.xml |  7 ++-----
 indra/newview/skins/default/xui/en/strings.xml     |  4 ++++
 4 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 498782fb44..8e89d845ae 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -45,6 +45,7 @@
 #include "llnotificationsutil.h"
 #include "lltexturectrl.h"
 #include "lltoggleablemenu.h"
+#include "lltrans.h"
 #include "llviewergenericmessage.h"	// send_generic_message
 #include "llmenugl.h"
 #include "llviewermenu.h"
@@ -198,7 +199,9 @@ LLPanelPicks::LLPanelPicks()
 	mClassifiedsAccTab(NULL),
 	mPanelClassifiedInfo(NULL),
 	mPanelClassifiedEdit(NULL),
-	mClickThroughDisp(NULL)
+	mClickThroughDisp(NULL),
+	mNoClassifieds(false),
+	mNoPicks(false)
 {
 	mClickThroughDisp = new LLClassifiedClickThrough();
 	gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp);
@@ -224,6 +227,11 @@ void LLPanelPicks::updateData()
 	// Send Picks request only when we need to, not on every onOpen(during tab switch).
 	if(isDirty())
 	{
+		mNoPicks = false;
+		mNoClassifieds = false;
+
+		childSetValue("picks_panel_text", LLTrans::getString("PicksClassifiedsLoadingText"));
+
 		mPicksList->clear();
 		LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
 
@@ -284,6 +292,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
 			resetDirty();
 			updateButtons();
 		}
+		
+		mNoPicks = !mPicksList->size();
 	}
 	else if(APT_CLASSIFIEDS == type)
 	{
@@ -317,9 +327,14 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
 			resetDirty();
 			updateButtons();
 		}
+		
+		mNoClassifieds = !mClassifiedsList->size();
+	}
+
+	if (mNoPicks && mNoClassifieds)
+	{
+		childSetValue("picks_panel_text", LLTrans::getString("NoPicksClassifiedsText"));
 	}
-	if(!mPicksList->size() && !mClassifiedsList->size())
-		childSetVisible("empty_picks_panel_text", true);
 }
 
 LLPickItem* LLPanelPicks::getSelectedPickItem()
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 893a0c53a3..2a284513ef 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -156,6 +156,11 @@ private:
 	LLAccordionCtrlTab* mClassifiedsAccTab;
 
 	LLClassifiedClickThrough* mClickThroughDisp;
+	
+	//true if picks list is empty after processing picks
+	bool mNoPicks;
+	//true if classifieds list is empty after processing classifieds
+	bool mNoClassifieds;
 };
 
 class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index 4facedc7ea..2230229b14 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -20,12 +20,9 @@
   height="535"
   layout="topleft"
   left="6"
-  name="empty_picks_panel_text"
+  name="picks_panel_text"
   top="10"
-  visible="false" 
-  width="313">
-   There are no picks/classifieds here
- </text>
+  width="313"/>
  <accordion
   fit_parent="true" 
   follows="all"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 2f50c5ee6c..0aefc15090 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2074,6 +2074,10 @@ this texture in your inventory
 	<!-- panel classified -->
 	<string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string>
 	<string name="ClassifiedUpdateAfterPublish">(will update after publish)</string>
+  
+  <!-- panel picks -->
+  <string name="NoPicksClassifiedsText">There are no picks/classifieds here</string>
+  <string name="PicksClassifiedsLoadingText">Loading...</string>
 
 	<!-- Multi Preview Floater -->
 	<string name="MultiPreviewTitle">Preview</string>
-- 
cgit v1.2.3


From a0ddd6877bfab939b7b68a338637276783601a09 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Wed, 16 Dec 2009 17:08:03 +0200
Subject: Un-hardcoded a couple of strings.

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp                     | 13 +++++++------
 indra/newview/skins/default/xui/en/strings.xml |  4 ++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ea3b57a358..1d56fc0cab 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -237,24 +237,25 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
 
 void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
 {
-	// *TODO: remove hardcoded string!!!!!!!!!!!
-
 	bool is_p2p_session = dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel);
 	std::string other_avatar_name;
 
 	if(is_p2p_session)
 	{
 		gCacheName->getFullName(mOtherParticipantID, other_avatar_name);
+		std::string you = LLTrans::getString("You");
+		std::string started_call = LLTrans::getString("started_call");
+		std::string joined_call = LLTrans::getString("joined_call");
 
 		if(direction == LLVoiceChannel::INCOMING_CALL)
 		{
 			switch(new_state)
 			{
 			case LLVoiceChannel::STATE_CALL_STARTED :
-				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Started a voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call);
 				break;
 			case LLVoiceChannel::STATE_CONNECTED :
-				LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Joined the voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call);
 			default:
 				break;
 			}
@@ -264,10 +265,10 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
 			switch(new_state)
 			{
 			case LLVoiceChannel::STATE_CALL_STARTED :
-				LLIMModel::getInstance()->addMessageSilently(mSessionID, "You", gAgent.getID(), "Started a voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call);
 				break;
 			case LLVoiceChannel::STATE_CONNECTED :
-				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, "Joined the voice call");
+				LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call);
 			default:
 				break;
 			}
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0aefc15090..ec4723bd55 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2846,6 +2846,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
 	<string name="IM_to_label">To</string>
 	<string name="IM_moderator_label">(Moderator)</string>
 
+	<!-- voice calls -->
+	<string name="started_call">Started a voice call</string>
+	<string name="joined_call">Joined the voice call</string>
+
   <string name="ringing-im">
     Joining Voice Chat...
   </string>
-- 
cgit v1.2.3


From fdf9f9d779c019c68528b4de2bb5776806b0dec4 Mon Sep 17 00:00:00 2001
From: Denis Serdjuk <dserduk@productengine.com>
Date: Mon, 14 Dec 2009 18:30:13 +0200
Subject: EXT-3352	 Unable to chat from mouselook mode Cause : After
 changes in layout  in  main_view.xml, navbar had received another parent, but
 setVisible had used getParent() to control visibility of the navbar

--HG--
branch : product-engine
---
 indra/newview/llnavigationbar.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index cdab3b2310..6210151d1b 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -261,9 +261,14 @@ BOOL LLNavigationBar::postBuild()
 void LLNavigationBar::setVisible(BOOL visible)
 {
 	// change visibility of grandparent layout_panel to animate in and out
-	if (getParent() && getParent()->getParent()) 
+	if (getParent()) 
 	{
-		getParent()->getParent()->setVisible(visible);	
+		//to avoid some mysterious bugs like EXT-3352, at least try to log an incorrect parent to ping  about a problem. 
+		if(getParent()->getName() != "nav_bar_container")
+		{
+			LL_WARNS("LLNavigationBar")<<"NavigationBar has an unknown name of the parent: "<<getParent()->getName()<< LL_ENDL;
+		}
+		getParent()->setVisible(visible);	
 	}
 }
 
-- 
cgit v1.2.3


From d06742958c3f28cd62e5752aadc107ff98718512 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Mon, 14 Dec 2009 19:14:16 +0200
Subject: Update for critical bug EXT-3427 - Viewer chashes if select Moderator
 Options submenu in Voice controls quickly. Added code to hide menu before
 destroying it. Added aditional checks. Added comments

--HG--
branch : product-engine
---
 indra/newview/llcallfloater.cpp      | 6 +++++-
 indra/newview/llpanelpeoplemenus.cpp | 8 ++++++++
 indra/newview/llpanelpeoplemenus.h   | 2 ++
 indra/newview/llparticipantlist.cpp  | 8 ++++++++
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 4f1164788d..2f5523e04d 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -280,7 +280,11 @@ void LLCallFloater::refreshPartisipantList()
 
 void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/)
 {
-	if(LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState())
+	// Don't update participant list if no channel info is available.
+	// Fix for ticket EXT-3427
+	// @see LLParticipantList::~LLParticipantList()
+	if(LLVoiceChannel::getCurrentVoiceChannel() && 
+		LLVoiceChannel::STATE_NO_CHANNEL_INFO == LLVoiceChannel::getCurrentVoiceChannel()->getState())
 	{
 		return;
 	}
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 04fe42de9f..573de1e51c 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -81,6 +81,14 @@ void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids,
 	LLMenuGL::showPopup(spawning_view, mMenu, x, y);
 }
 
+void ContextMenu::hide()
+{
+	if(mMenu)
+	{
+		mMenu->hide();
+	}
+}
+
 //== NearbyMenu ===============================================================
 
 LLContextMenu* NearbyMenu::createMenu()
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index ed0f8208f6..14ae2985f0 100644
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -54,6 +54,8 @@ public:
 	 */
 	/*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y);
 
+	virtual void hide();
+
 protected:
 
 	virtual LLContextMenu* createMenu() = 0;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 47b9f29b48..2c5f1b094e 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -144,6 +144,14 @@ LLParticipantList::~LLParticipantList()
 	mAvatarListRefreshConnection.disconnect();
 	mAvatarListReturnConnection.disconnect();
 
+	// It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged()
+	// See ticket EXT-3427
+	// hide menu before deleting it to stop enable and check handlers from triggering.
+	if(mParticipantListMenu)
+	{
+		mParticipantListMenu->hide();
+	}
+
 	delete mParticipantListMenu;
 	mParticipantListMenu = NULL;
 }
-- 
cgit v1.2.3


From 37b039b9fd5d970b297715b9187b60a241e36a3a Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Mon, 14 Dec 2009 19:42:54 +0200
Subject: Fixed normal priority bug EXT-2002 ([BSI] Side Tray opened on it's
 own when receiving group notice). The check for group info panel visisbility
 was wrong (returned true even if a parent was invisible).

--HG--
branch : product-engine
---
 indra/newview/llgroupactions.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index fdb2b886a6..6ca8c025b1 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -197,12 +197,12 @@ void LLGroupActions::activate(const LLUUID& group_id)
 	gAgent.sendReliableMessage();
 }
 
-bool	isGroupUIVisible()
+static bool isGroupUIVisible()
 {
 	LLPanel* panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray");
 	if(!panel)
 		return false;
-	return panel->getVisible();
+	return panel->isInVisibleChain();
 }
 
 // static
-- 
cgit v1.2.3


From fe0da9bf7b81d24a9614f95d9f91012796eabf77 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Mon, 14 Dec 2009 19:53:54 +0200
Subject: Fixed low bug EXT - 3255 (Call button is enabled in the People &
 Profile panels while voice is disabled)

--HG--
branch : product-engine
---
 indra/newview/llavataractions.cpp                  | 19 ++++++++++++++++
 indra/newview/llavataractions.h                    |  5 +++++
 indra/newview/llpanelavatar.cpp                    |  2 +-
 indra/newview/llpanelpeople.cpp                    | 25 +++++++++++++++++++++-
 indra/newview/llpanelpeople.h                      |  1 +
 indra/newview/llpanelpeoplemenus.cpp               | 18 ++++++++++++++++
 .../skins/default/xui/en/menu_people_nearby.xml    |  3 +++
 .../xui/en/menu_people_nearby_multiselect.xml      |  3 +++
 8 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5f90a7627f..33dc7ee2c8 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -61,6 +61,7 @@
 #include "llviewerregion.h"
 #include "llimfloater.h"
 #include "lltrans.h"
+#include "llcallingcard.h"
 
 // static
 void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
@@ -265,6 +266,24 @@ bool LLAvatarActions::isCalling(const LLUUID &id)
 	return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
 }
 
+//static
+bool LLAvatarActions::canCall(const LLUUID &id)
+{
+	if(isFriend(id))
+	{
+		return LLAvatarTracker::instance().isBuddyOnline(id) && LLVoiceClient::voiceEnabled();
+	}
+	else
+	{
+		// don't need to check online/offline status because "usual resident" (resident that is not a friend)
+		// can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual
+		// resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident"
+		// we need to check only that "our" voice is enabled.
+		return LLVoiceClient::voiceEnabled();
+	}
+
+}
+
 // static
 void LLAvatarActions::startConference(const std::vector<LLUUID>& ids)
 {
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 2dd2a4c4b1..01c18d4228 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -128,6 +128,11 @@ public:
 	 */
 	static bool isCalling(const LLUUID &id);
 
+	/**
+	 * @return true if call to the resident can be made (resident is online and voice is enabled)
+	 */
+
+	static bool canCall(const LLUUID &id);
 	/**
 	 * Invite avatar to a group.
 	 */	
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index b9f422ca6f..ffe7f57167 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -396,7 +396,7 @@ void LLPanelProfileTab::updateButtons()
 					&& gAgent.isGodlike() || is_agent_mappable(getAvatarId());
 
 	childSetEnabled("show_on_map_btn", enable_map_btn);
-	childSetEnabled("call", LLVoiceClient::voiceEnabled());
+	childSetEnabled("call", LLAvatarActions::canCall(getAvatarId()));
 }
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 79a593a8c9..e134840153 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -776,7 +776,7 @@ void LLPanelPeople::updateButtons()
 	buttonSetEnabled("teleport_btn",		friends_tab_active && item_selected && isFriendOnline(selected_uuids.front()));
 	buttonSetEnabled("view_profile_btn",	item_selected);
 	buttonSetEnabled("im_btn",				multiple_selected); // allow starting the friends conference for multiple selection
-	buttonSetEnabled("call_btn",			multiple_selected && LLVoiceClient::voiceEnabled());
+	buttonSetEnabled("call_btn",			multiple_selected && canCall());
 	buttonSetEnabled("share_btn",			item_selected); // not implemented yet
 
 	bool none_group_selected = item_selected && selected_id.isNull();
@@ -784,6 +784,29 @@ void LLPanelPeople::updateButtons()
 	buttonSetEnabled("chat_btn", !none_group_selected);
 }
 
+bool LLPanelPeople::canCall()
+{
+	std::vector<LLUUID> selected_uuids;
+	getCurrentItemIDs(selected_uuids);
+
+	bool result = false;
+
+	std::vector<LLUUID>::const_iterator
+		id = selected_uuids.begin(),
+		uuids_end = selected_uuids.end();
+
+	for (;id != uuids_end; ++id)
+	{
+		if (LLAvatarActions::canCall(*id))
+		{
+			result = true;
+			break;
+		}
+	}
+
+	return result;
+}
+
 std::string LLPanelPeople::getActiveTabName() const
 {
 	return mTabContainer->getCurrentPanel()->getName();
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 750d3b573f..f5cdc0935c 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -73,6 +73,7 @@ private:
 
 	bool					isFriendOnline(const LLUUID& id);
 	bool					isItemsFreeOfFriends(const std::vector<LLUUID>& uuids);
+	bool 					canCall();
 
 	void					updateButtons();
 	std::string				getActiveTabName() const;
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 573de1e51c..0314642d9e 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -181,7 +181,25 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
 		const LLUUID& id = mUUIDs.front();
 		return LLAvatarActions::isFriend(id);
 	}
+	else if (item == std::string("can_call"))
+	{
+		bool result = false;
+		int size = mUUIDs.size();
+		std::cout << size << std::endl;
+		std::vector<LLUUID>::const_iterator
+			id = mUUIDs.begin(),
+			uuids_end = mUUIDs.end();
 
+		for (;id != uuids_end; ++id)
+		{
+			if (LLAvatarActions::canCall(*id))
+			{
+				result = true;
+				break;
+			}
+		}
+		return result;
+	}
 	return false;
 }
 
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 39469f7101..5f2e6e0f6c 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -32,6 +32,9 @@
      name="Call">
         <menu_item_call.on_click
          function="Avatar.Call" />
+        <menu_item_call.on_enable
+         function="Avatar.EnableItem"
+         parameter="can_call" />
     </menu_item_call>
     <menu_item_call
      label="Share"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index df74d2dcd4..0d3dd3366d 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -27,6 +27,9 @@
      name="Call">
         <on_click
          function="Avatar.Call" />
+        <on_enable
+         function="Avatar.EnableItem"
+         parameter="can_call" />
     </menu_item_call>
     <menu_item_call
      enabled="false"
-- 
cgit v1.2.3


From 249ff4c81ba18b0a24315f543ba84a587868a452 Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Mon, 14 Dec 2009 20:06:34 +0200
Subject: Fixed low bug EXT - 3929 ('Home' tongue in the Side tray doesn't have
 a tool tip)

--HG--
branch : product-engine
---
 indra/newview/llsidetray.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index a1af2e5411..608165022f 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -354,8 +354,7 @@ LLButton* LLSideTray::createButton	(const std::string& name,const std::string& i
 	button->setLabel(name);
 	button->setClickedCallback(callback);
 
-	if(tooltip!="Home")
-		button->setToolTip(tooltip);
+	button->setToolTip(tooltip);
 	
 	if(image.length())
 	{
-- 
cgit v1.2.3


From 7068d77ca32f6f96db546b1a0deca8d006cd9149 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Mon, 14 Dec 2009 21:38:22 +0200
Subject: Fixed minor bug EXT-3045 ("Move" buttin seems to be unpressed while
 Move controls panel is active (refer to screenshot)).

--HG--
branch : product-engine
---
 indra/newview/llmoveview.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index c17427bec1..4e4646c052 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -160,9 +160,12 @@ void LLFloaterMove::setEnabled(BOOL enabled)
 // virtual
 void LLFloaterMove::setVisible(BOOL visible)
 {
-	// Ignore excessive calls of this method (from LLTransientFloaterMgr?).
+	// Do nothing with Stand/Stop Flying panel in excessive calls of this method (from LLTransientFloaterMgr?).
 	if (getVisible() == visible)
+	{
+		LLTransientDockableFloater::setVisible(visible);
 		return;
+	}
 
 	if (visible)
 	{
@@ -492,6 +495,7 @@ void LLFloaterMove::onOpen(const LLSD& key)
 //virtual
 void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/)
 {
+	LLDockableFloater::setDocked(docked, pop_on_undock);
 	LLTransientDockableFloater::setDocked(docked, pop_on_undock);
 }
 
-- 
cgit v1.2.3


From bad8ba5b64cb48709404ce54e06a52aaeca83529 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 14 Dec 2009 11:38:35 -0800
Subject: Cleanup for errors post-merge.

---
 indra/newview/llviewerassetstorage.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 440828da68..bb49804aff 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -39,7 +39,6 @@
 #include "message.h"
 
 #include "llagent.h"
-#include "llviewerbuild.h"
 
 LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
 										   LLVFS *vfs, const LLHost &upstream_host)
-- 
cgit v1.2.3


From fc3b068d2ef05f95e579876b68d3e17c8425bc14 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Mon, 14 Dec 2009 21:42:41 +0200
Subject: Removed unnecessary string which occasionally apeeared in
 bc42d3e21160.

--HG--
branch : product-engine
---
 indra/newview/llmoveview.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 4e4646c052..22201aecb2 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -495,7 +495,6 @@ void LLFloaterMove::onOpen(const LLSD& key)
 //virtual
 void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/)
 {
-	LLDockableFloater::setDocked(docked, pop_on_undock);
 	LLTransientDockableFloater::setDocked(docked, pop_on_undock);
 }
 
-- 
cgit v1.2.3


From 89201ba29a443db8f15d0e0d9ea38bad91c0c000 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 14 Dec 2009 16:05:13 -0500
Subject: Fix for mac build post-merge.

---
 indra/llcommon/llapp.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index 963ea38249..27a52cdd99 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -43,7 +43,9 @@ template <typename Type> class LLAtomic32;
 typedef LLAtomic32<U32> LLAtomicU32;
 class LLErrorThread;
 class LLLiveFile;
+#if LL_LINUX
 typedef struct siginfo siginfo_t;
+#endif
 
 typedef void (*LLAppErrorHandler)();
 typedef void (*LLAppChildCallback)(int pid, bool exited, int status);
-- 
cgit v1.2.3


From 4cc5f81ddf0b9a190235e8946d7e438499d91639 Mon Sep 17 00:00:00 2001
From: "Nyx (Neal Orman)" <nyx@lindenlab.com>
Date: Mon, 14 Dec 2009 17:17:40 -0500
Subject: EXT-3370 integrate tab-ification to appearance sidepanel

Moved elements around so that the bottom bar is contained in the outfits panel
XUI changes by erica/chuck/nyx
code changes by nyx

code reviewed by Bigpapi

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp                |   2 +-
 indra/newview/llpaneloutfitsinventory.cpp          |  53 +++----
 indra/newview/llpaneloutfitsinventory.h            |  19 +--
 indra/newview/llsidepanelappearance.cpp            |  14 --
 indra/newview/llsidepanelappearance.h              |   2 -
 .../default/xui/en/panel_outfits_inventory.xml     | 157 +++++++++++++--------
 .../skins/default/xui/en/sidepanel_appearance.xml  |  76 ++--------
 7 files changed, 152 insertions(+), 171 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e361082f7b..ab06ac1691 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -973,7 +973,7 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const
 		dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
 	if (!outfit_panel)
 		return false;
-	return outfit_panel->isAccordionPanel(my_panel);
+	return outfit_panel->isTabPanel(my_panel);
 }
 
 // +=================================================+
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 4511bca23a..5b36a5406a 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -75,12 +75,12 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
 BOOL LLPanelOutfitsInventory::postBuild()
 {
 	
-	initAccordionPanels();
+	initTabPanels();
 	initListCommandsHandlers();
 	return TRUE;
 }
 
-void LLPanelOutfitsInventory::updateParent()
+void LLPanelOutfitsInventory::updateVerbs()
 {
 	if (mParent)
 	{
@@ -127,7 +127,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 	mActivePanel->setFilterSubString(string);
 }
 
-void LLPanelOutfitsInventory::onWear()
+void LLPanelOutfitsInventory::onWearButtonClick()
 {
 	LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
 	if (listenerp)
@@ -167,7 +167,7 @@ void LLPanelOutfitsInventory::onNew()
 void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
 	updateListCommands();
-	updateParent();
+	updateVerbs();
 	if (getRootFolder()->needsAutoRename() && items.size())
 	{
 		getRootFolder()->startRenamingSelectedItem();
@@ -234,13 +234,14 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
 	mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this));
 	mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
 	mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this));
-
+	mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
+	
 	LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn");
 	trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this
-			,	_4 // BOOL drop
-			,	_5 // EDragAndDropType cargo_type
-			,	_7 // EAcceptance* accept
-			));
+				   ,       _4 // BOOL drop
+				   ,       _5 // EDragAndDropType cargo_type
+				   ,       _7 // EAcceptance* accept
+				   ));
 
 	mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action",
 								 boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2));
@@ -252,8 +253,10 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
 void LLPanelOutfitsInventory::updateListCommands()
 {
 	bool trash_enabled = isActionEnabled("delete");
+	bool wear_enabled = isActionEnabled("wear");
 
 	mListCommands->childSetEnabled("trash_btn", trash_enabled);
+	mListCommands->childSetEnabled("wear_btn", wear_enabled);
 }
 
 void LLPanelOutfitsInventory::onGearButtonClick()
@@ -308,7 +311,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
 	}
 	if (command_name == "wear")
 	{
-		onWear();
+		onWearButtonClick();
 	}
 	if (command_name == "add")
 	{
@@ -407,41 +410,41 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy
 ////////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////////
-// Accordion                                                                    //
+// Tab panels                                                                    //
 
-void LLPanelOutfitsInventory::initAccordionPanels()
+void LLPanelOutfitsInventory::initTabPanels()
 {
-	mAccordionPanels.resize(2);
+	mTabPanels.resize(2);
 	
 	LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel");
 	myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY);
 	myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-	mAccordionPanels[0] = myoutfits_panel;
+	mTabPanels[0] = myoutfits_panel;
 	mActivePanel = myoutfits_panel;
 
 	LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel");
 	cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-	mAccordionPanels[1] = cof_panel;
+	mTabPanels[1] = cof_panel;
 
-	for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
-		 iter != mAccordionPanels.end();
+	for (tabpanels_vec_t::iterator iter = mTabPanels.begin();
+		 iter != mTabPanels.end();
 		 ++iter)
 	{
 		LLInventoryPanel *panel = (*iter);
-		panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onAccordionSelectionChange, this, panel, _1, _2));
+		panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2));
 	}
 }
 
-void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
 {
 	if (user_action && items.size() > 0)
 	{
-		for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
-			 iter != mAccordionPanels.end();
+		for (tabpanels_vec_t::iterator iter = mTabPanels.begin();
+			 iter != mTabPanels.end();
 			 ++iter)
 		{
 			LLInventoryPanel *panel = (*iter);
-			if (panel == accordion_panel)
+			if (panel == tab_panel)
 			{
 				mActivePanel = panel;
 			}
@@ -459,10 +462,10 @@ LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
 	return mActivePanel;
 }
 
-bool LLPanelOutfitsInventory::isAccordionPanel(LLInventoryPanel *panel)
+bool LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel)
 {
-	for(accordionpanels_vec_t::iterator it = mAccordionPanels.begin();
-		it != mAccordionPanels.end();
+	for(tabpanels_vec_t::iterator it = mTabPanels.begin();
+		it != mTabPanels.end();
 		++it)
 	{
 		if (*it == panel)
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index afeaef485d..9b6b483e3b 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -54,7 +54,6 @@ public:
 	/*virtual*/ BOOL postBuild();
 	
 	void onSearchEdit(const std::string& string);
-	void onWear();
 	void onAdd();
 	void onRemove();
 	void onEdit();
@@ -71,29 +70,30 @@ public:
 	LLFolderView* getRootFolder();
 
 protected:
-	void updateParent();
+	void updateVerbs();
 	bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const;
 
 private:
 	LLSidepanelAppearance*      mParent;
 	LLSaveFolderState*			mSavedFolderState;
 
+
 public:
 	//////////////////////////////////////////////////////////////////////////////////
-	// Accordion                                                                    //
+	// tab panels
 	LLInventoryPanel* 	getActivePanel();
-	bool isAccordionPanel(LLInventoryPanel *panel);
+	bool isTabPanel(LLInventoryPanel *panel);
 	
 protected:
-	void 				initAccordionPanels();
-	void 				onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+	void 				initTabPanels();
+	void 				onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
 	
 private:
 	LLInventoryPanel* 	mActivePanel;
-	typedef std::vector<LLInventoryPanel *> accordionpanels_vec_t;
-	accordionpanels_vec_t 		mAccordionPanels;
+	typedef std::vector<LLInventoryPanel *> tabpanels_vec_t;
+	tabpanels_vec_t 		mTabPanels;
 
-	// Accordion                                                                  //
+	// tab panels                                                               //
 	////////////////////////////////////////////////////////////////////////////////
 	
 
@@ -103,6 +103,7 @@ protected:
 	void initListCommandsHandlers();
 	void updateListCommands();
 	void onGearButtonClick();
+	void onWearButtonClick();
 	void onAddButtonClick();
 	void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
 	void onTrashButtonClick();
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index eb3695a371..30b0075c4b 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -113,9 +113,6 @@ BOOL LLSidepanelAppearance::postBuild()
 	mEditAppearanceBtn = getChild<LLButton>("editappearance_btn");
 	mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this));
 
-	mWearBtn = getChild<LLButton>("wear_btn");
-	mWearBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onWearButtonClicked, this));
-
 	mEditBtn = getChild<LLButton>("edit_btn");
 	mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this));
 
@@ -199,14 +196,6 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)
 	}
 }
 
-void LLSidepanelAppearance::onWearButtonClicked()
-{
-	if (!mLookInfo->getVisible())
-	{
-		mPanelOutfitsInventory->onWear();
-	}
-}
-
 void LLSidepanelAppearance::onOpenOutfitButtonClicked()
 {
 	const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink();
@@ -284,7 +273,6 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible)
 	mLookInfo->setVisible(visible);
 	mPanelOutfitsInventory->setVisible(!visible);
 	mFilterEditor->setVisible(!visible);
-	mWearBtn->setVisible(!visible);
 	mEditBtn->setVisible(!visible);
 	mNewOutfitBtn->setVisible(!visible);
 	mCurrOutfitPanel->setVisible(!visible);
@@ -314,12 +302,10 @@ void LLSidepanelAppearance::updateVerbs()
 	{
 		const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL);
 		mEditBtn->setEnabled(is_correct_type);
-		mWearBtn->setEnabled(is_correct_type);
 	}
 	else
 	{
 		mEditBtn->setEnabled(FALSE);
-		mWearBtn->setEnabled(FALSE);
 	}
 }
 
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 9c870f631a..8ef2088eda 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -67,7 +67,6 @@ private:
 
 	void onOpenOutfitButtonClicked();
 	void onEditAppearanceButtonClicked();
-	void onWearButtonClicked();
 	void onEditButtonClicked();
 	void onNewOutfitButtonClicked();
 	void onBackButtonClicked();
@@ -82,7 +81,6 @@ private:
 
 	LLButton*					mOpenOutfitBtn;
 	LLButton*					mEditAppearanceBtn;
-	LLButton*					mWearBtn;
 	LLButton*					mEditBtn;
 	LLButton*					mNewOutfitBtn;
 	LLPanel*					mCurrOutfitPanel;
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index db95d01b43..ab73f135b9 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -1,61 +1,104 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="Outfits"
-       height="510"
-   width="333"
-      follows="top|left"
-             left="0"
-	     top_pad="0">
-    <accordion
-     single_expansion="true"
-     height="510"
-             layout="topleft"
-             left="0"
-      follows="top|left"
-     name="outfits_accordion"
-	     top_pad="0"
-             width="333">
-     <accordion_tab
-            expanded="false"
-            layout="topleft"
-         name="tab_cof"
-         title="Current Outfit">
-	 <inventory_panel
+
+ <panel name="Outfits"
+ background_visible="true"
+  follows="all"
+ height="550"
+ label="Things"
+ layout="topleft"
+ min_height="350"
+ min_width="240"
+ width="330"
+ border="false">
+   <tab_container
+     follows="all"
+     height="500"
+     layout="topleft"
+     left="10"
+     name="appearance_tabs"
+     tab_min_width="100"
+     tab_height="30"
+     tab_position="top"
+     halign="center"
+     width="313">
+      <inventory_panel
+        label="MY OUTFITS"
+        help_topic="my_outfits_tab"
 	    allow_multi_select="true"
+	    follows="all"
 	    border="false"
-            height="460"
-	     left="0"
-             top="0"
-		 mouse_opaque="true"
-	         name="cof_accordionpanel"
-		 start_folder="Current Outfit" />
-        </accordion_tab>
-        <accordion_tab
-            expanded="true"
-            layout="topleft"
-         name="tab_outfits"
-         title="My Outfits">
-	 <inventory_panel
-	 	 allow_multi_select="true"
-		 border="false"
-	     follows="all"
-		 left="0"
-             top="0"
-            height="460"
-		 mouse_opaque="true"
-	     name="outfitslist_accordionpanel"
-		 start_folder="My Outfits" />
-        </accordion_tab>
-	</accordion>
-	<!--<button bottom="0"
-		 halign="center"
-		 height="23"
-		 label=">"
-		 enabled="false"
-	     mouse_opaque="false"
-		 name="selector"
-		 width="20"
-		 left="0"
-		 visible="false"
-	     follows="right|bottom"
-		 tool_tip="View outfit properties" />-->
+	    left="0"
+        top="0"
+        height="500"
+        width="290"
+ 		mouse_opaque="true"
+ 	    name="outfitslist_accordionpanel"
+ 		start_folder="My Outfits" /> 
+         <inventory_panel
+        label="WEARING"
+        help_topic="now_wearing_tab"
+        allow_multi_select="true"
+        border="false"
+        height="500"
+        width="290"
+        left="0"
+        top="0"
+        mouse_opaque="true"
+        name="cof_accordionpanel"
+        start_folder="Current Outfit" />
+   </tab_container>
+	<panel
+	  background_visible="true"
+	  follows="bottom|left"
+	  height="50"
+	  layout="topleft"
+	  left="0"
+	  visible="true"
+	  name="bottom_panel"
+	  top_pad="10"
+	  width="313">
+		 <button
+		  follows="bottom|left"
+		  tool_tip="Show additional options"
+		  height="18"
+		  image_disabled="OptionsMenu_Disabled"
+		  image_selected="OptionsMenu_Press"
+		  image_unselected="OptionsMenu_Off"
+		  layout="topleft"
+		  left="10"
+		  name="options_gear_btn"
+		  top="6"
+		  width="18" />
+		 <button
+		  follows="bottom|left"
+		  height="18"
+		  image_selected="AddItem_Press"
+		  image_unselected="AddItem_Off"
+		  image_disabled="AddItem_Disabled"
+		  layout="topleft"
+		  left_pad="5"
+		  name="add_btn"
+		  tool_tip="Add new item"
+		  width="18" />
+		 <dnd_button
+		  follows="bottom|left"
+		  height="18"
+		  image_selected="TrashItem_Press"
+		  image_unselected="TrashItem_Off"
+		  layout="topleft"
+		  right="-5"
+		  name="trash_btn"
+		  tool_tip="Remove selected item"
+		  top="6"
+		  width="18" />
+	 <button
+	  follows="top|left"
+		height="23"
+		label="Wear"
+		layout="topleft"
+		name="wear_btn"
+		right="-5"
+		top_pad="0"
+		width="90" />
+	 </panel>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 3dac1a9614..27f19d44fa 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -85,72 +85,21 @@ left="0"
    class="panel_outfits_inventory"
    filename="panel_outfits_inventory.xml"
    name="panel_outfits_inventory"
-   height="510"
+   height="550"
    min_height="510"
    width="333"
    top_pad="0"
-   follows="top|left"
+   follows="all"
    />
-   <panel
-   visible="true"
-   name="bottom_panel"
-   height="50"
-   left="0"
-   top_pad="3"
-   follows="bottom|left"
-   width="333">
-      <button
-       follows="bottom|left"
-       tool_tip="Show additional options"
-       height="18"
-       image_disabled="OptionsMenu_Disabled"
-       image_selected="OptionsMenu_Press"
-       image_unselected="OptionsMenu_Off"
-       layout="topleft"
-       left="10"
-       name="options_gear_btn"
-       top="6"
-       width="18" />
-      <button
-       follows="bottom|left"
-       height="18"
-       image_selected="AddItem_Press"
-       image_unselected="AddItem_Off"
-       image_disabled="AddItem_Disabled"
-       layout="topleft"
-       left_pad="5"
-   name="newlook_btn"
-       tool_tip="Add new outfit"
-       width="18" />
-      <dnd_button
-       follows="bottom|left"
-       height="18"
-       image_selected="TrashItem_Press"
-       image_unselected="TrashItem_Off"
-       layout="topleft"
-       right="-5"
-       name="trash_btn"
-       tool_tip="Remove selected item"
-       top="6"
-       width="18" />
-      <button
-       follows="bottom|left"
-      height="23"
-      label="Wear"
-      layout="topleft"
-      name="wear_btn"
-      right="-5"
-      top_pad="0"
-      width="90" />
-   </panel>
-   <!--   <button
-   follows="bottom|left"
-   height="23"
-   label="New outfit"
-   layout="topleft"
-   left_pad="5"
-   right="-10"
-   width="100" />-->
+  <!--   <button
+	  follows="bottom|left"
+		height="23"
+		label="New outfit"
+		layout="topleft"
+		left_pad="5"
+		right="-10"
+		name="newlook_btn"
+		 width="100" />-->
    <panel
    class="panel_look_info"
    filename="panel_look_info.xml"
@@ -167,4 +116,5 @@ left="0"
    left="0"
    name="panel_edit_wearable"
    visible="false" />
-</panel>
\ No newline at end of file
+</panel>
+
-- 
cgit v1.2.3


From 38483348eed5563fde1963575758334567af15e6 Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Mon, 14 Dec 2009 15:15:08 -0800
Subject: Made LLViewerMedia::isInterestingEnough() take the performance
 manager's priority list list into account.

---
 indra/newview/llviewermedia.cpp | 35 +++++++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 7c5b360b92..1ad19db4d3 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -249,6 +249,7 @@ static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap;
 static LLTimer sMediaCreateTimer;
 static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f;
 static F32 sGlobalVolume = 1.0f;
+static F64 sLowestLoadableImplInterest = 0.0f;
 
 //////////////////////////////////////////////////////////////////////////////////////////
 static void add_media_impl(LLViewerMediaImpl* media)
@@ -562,14 +563,20 @@ bool LLViewerMedia::getInWorldMediaDisabled()
 // static
 bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest)
 {
+	bool result = false;
+	
 	if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id)
 	{
-		return true;
+		result = true;
 	}
-	else {
-		// XXX HACK
-		return object_interest > 1023;// INTEREST_THRESHHOLD;
+	else 
+	{
+		llinfos << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl;
+		if(object_interest > sLowestLoadableImplInterest)
+			result = true;
 	}
+	
+	return result;
 }
 
 LLViewerMedia::impl_list &LLViewerMedia::getPriorityList()
@@ -697,6 +704,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
 	// Setting max_cpu to 0.0 disables CPU usage checking.
 	bool check_cpu_usage = (max_cpu != 0.0f);
 	
+	LLViewerMediaImpl* lowest_interest_loadable = NULL;
+	
 	// Notes on tweakable params:
 	// max_instances must be set high enough to allow the various instances used in the UI (for the help browser, search, etc.) to be loaded.
 	// If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow.
@@ -783,6 +792,9 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
 		
 		if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED))
 		{
+			// This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest.
+			lowest_interest_loadable = pimpl;
+			
 			impl_count_total++;
 		}
 		
@@ -813,6 +825,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
 
 		total_cpu += pimpl->getCPUUsage();
 	}
+
+	// Re-calculate this every time.
+	sLowestLoadableImplInterest	= 0.0f;
+
+	if(lowest_interest_loadable)
+	{
+		// Get the interest value of this impl's object for use by isInterestingEnough
+		LLVOVolume *object = lowest_interest_loadable->getSomeObject();
+		if(object)
+		{
+			// NOTE: Don't use getMediaInterest() here.  We want the pixel area, not the total media interest,
+			// 		so that we match up with the calculation done in LLMediaDataClient.
+			sLowestLoadableImplInterest = object->getPixelArea();
+		}
+	}
 	
 	if(gSavedSettings.getBOOL("MediaPerformanceManagerDebug"))
 	{
-- 
cgit v1.2.3


From b877ed17e8d1072ca950cffab355ba4b2480cb09 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Mon, 14 Dec 2009 15:41:09 -0800
Subject: DEV-42327: Compute controls position & size for HUD objects Review
 #62 Added facility to get the HUD projection and modelview matrices by
 refactoring the calls in llviewerdisplay a bit.

---
 indra/newview/llpanelprimmediacontrols.cpp | 32 ++++++++++----
 indra/newview/llviewerdisplay.cpp          | 70 +++++++++++++++++++-----------
 2 files changed, 69 insertions(+), 33 deletions(-)

diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 3fe51106e4..7b2ac38568 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -57,6 +57,7 @@
 #include "llsliderctrl.h"
 #include "llstring.h"
 #include "llviewercontrol.h"
+#include "llviewerdisplay.h"
 #include "llviewerparcelmgr.h"
 #include "llviewermedia.h"
 #include "llviewermediafocus.h"
@@ -66,8 +67,11 @@
 
 #include "llfloatertools.h"  // to enable hide if build tools are up
 
+// Functions pulled from pipeline.cpp
 glh::matrix4f glh_get_current_modelview();
 glh::matrix4f glh_get_current_projection();
+// Functions pulled from llviewerdisplay.cpp
+bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model);
 
 // Warning: make sure these two match!
 const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM };
@@ -564,9 +568,6 @@ void LLPanelPrimMediaControls::updateShape()
 		//
 		// Calculate position and shape of the controls
 		//
-		LLVector3 min, max;
-
-		glh::matrix4f mat = glh_get_current_projection()*glh_get_current_modelview();
 		std::vector<LLVector3>::iterator vert_it;
 		std::vector<LLVector3>::iterator vert_end;
 		std::vector<LLVector3> vect_face;
@@ -603,8 +604,18 @@ void LLPanelPrimMediaControls::updateShape()
 		vert_it = vect_face.begin();
 		vert_end = vect_face.end();
 		
-		min = LLVector3(1,1,1);
-		max = LLVector3(-1,-1,-1);
+		glh::matrix4f mat;
+		if (!is_hud) 
+		{
+			mat = glh_get_current_projection() * glh_get_current_modelview();
+		}
+		else {
+			glh::matrix4f proj, modelview;
+			if (get_hud_matrices(proj, modelview))
+				mat = proj * modelview;
+		}
+		LLVector3 min = LLVector3(1,1,1);
+		LLVector3 max = LLVector3(-1,-1,-1);
 		for(; vert_it != vert_end; ++vert_it)
 		{
 			// project silhouette vertices into screen space
@@ -633,10 +644,15 @@ void LLPanelPrimMediaControls::updateShape()
 		media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight;
 		
 		// keep all parts of HUD on-screen
-		media_controls_rect.intersectWith(getParent()->getLocalRect());
+		LLRect window_rect = getParent()->getLocalRect();
+		media_controls_rect.intersectWith(window_rect);
 		
-		// clamp to minimum size, keeping centered
-		media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(),
+		// clamp to minimum size, keeping rect inside window
+		S32 centerX = media_controls_rect.getCenterX();
+		S32 centerY = media_controls_rect.getCenterY();
+		window_rect.stretch(-mMinWidth/2, -mMinHeight/2);
+		window_rect.clampPointToRect(centerX, centerY);
+		media_controls_rect.setCenterAndSize(centerX, centerY,
 											 llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight()));
 		
 		setShape(media_controls_rect, true);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 5b733ed817..68a5147bc7 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1009,10 +1009,10 @@ void render_hud_attachments()
 	glh_set_current_modelview(current_mod);
 }
 
-BOOL setup_hud_matrices()
+LLRect get_whole_screen_region()
 {
 	LLRect whole_screen = gViewerWindow->getWindowRectScaled();
-
+	
 	// apply camera zoom transform (for high res screenshots)
 	F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor();
 	S16 sub_region = LLViewerCamera::getInstance()->getZoomSubRegion();
@@ -1024,52 +1024,43 @@ BOOL setup_hud_matrices()
 		int tile_y = sub_region / num_horizontal_tiles;
 		int tile_x = sub_region - (tile_y * num_horizontal_tiles);
 		glh::matrix4f mat;
-
+		
 		whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWindowHeightScaled() - (tile_y * tile_height), tile_width, tile_height);
 	}
-
-	return setup_hud_matrices(whole_screen);
+	return whole_screen;
 }
 
-BOOL setup_hud_matrices(const LLRect& screen_region)
+bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model)
 {
 	LLVOAvatar* my_avatarp = gAgent.getAvatarObject();
 	if (my_avatarp && my_avatarp->hasHUDAttachment())
 	{
 		F32 zoom_level = gAgent.mHUDCurZoom;
 		LLBBox hud_bbox = my_avatarp->getHUDBBox();
-
-		// set up transform to keep HUD objects in front of camera
-		glMatrixMode(GL_PROJECTION);
+		
 		F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
-		glh::matrix4f proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
+		proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
 		proj.element(2,2) = -0.01f;
-
+		
 		F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect();
-
+		
 		glh::matrix4f mat;
 		F32 scale_x = (F32)gViewerWindow->getWindowWidthScaled() / (F32)screen_region.getWidth();
 		F32 scale_y = (F32)gViewerWindow->getWindowHeightScaled() / (F32)screen_region.getHeight();
 		mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f));
 		mat.set_translate(
 			glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWindowWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio),
-						clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y),
-						0.f));
+					   clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y),
+					   0.f));
 		proj *= mat;
-
-		glLoadMatrixf(proj.m);
-		glh_set_current_projection(proj);
-
-		glMatrixMode(GL_MODELVIEW);
-		glh::matrix4f model((GLfloat*) OGL_TO_CFR_ROTATION);
+		
+		glh::matrix4f tmp_model((GLfloat*) OGL_TO_CFR_ROTATION);
 		
 		mat.set_scale(glh::vec3f(zoom_level, zoom_level, zoom_level));
 		mat.set_translate(glh::vec3f(-hud_bbox.getCenterLocal().mV[VX] + (hud_depth * 0.5f), 0.f, 0.f));
-
-		model *= mat;
-		glLoadMatrixf(model.m);
-		glh_set_current_modelview(model);
-
+		
+		tmp_model *= mat;
+		model = tmp_model;		
 		return TRUE;
 	}
 	else
@@ -1078,6 +1069,35 @@ BOOL setup_hud_matrices(const LLRect& screen_region)
 	}
 }
 
+bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model)
+{
+	LLRect whole_screen = get_whole_screen_region();
+	return get_hud_matrices(whole_screen, proj, model);
+}
+
+BOOL setup_hud_matrices()
+{
+	LLRect whole_screen = get_whole_screen_region();
+	return setup_hud_matrices(whole_screen);
+}
+
+BOOL setup_hud_matrices(const LLRect& screen_region)
+{
+	glh::matrix4f proj, model;
+	bool result = get_hud_matrices(screen_region, proj, model);
+	if (!result) return result;
+	
+	// set up transform to keep HUD objects in front of camera
+	glMatrixMode(GL_PROJECTION);
+	glLoadMatrixf(proj.m);
+	glh_set_current_projection(proj);
+	
+	glMatrixMode(GL_MODELVIEW);
+	glLoadMatrixf(model.m);
+	glh_set_current_modelview(model);
+	return TRUE;
+}
+
 static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
 
 void render_ui(F32 zoom_factor, int subfield)
-- 
cgit v1.2.3


From 7a7562724d43c235ee0c38534485dd144088ac0b Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Mon, 14 Dec 2009 15:47:57 -0800
Subject: follow-up from my last change

---
 indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b4f72a48bc..5a032c6815 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,7 +9,7 @@
 	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_width">300</string>
   <string name="min_height">120</string>
   <string name="zoom_near_padding">1.0</string>
   <string name="zoom_medium_padding">1.25</string>
-- 
cgit v1.2.3


From 909a16e5200462285813abfa293a8001c684093a Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Mon, 14 Dec 2009 16:22:37 -0800
Subject: DEV-43913: tweak positions of play & pause so they look like they are
 the same button

---
 indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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 5a032c6815..bffb28d16e 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
@@ -190,7 +190,7 @@
 		layout="topleft"
 		top="14"
 		min_width="22"
-		width="22">
+		width="24">
 	  <button
 		  image_overlay="Play_Off"
 		  image_disabled="PushButton_Disabled"
@@ -200,6 +200,8 @@
 		  hover_glow_amount="0.15"
 		  layout="topleft"
 		  tool_tip = "Play media"
+		  left_delta="2"
+		  top="4"
 		  height="22"
 		  min_width="22"
 		  width="22">
@@ -214,7 +216,7 @@
 		layout="topleft"
 		top="18"
 		min_width="22"
-		width="22">
+		width="24">
 	  <button
 		  image_overlay="Pause_Off"
 		  image_disabled="PushButton_Disabled"
@@ -224,6 +226,9 @@
 		  hover_glow_amount="0.15"
 		  layout="topleft"
 		  height="22"
+		  width="22"
+		  left_delta="-1"
+		  top="4"
 		  tool_tip = "Pause media">
 		<button.commit_callback
 			function="MediaCtrl.Pause" />
-- 
cgit v1.2.3


From 3db7dd4541b4fe5ff3a66cf1c571f1fe71e01baf Mon Sep 17 00:00:00 2001
From: Ramzi Linden <ramzi@lindenlab.com>
Date: Mon, 14 Dec 2009 16:33:47 -0800
Subject: L10N: used consistent terms between Pref > Advanced and
 floater_select_key !

---
 indra/newview/skins/default/xui/en/floater_select_key.xml         | 2 +-
 indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_select_key.xml b/indra/newview/skins/default/xui/en/floater_select_key.xml
index 6050aede79..93aa1f0e31 100644
--- a/indra/newview/skins/default/xui/en/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/en/floater_select_key.xml
@@ -21,7 +21,7 @@
      word_wrap="true"
      width="220">
         Press a key to set your
-Speak button toggle
+Speak button trigger.
     </text>
     <button
      height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 78b90eefcc..405ff02836 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -284,7 +284,7 @@ Avatars:
      enabled_control="EnableVoiceChat"
      control_name="PushToTalkToggle"
      height="20"
-     label="Toggle mode for microphone when I press the speak trigger key:"
+     label="Toggle mode for microphone when I press the Speak trigger key:"
      layout="topleft"
      left="30"
      name="push_to_talk_toggle_check"
-- 
cgit v1.2.3


From e8c150b6b1a8f78e10d8a1d7e74306ed55e713d0 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 14 Dec 2009 16:34:20 -0800
Subject: Yet again more fixups for compile errors after the last merge...

---
 indra/newview/tests/llcapabilitylistener_test.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
index 4759c7dc91..ca7d02fc68 100644
--- a/indra/newview/tests/llcapabilitylistener_test.cpp
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -50,6 +50,7 @@
 #include "tests/networkio.h"
 #include "tests/commtest.h"
 #include "tests/wrapllerrs.h"
+#include "message.h"
 #include "stringize.h"
 
 #if defined(LL_WINDOWS)
-- 
cgit v1.2.3


From 2078125f9a251fd8084f7f6dcabf2263b7a98a2e Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Mon, 14 Dec 2009 16:44:22 -0800
Subject: Only do the "lowest interest loadable" calculation if we've already
 hit the PluginInstancesTotal cap.  Otherwise, we always need to load the top
 media data item.

---
 indra/newview/llviewermedia.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1ad19db4d3..367c0c8343 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -829,7 +829,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
 	// Re-calculate this every time.
 	sLowestLoadableImplInterest	= 0.0f;
 
-	if(lowest_interest_loadable)
+	// Only do this calculation if we've hit the impl count limit -- up until that point we always need to load media data.
+	if(lowest_interest_loadable && (impl_count_total >= (int)max_instances))
 	{
 		// Get the interest value of this impl's object for use by isInterestingEnough
 		LLVOVolume *object = lowest_interest_loadable->getSomeObject();
-- 
cgit v1.2.3


From c2f7e88fead56eeee6ad28351d155bd65cb3dd7f Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Mon, 14 Dec 2009 17:27:46 -0800
Subject: DEV-43872: Change Home URL and Current URL to Home Page and Current
 Page

---
 indra/newview/skins/default/xui/en/floater_about_land.xml      |  4 ++--
 indra/newview/skins/default/xui/en/floater_media_browser.xml   |  2 +-
 .../skins/default/xui/en/panel_media_settings_general.xml      | 10 +++++-----
 .../skins/default/xui/en/panel_media_settings_security.xml     |  4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 10b72144e7..1239152c32 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1561,7 +1561,7 @@ Only large parcels can be listed in search.
              left="10"
              name="at URL:"
              width="100">
-                Home URL:
+                Home Page:
             </text>
             <line_editor
              follows="left|top"
@@ -1590,7 +1590,7 @@ Only large parcels can be listed in search.
              left="10"
              name="CurrentURL:"
              width="100">
-                Current URL:
+                Current Page:
             </text>
              <button
      follows="top|right"
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index d6b20c8015..4b280ac59f 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -171,7 +171,7 @@
              enabled="false"
              follows="left|top"
              height="20"
-             label="Send Current URL to Parcel"
+             label="Send Current Page to Parcel"
              layout="topleft"
              left="0"
              name="assign"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index c8ec515e6d..5217ab3571 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -17,7 +17,7 @@
    height="15"
    left="10"
    name="home_label">
-    Home URL:
+    Home Page:
   </text>
   <text
    visible="false" 
@@ -27,7 +27,7 @@
    left_delta="64"
    text_color="red"
    name="home_fails_whitelist_label">
-    (This URL does not pass the specified whitelist)
+    (This page does not pass the specified whitelist)
   </text>
   <line_editor 
    bottom_delta="-24" 
@@ -37,7 +37,7 @@
    height="20" 
    left="10" 
    name="home_url"
-   tool_tip="The home URL for this media source"
+   tool_tip="The home page for this media source"
    width="340"> 
     <!--  <line_editor.commit_callback
 	     function="Media.CommitHomeURL"/> -->
@@ -69,7 +69,7 @@
    height="15" 
    left="10" 
    name="current_url_label">
-    Current URL:
+    Current Page:
   </text>
   <text 
    bottom_delta="-20" 
@@ -79,7 +79,7 @@
    height="20" 
    left="10" 
    name="current_url"
-   tool_tip="The current URL for this media source"
+   tool_tip="The current page for this media source"
    value="" 
    width="340" />
   <button 
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
index 6e82713f06..1f41a0d284 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
@@ -48,7 +48,7 @@
    bottom_delta="0"
    text_color="0.4 0.4 0.4 1.0" 
    name="home_url_fails_some_items_in_whitelist">
-    Entries that the home URL fails against are marked:
+    Entries that the home page fails against are marked:
   </text>
   <button 
    bottom_delta="-36" 
@@ -82,7 +82,7 @@
    left="30"
    text_color="0.6 0.0 0.0 1.0"
    name="home_url_fails_whitelist">
-Warning: the home URL specified in the General tab 
+Warning: the home page specified in the General tab 
 fails to pass this whitelist. It has been disabled 
 until a valid entry has been added.
   </text>
-- 
cgit v1.2.3


From c0eb697a53b22e266fa5437edde59395afcd2c7b Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Mon, 14 Dec 2009 17:39:24 -0800
Subject: Change LLViewerMedia::isInterestingEnough() to also check selection

If the object is in the selection, its interesting.  Load its media data
ASAP.

Conceptually reviewed by monroe
---
 indra/newview/llviewermedia.cpp | 15 +++++++++++++--
 indra/newview/llviewermedia.h   |  2 +-
 indra/newview/llvovolume.cpp    |  2 +-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 367c0c8343..103a70e032 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -561,11 +561,22 @@ bool LLViewerMedia::getInWorldMediaDisabled()
 
 //////////////////////////////////////////////////////////////////////////////////////////
 // static
-bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest)
+bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest)
 {
 	bool result = false;
 	
-	if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id)
+	if (NULL == object)
+	{
+		result = false;
+	}
+	// Focused?  Then it is interesting!
+	else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID())
+	{
+		result = true;
+	}
+	// Selected?  Then it is interesting!
+	// XXX Sadly, 'contains()' doesn't take a const :(
+	else if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(object)))
 	{
 		result = true;
 	}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 26b822aba6..7151186089 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -112,7 +112,7 @@ class LLViewerMedia
 		static void setInWorldMediaDisabled(bool disabled);
 		static bool getInWorldMediaDisabled();
 				
-		static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest);
+		static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest);
 	
 		// Returns the priority-sorted list of all media impls.
 		static impl_list &getPriorityList();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 801bd90423..d24edacd13 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -139,7 +139,7 @@ public:
 		}
 	virtual bool isInterestingEnough() const
 		{
-			return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest());
+			return LLViewerMedia::isInterestingEnough(mObject, getMediaInterest());
 		}
 
 	virtual std::string getCapabilityUrl(const std::string &name) const
-- 
cgit v1.2.3


From 929490262684270103427ad47cffece5a17f248a Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Tue, 15 Dec 2009 08:35:26 +0200
Subject: Fixed normal bug EXT - 3288 (Tool-tips are missing on whole Places
 panel)

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/panel_places.xml           | 2 ++
 indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 88df529ec1..07f9095640 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -77,6 +77,7 @@ background_visible="true"
          layout="topleft"
          left="5"
          name="teleport_btn"
+         tool_tip="Teleport to the selected area"
          top="0"
          width="100" />
         <button
@@ -86,6 +87,7 @@ background_visible="true"
          layout="topleft"
          left_pad="5"
          name="map_btn"
+         tool_tip="Show selected area on the map"
          top="0"
          width="70" />
         <button
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
index 32fc9fce01..06da64533b 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
@@ -151,7 +151,7 @@
         <button
          follows="bottom|left"
          font="SansSerifBigBold"
-         tool_tip=""
+         tool_tip="Show additional optioins"
          height="18"
          image_disabled="OptionsMenu_Disabled"
          image_selected="OptionsMenu_Press"
-- 
cgit v1.2.3


From f8f1252d32824d99e6f51fd1ea9789c1097f44de Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Tue, 15 Dec 2009 09:55:00 +0200
Subject: =?UTF-8?q?mplemented=20EXT-3396=20=E2=80=9CAll=20bottom=20bar=20b?=
 =?UTF-8?q?uttons,=20including=20chiclets=20and=20nearby=20chat,=20should?=
 =?UTF-8?q?=20work=20as=20toggles=E2=80=9D,=20made=20hide/unhide=20dockabl?=
 =?UTF-8?q?e=20floaters=20when=20undocked;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/llui/lldockablefloater.cpp | 11 +++++++++--
 indra/newview/llimfloater.cpp    |  2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 9c69e4f2b6..63faf44f9d 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -98,8 +98,15 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname)
 	else if (instance != NULL)
 	{
 		instance->setMinimized(FALSE);
-		instance->setVisible(TRUE);
-		gFloaterView->bringToFront(instance);
+		if (instance->getVisible())
+		{
+			instance->setVisible(FALSE);
+		}
+		else
+		{
+			instance->setVisible(TRUE);
+			gFloaterView->bringToFront(instance);
+		}
 	}
 }
 
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 22d5b47ae4..7dc21e6e23 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -469,7 +469,7 @@ bool LLIMFloater::toggle(const LLUUID& session_id)
 	if(!isChatMultiTab())
 	{
 		LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id);
-		if (floater && floater->getVisible() && floater->isDocked())
+		if (floater && floater->getVisible())
 		{
 			// clicking on chiclet to close floater just hides it to maintain existing
 			// scroll/text entry state
-- 
cgit v1.2.3


From c157c1176a570ab61978063dcc8d0ce3fe31483d Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Tue, 15 Dec 2009 10:54:37 +0200
Subject: Update for normal task EXT-3089 - Notification toasts positioning,
 layering and stacking. Docked LLDialogs are part of toasts positioning rules.

--HG--
branch : product-engine
---
 indra/newview/llscreenchannel.cpp | 8 ++++++--
 indra/newview/llscriptfloater.cpp | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 78cc7c54dc..bd256ec9c2 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -815,14 +815,18 @@ void LLScreenChannel::updateShowToastsState()
 	}
 
 	// for Message Well floater showed in a docked state - adjust channel's height
-	if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater))
+	if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater)
+		|| dynamic_cast<LLScriptFloater*>(floater))
 	{
 		S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
 		LLRect this_rect = getRect();
 		if(floater->getVisible() && floater->isDocked())
 		{
 			channel_bottom += floater->getRect().getHeight();
-			channel_bottom += floater->getDockControl()->getTongueHeight();
+			if(floater->getDockControl())
+			{
+				channel_bottom += floater->getDockControl()->getTongueHeight();
+			}
 		}
 
 		if(channel_bottom != this_rect.mBottom)
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 9884aec2e3..1962d871a6 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -209,6 +209,7 @@ void LLScriptFloater::hideToastsIfNeeded()
 	if(channel)
 	{
 		channel->updateShowToastsState();
+		channel->redrawToasts();
 	}
 }
 
-- 
cgit v1.2.3


From d82f82d7965ec9360cb49ec7e6c1c2f984d4539b Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Tue, 15 Dec 2009 11:11:28 +0000
Subject: EXT-3394: Reverting removal of prefs volume slider.

This change reverts the code parts of e038c0211968 that relate to the
sound preferences slider. Lis has already re-enabled the slider in the
panel_preferences_sound.xml XUI file.

So the overall change for EXT-3394 is now:
- remove the volume slider from the Voice Controls panel
- make 50 be the default volume level, not 62
---
 indra/newview/llfloatervoicedevicesettings.cpp | 32 ++++++++++++++++++++++++--
 indra/newview/llfloatervoicedevicesettings.h   |  1 +
 indra/newview/llvoiceclient.h                  |  2 +-
 3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 3951f4291f..43024a4bd0 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -40,6 +40,7 @@
 #include "llcombobox.h"
 #include "llfocusmgr.h"
 #include "lliconctrl.h"
+#include "llsliderctrl.h"
 #include "llviewercontrol.h"
 #include "llvoiceclient.h"
 #include "llvoicechannel.h"
@@ -60,6 +61,9 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
 	mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
 	mDevicesUpdated = FALSE;
 
+	// grab "live" mic volume level
+	mMicVolume = gSavedSettings.getF32("AudioLevelMic");
+
 	// ask for new device enumeration
 	// now do this in onOpen() instead...
 	//gVoiceClient->refreshDeviceLists();
@@ -71,6 +75,10 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings()
 
 BOOL LLPanelVoiceDeviceSettings::postBuild()
 {
+	LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
+	// set mic volume tuning slider based on last mic volume setting
+	volume_slider->setValue(mMicVolume);
+
 	childSetCommitCallback("voice_input_device", onCommitInputDevice, this);
 	childSetCommitCallback("voice_output_device", onCommitOutputDevice, this);
 	
@@ -149,6 +157,15 @@ void LLPanelVoiceDeviceSettings::apply()
 		gSavedSettings.setString("VoiceOutputAudioDevice", s);
 		mOutputDevice = s;
 	}
+
+	// assume we are being destroyed by closing our embedding window
+	LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
+	if(volume_slider)
+	{
+		F32 slider_value = (F32)volume_slider->getValue().asReal();
+		gSavedSettings.setF32("AudioLevelMic", slider_value);
+		mMicVolume = slider_value;
+	}
 }
 
 void LLPanelVoiceDeviceSettings::cancel()
@@ -161,12 +178,22 @@ void LLPanelVoiceDeviceSettings::cancel()
 
 	if(mCtrlOutputDevices)
 		mCtrlOutputDevices->setSimple(mOutputDevice);
+
+	gSavedSettings.setF32("AudioLevelMic", mMicVolume);
+	LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
+	if(volume_slider)
+	{
+		volume_slider->setValue(mMicVolume);
+	}
 }
 
 void LLPanelVoiceDeviceSettings::refresh()
 {
-	// update the live input level display
-	gVoiceClient->tuningSetMicVolume();
+	//grab current volume
+	LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
+	// set mic volume tuning slider based on last mic volume setting
+	F32 current_volume = (F32)volume_slider->getValue().asReal();
+	gVoiceClient->tuningSetMicVolume(current_volume);
 
 	// Fill in popup menus
 	mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
@@ -236,6 +263,7 @@ void LLPanelVoiceDeviceSettings::initialize()
 {
 	mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
 	mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
+	mMicVolume = gSavedSettings.getF32("AudioLevelMic");
 	mDevicesUpdated = FALSE;
 
 	// ask for new device enumeration
diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h
index 20958af780..d67283d0a2 100644
--- a/indra/newview/llfloatervoicedevicesettings.h
+++ b/indra/newview/llfloatervoicedevicesettings.h
@@ -56,6 +56,7 @@ protected:
 	static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data);
 	static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data);
 
+	F32 mMicVolume;
 	std::string mInputDevice;
 	std::string mOutputDevice;
 	class LLComboBox		*mCtrlInputDevices;
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 92e79a004d..edfe0173f8 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -125,7 +125,7 @@ class LLVoiceClient: public LLSingleton<LLVoiceClient>
 		void tuningCaptureStartSendMessage(int duration);
 		void tuningCaptureStopSendMessage();
 		
-		void tuningSetMicVolume(float volume=0.5f);
+		void tuningSetMicVolume(float volume);
 		void tuningSetSpeakerVolume(float volume);
 		float tuningGetEnergy(void);
 				
-- 
cgit v1.2.3


From 50792b7c2a2fffd8d6fb99c1f5148e9881f0101d Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Tue, 15 Dec 2009 13:22:09 +0200
Subject: fix for normal EXT-3252 IM well closes if the lower IM session has
 been closed

--HG--
branch : product-engine
---
 indra/newview/llsyswellwindow.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 1ebf624eeb..c269e0b47e 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -752,6 +752,13 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter,
 //---------------------------------------------------------------------------------
 void LLIMWellWindow::delIMRow(const LLUUID& sessionId)
 {
+	//fix for EXT-3252
+	//without this line LLIMWellWindow receive onFocusLost
+	//and hide itself. It was becaue somehow LLIMChicklet was in focus group for
+	//LLIMWellWindow...
+	//But I didn't find why this happen..
+	gFocusMgr.clearLastFocusForGroup(this);
+
 	if (mMessageList->removeItemByValue(sessionId))
 	{
 		handleItemRemoved(IT_INSTANT_MESSAGE);
@@ -771,6 +778,10 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId)
 	{
 		setVisible(FALSE);
 	}
+	else
+	{
+		setFocus(true);
+	}
 }
 
 void LLIMWellWindow::addObjectRow(const LLUUID& object_id, bool new_message/* = false*/)
-- 
cgit v1.2.3


From fe56e4fbfb57e24b83ed644e8b3843abd409ed75 Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Tue, 15 Dec 2009 14:28:51 +0200
Subject: fix for bug EXT-3254 IM well expands unexpectedly after attempt to
 resize problem was with floater minHeight. set minheight to 1 list item
 height (so 1 item is always visible)

--HG--
branch : product-engine
---
 indra/newview/llsyswellwindow.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index c269e0b47e..ca7cb0f59f 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -246,6 +246,24 @@ void LLSysWellWindow::handleItemAdded(EItemType added_item_type)
 		// refresh list to recalculate mSeparator position
 		mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight());
 	}
+
+	//fix for EXT-3254
+	//set limits for min_height. 
+	S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight();
+
+	std::vector<LLPanel*> items;
+	mMessageList->getItems(items);
+
+	if(items.size()>1)//first item is separator
+	{
+		S32 min_height;
+		S32 min_width;
+		getResizeLimits(&min_width,&min_height);
+
+		min_height = items[1]->getRect().getHeight() + 2 * mMessageList->getBorderWidth() + parent_list_delta_height;
+
+		setResizeLimits(min_width,min_height);
+	}
 }
 
 void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type)
-- 
cgit v1.2.3


From 40fa0368919da7b4f3c105c6bdf3a497ac29c360 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Tue, 15 Dec 2009 16:18:26 +0200
Subject: Fix for normal bug EXT-3465 - Any changes made in Preferences floater
 are canceled after viewer shutdown.

--HG--
branch : product-engine
---
 indra/newview/llfloaterpreference.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ab27375b87..a333868b8c 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -588,6 +588,9 @@ void LLFloaterPreference::onOpen(const LLSD& key)
 	// when the floater is opened.  That will make cancel do its
 	// job
 	saveSettings();
+
+	// This is a "fresh" floater, closing floater shoud cancel any changes
+	mCancelOnClose = true;
 }
 
 void LLFloaterPreference::onVertexShaderEnable()
@@ -633,7 +636,11 @@ void LLFloaterPreference::onBtnOK()
 		// that prevents cancel from undoing our changes when we hit OK
 		mCancelOnClose = false;
 		closeFloater(false);
-		mCancelOnClose = true;
+
+		// closeFloater() will be called when viewer is quitting, leaving mCancelOnClose = true;
+		// will cancel all changes we saved here, don't let this happen.
+		// Fix for EXT-3465
+
 		gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
 		LLUIColorTable::instance().saveUserSettings();
 		std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
-- 
cgit v1.2.3


From 08477892228084d955f498f170578a7d1e3c6ddc Mon Sep 17 00:00:00 2001
From: Sergei Litovchuk <slitovchuk@productengine.com>
Date: Tue, 15 Dec 2009 18:36:53 +0200
Subject: Fixed normal bug EXT-3409 "Places panel: pick for remote location
 created with current agent's coordinates". - Fixed storing global position
 for remote location pick. - Fixed setting current location to the pick. -
 Fixed pick location text. Added resolving remote parcel name from ID. -
 Cleaned up unused code in llpanelpick.

--HG--
branch : product-engine
---
 indra/newview/llpanelpick.cpp      | 86 +++++++++++++++++++++++---------------
 indra/newview/llpanelpick.h        | 12 ++++--
 indra/newview/llpanelplaceinfo.cpp | 13 +++---
 indra/newview/llpanelplaceinfo.h   |  1 +
 4 files changed, 67 insertions(+), 45 deletions(-)

diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 541361324a..839452d061 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -91,12 +91,19 @@ LLPanelPickInfo::LLPanelPickInfo()
  , mAvatarId(LLUUID::null)
  , mSnapshotCtrl(NULL)
  , mPickId(LLUUID::null)
+ , mParcelId(LLUUID::null)
+ , mRequestedId(LLUUID::null)
 {
 }
 
 LLPanelPickInfo::~LLPanelPickInfo()
 {
 	LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+
+	if (mParcelId.notNull())
+	{
+		LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this);
+	}
 }
 
 void LLPanelPickInfo::onOpen(const LLSD& key)
@@ -156,12 +163,14 @@ void LLPanelPickInfo::processProperties(void* data, EAvatarProcessorType type)
 		return;
 	}
 
+	mParcelId = pick_info->parcel_id;
 	setSnapshotId(pick_info->snapshot_id);
 	setPickName(pick_info->name);
 	setPickDesc(pick_info->desc);
 	setPosGlobal(pick_info->pos_global);
-	setPickLocation(createLocationText(pick_info->user_name, pick_info->original_name, 
-		pick_info->sim_name, pick_info->pos_global));
+
+	// Send remote parcel info request to get parcel name and sim (region) name.
+	sendParcelInfoRequest();
 
 	// *NOTE dzaporozhan
 	// We want to keep listening to APT_PICK_INFO because user may 
@@ -169,6 +178,17 @@ void LLPanelPickInfo::processProperties(void* data, EAvatarProcessorType type)
 	// revomeObserver is called from onClickBack
 }
 
+void LLPanelPickInfo::sendParcelInfoRequest()
+{
+	if (mParcelId != mRequestedId)
+	{
+		LLRemoteParcelInfoProcessor::getInstance()->addObserver(mParcelId, this);
+		LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(mParcelId);
+
+		mRequestedId = mParcelId;
+	}
+}
+
 void LLPanelPickInfo::setExitCallback(const commit_callback_t& cb)
 {
 	getChild<LLButton>("back_btn")->setClickedCallback(cb);
@@ -176,21 +196,16 @@ void LLPanelPickInfo::setExitCallback(const commit_callback_t& cb)
 
 void LLPanelPickInfo::processParcelInfo(const LLParcelData& parcel_data)
 {
-	// HACK: Flag 0x2 == adult region,
-	// Flag 0x1 == mature region, otherwise assume PG
-	std::string rating_icon = "icon_event.tga";
-	if (parcel_data.flags & 0x2)
-	{
-		rating_icon = "icon_event_adult.tga";
-	}
-	else if (parcel_data.flags & 0x1)
-	{
-		rating_icon = "icon_event_mature.tga";
-	}
+	setPickLocation(createLocationText(LLStringUtil::null, parcel_data.name,
+		parcel_data.sim_name, getPosGlobal()));
 
-	childSetValue("maturity", rating_icon);
+	// We have received parcel info for the requested ID so clear it now.
+	mRequestedId.setNull();
 
-	//*NOTE we don't removeObserver(...) ourselves cause LLRemoveParcelProcessor does it for us
+	if (mParcelId.notNull())
+	{
+		LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this);
+	}
 }
 
 void LLPanelPickInfo::setEditPickCallback(const commit_callback_t& cb)
@@ -222,7 +237,8 @@ void LLPanelPickInfo::resetData()
 	setPickId(LLUUID::null);
 	setSnapshotId(LLUUID::null);
 	mPosGlobal.clearVec();
-	childSetValue("maturity", LLStringUtil::null);
+	mParcelId.setNull();
+	mRequestedId.setNull();
 }
 
 // static
@@ -273,9 +289,6 @@ void LLPanelPickInfo::setPickDesc(const std::string& desc)
 void LLPanelPickInfo::setPickLocation(const std::string& location)
 {
 	childSetValue(XML_LOCATION, location);
-
-	//preserving non-wrapped text for info/edit modes switching
-	mLocation = location;
 }
 
 void LLPanelPickInfo::onClickMap()
@@ -340,7 +353,7 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
 		setPosGlobal(gAgent.getPositionGlobal());
 
 		LLUUID parcel_id = LLUUID::null, snapshot_id = LLUUID::null;
-		std::string pick_name, pick_desc;
+		std::string pick_name, pick_desc, region_name;
 
 		LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
 		if(parcel)
@@ -351,21 +364,17 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
 			snapshot_id = parcel->getSnapshotID();
 		}
 
-		if(pick_name.empty())
+		LLViewerRegion* region = gAgent.getRegion();
+		if(region)
 		{
-			LLViewerRegion* region = gAgent.getRegion();
-			if(region)
-			{
-				pick_name = region->getName();
-			}
+			region_name = region->getName();
 		}
 
 		setParcelID(parcel_id);
-		childSetValue("pick_name", pick_name);
+		childSetValue("pick_name", pick_name.empty() ? region_name : pick_name);
 		childSetValue("pick_desc", pick_desc);
 		setSnapshotId(snapshot_id);
-		setPickLocation(createLocationText(LLStringUtil::null, SET_LOCATION_NOTICE, 
-			pick_name, getPosGlobal()));
+		setPickLocation(createLocationText(SET_LOCATION_NOTICE, pick_name, region_name, getPosGlobal()));
 
 		enableSaveButton(true);
 	}
@@ -394,8 +403,9 @@ void LLPanelPickEdit::setPickData(const LLPickData* pick_data)
 	childSetValue("pick_name", pick_data->name);
 	childSetValue("pick_desc", pick_data->desc);
 	setSnapshotId(pick_data->snapshot_id);
-	setPickLocation(createLocationText(pick_data->user_name, pick_data->original_name, /*pick_data->sim_name,*/ 
-		pick_data->name, pick_data->pos_global));
+	setPosGlobal(pick_data->pos_global);
+	setPickLocation(createLocationText(LLStringUtil::null, pick_data->name,
+			pick_data->sim_name, pick_data->pos_global));
 }
 
 BOOL LLPanelPickEdit::postBuild()
@@ -519,14 +529,22 @@ void LLPanelPickEdit::onClickSetLocation()
 	// Save location for later use.
 	setPosGlobal(gAgent.getPositionGlobal());
 
+	std::string parcel_name, region_name;
+
 	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
 	if (parcel)
 	{
 		mParcelId = parcel->getID();
-		mSimName = parcel->getName();
+		parcel_name = parcel->getName();
 	}
-	setPickLocation(createLocationText(
-		LLStringUtil::null, SET_LOCATION_NOTICE, mSimName, getPosGlobal()));
+
+	LLViewerRegion* region = gAgent.getRegion();
+	if(region)
+	{
+		region_name = region->getName();
+	}
+
+	setPickLocation(createLocationText(SET_LOCATION_NOTICE, parcel_name, region_name, getPosGlobal()));
 
 	mLocationChanged = true;
 	enableSaveButton(TRUE);
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index 2c0830f2ac..95add387d0 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -71,6 +71,11 @@ public:
 
 	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
 
+	/**
+	 * Sends remote parcel info request to resolve parcel name from its ID.
+	 */
+	void sendParcelInfoRequest();
+
 	/**
 	 * Sets "Back" button click callback
 	 */
@@ -81,9 +86,9 @@ public:
 	 */
 	virtual void setEditPickCallback(const commit_callback_t& cb);
 
-	//This stuff we got from LLRemoteParcelObserver, in the last two we intentionally do nothing
+	//This stuff we got from LLRemoteParcelObserver, in the last one we intentionally do nothing
 	/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
-	/*virtual*/ void setParcelID(const LLUUID& parcel_id) {};
+	/*virtual*/ void setParcelID(const LLUUID& parcel_id) { mParcelId = parcel_id; }
 	/*virtual*/ void setErrorStatus(U32 status, const std::string& reason) {};
 
 protected:
@@ -154,8 +159,7 @@ protected:
 	LLVector3d mPosGlobal;
 	LLUUID mParcelId;
 	LLUUID mPickId;
-	std::string mSimName;
-	std::string mLocation;
+	LLUUID mRequestedId;
 };
 
 /**
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index b845f38ace..b80eb9db38 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -233,8 +233,10 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
 
 	if (!parcel_data.name.empty())
 	{
+		mParcelTitle = parcel_data.name;
+
 		mParcelName->setText(llformat("%s (%d, %d, %d)",
-							 parcel_data.name.c_str(), region_x, region_y, region_z));
+							 mParcelTitle.c_str(), region_x, region_y, region_z));
 	}
 	else
 	{
@@ -284,15 +286,12 @@ void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility)
 
 void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel)
 {
-	std::string name = mParcelName->getText();
-	if (name.empty())
-	{
-		name = mRegionName->getText();
-	}
+	std::string region_name = mRegionName->getText();
 
 	LLPickData data;
 	data.pos_global = pos_global;
-	data.name = name;
+	data.name = mParcelTitle.empty() ? region_name : mParcelTitle;
+	data.sim_name = region_name;
 	data.desc = mDescEditor->getText();
 	data.snapshot_id = mSnapshotCtrl->getImageAssetID();
 	data.parcel_id = mParcelID;
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index b9bf92b534..7dfc7b2444 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -111,6 +111,7 @@ protected:
 	LLUUID					mParcelID;
 	LLUUID					mRequestedID;
 	LLVector3				mPosRegion;
+	std::string				mParcelTitle; // used for pick title without coordinates
 	std::string				mCurrentTitle;
 	S32						mScrollingPanelMinHeight;
 	S32						mScrollingPanelWidth;
-- 
cgit v1.2.3


From 7ba2f99ae01f0bc08c869e8a250c888a5c17c49a Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Tue, 15 Dec 2009 19:10:27 +0200
Subject: =?UTF-8?q?mplemented=20EXT-3395=20=E2=80=9CDocked=20IM/Chat=20win?=
 =?UTF-8?q?dows=20shouldn't=20hide=20when=20voice=20control=20panel=20is?=
 =?UTF-8?q?=20opened=E2=80=9D;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/llui/lldockablefloater.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 63faf44f9d..9dc7861992 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -38,6 +38,8 @@
 //static
 LLHandle<LLFloater> LLDockableFloater::sInstanceHandle;
 
+static const std::string VOICE_FLOATER("floater_voice_controls"), IM_FLOATER("panel_im");
+
 //static
 void LLDockableFloater::init(LLDockableFloater* thiz)
 {
@@ -114,9 +116,11 @@ void LLDockableFloater::resetInstance()
 {
 	if (mUniqueDocking && sInstanceHandle.get() != this)
 	{
-		if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked())
+		if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked()
+				&& (getName() != VOICE_FLOATER || sInstanceHandle.get()->getName() != IM_FLOATER)
+					&& (getName() !=  IM_FLOATER || sInstanceHandle.get()->getName() != VOICE_FLOATER))
 		{
-			sInstanceHandle.get()->setVisible(FALSE);
+				sInstanceHandle.get()->setVisible(FALSE);
 		}
 		sInstanceHandle = getHandle();
 	}
-- 
cgit v1.2.3


From 40a10565ac02b5e0b8b34969f92c3e9b5c6b497c Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 15 Dec 2009 15:40:13 +0200
Subject: Work on task EXT-3147 (Implement new states for message indicators) 
 -- Code recactored for future implementation of "Opening either Message Well
 will clear the "new messages" state (and thus the "lit" status)"

--HG--
branch : product-engine
---
 indra/newview/llchiclet.cpp | 25 +++++++++++++++----------
 indra/newview/llchiclet.h   |  2 ++
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 960d9e02b2..b27634e105 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -169,15 +169,7 @@ void LLSysWellChiclet::setCounter(S32 counter)
 
 	mButton->setLabel(s_count);
 
-	/*
-	Emulate 4 states of button by background images, see detains in EXT-3147
-	xml attribute           Description
-	image_unselected        "Unlit" - there are no new messages
-	image_selected          "Unlit" + "Selected" - there are no new messages and the Well is open
-	image_pressed           "Lit" - there are new messages
-	image_pressed_selected  "Lit" + "Selected" - there are new messages and the Well is open
-	*/
-	mButton->setForcePressedState(counter > 0);
+	setNewMessagesState(counter > 0);
 
 	// we have to flash to 'Lit' state each time new unread message is comming.
 	if (counter > mCounter)
@@ -208,11 +200,24 @@ void LLSysWellChiclet::changeLitState()
 {
 	static bool set_lit = false;
 
-	mButton->setForcePressedState(set_lit);
+	setNewMessagesState(set_lit);
 
 	set_lit ^= true;
 }
 
+void LLSysWellChiclet::setNewMessagesState(bool new_messages)
+{
+	/*
+	Emulate 4 states of button by background images, see detains in EXT-3147
+	xml attribute           Description
+	image_unselected        "Unlit" - there are no new messages
+	image_selected          "Unlit" + "Selected" - there are no new messages and the Well is open
+	image_pressed           "Lit" - there are new messages
+	image_pressed_selected  "Lit" + "Selected" - there are new messages and the Well is open
+	*/
+	mButton->setForcePressedState(new_messages);
+}
+
 /************************************************************************/
 /*               LLIMWellChiclet implementation                         */
 /************************************************************************/
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 65abcd1f5f..6228f87252 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -804,6 +804,8 @@ protected:
 	 */
 	void changeLitState();
 
+	void setNewMessagesState(bool new_messages);
+
 protected:
 	class FlashToLitTimer;
 	LLButton* mButton;
-- 
cgit v1.2.3


From eccc3ed597121ec49ae9a9979200985cc80e9edd Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 15 Dec 2009 16:41:52 +0200
Subject: Work on task EXT-3147 (Implement new states for message indicators) 
 -- fixed bug: Well icon leaves in "Unlit" state if new message arrives when
 it is in the "Lit" state while flashing Improved behavior of reversing
 Lit/Unlit states

--HG--
branch : product-engine
---
 indra/newview/llchiclet.cpp | 21 ++++++++++++++++-----
 indra/newview/llchiclet.h   |  5 +----
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index b27634e105..08782abf0d 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -89,6 +89,14 @@ class LLSysWellChiclet::FlashToLitTimer : public LLEventTimer
 {
 public:
 	typedef boost::function<void()> callback_t;
+
+	/**
+	 * Constructor.
+	 *
+	 * @param count - how many times callback should be called (twice to not change original state)
+	 * @param period - how frequently callback should be called
+	 * @param cb - callback to be called each tick
+	 */
 	FlashToLitTimer(S32 count, F32 period, callback_t cb)
 		: LLEventTimer(period)
 		, mCallback(cb)
@@ -119,6 +127,10 @@ public:
 
 private:
 	callback_t		mCallback;
+
+	/**
+	 * How many times Well will blink.
+	 */
 	S32 mFlashCount;
 	S32 mCurrentFlashCount;
 };
@@ -140,6 +152,7 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p)
 , mButton(NULL)
 , mCounter(0)
 , mMaxDisplayedCount(p.max_displayed_count)
+, mIsNewMessagesState(false)
 , mFlashToLitTimer(NULL)
 {
 	LLButton::Params button_params = p.button;
@@ -198,11 +211,7 @@ void LLSysWellChiclet::setToggleState(BOOL toggled) {
 
 void LLSysWellChiclet::changeLitState()
 {
-	static bool set_lit = false;
-
-	setNewMessagesState(set_lit);
-
-	set_lit ^= true;
+	setNewMessagesState(!mIsNewMessagesState);
 }
 
 void LLSysWellChiclet::setNewMessagesState(bool new_messages)
@@ -216,6 +225,8 @@ void LLSysWellChiclet::setNewMessagesState(bool new_messages)
 	image_pressed_selected  "Lit" + "Selected" - there are new messages and the Well is open
 	*/
 	mButton->setForcePressedState(new_messages);
+
+	mIsNewMessagesState = new_messages;
 }
 
 /************************************************************************/
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 6228f87252..a2fda483f0 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -811,11 +811,8 @@ protected:
 	LLButton* mButton;
 	S32 mCounter;
 	S32 mMaxDisplayedCount;
+	bool mIsNewMessagesState;
 
-	/**
-	 * How many times Well will blink.
-	 */
-	S32 mFlashToLitCount;
 	FlashToLitTimer* mFlashToLitTimer;
 
 };
-- 
cgit v1.2.3


From 870d4449f5eec1c2a7e5e4627a0433846ab256aa Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Tue, 15 Dec 2009 16:00:28 +0000
Subject: EXT-3441: Support various substitutions for Search URL.

The search URL is now specified in app_settings/settings.xml (instead
of in floater_search.xml), and it is now defined more flexibly with
support for various substitution strings, such as [QUERY], [AUTH_KEY],
[MATURITY], [GODLIKE], etc.

I pulled the common substitution code out into a new static method,
LLWeb::expandURLSubstitutions(). This provides support for common
strings like [VERSION], [CHANNEL], [LANGUAGE], [OS], etc. The Help and
Home sidetray code has been updated to use this new function, to avoid
replicating this behavior 3 times.

I also cleaned up the app_settings/settings.xml file and removed the
old search keys of: SearchURLDefault, SearchURLQuery, and
SearchURLSuffix2.
---
 indra/newview/app_settings/settings.xml            |  50 ++-------
 indra/newview/llfloatersearch.cpp                  |  38 +++----
 indra/newview/llviewerhelp.cpp                     |   3 +-
 indra/newview/llviewerhelputil.cpp                 |  43 ++------
 indra/newview/llviewerhelputil.h                   |   4 +-
 indra/newview/llviewerhome.cpp                     |  15 +--
 indra/newview/llweb.cpp                            |  34 +++++-
 indra/newview/llweb.h                              |   5 +-
 .../skins/default/xui/en/floater_search.xml        |   4 -
 indra/newview/tests/llviewerhelputil_test.cpp      | 122 ++++++++++++---------
 10 files changed, 147 insertions(+), 171 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7ac7a09d56..f00b100217 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3587,6 +3587,17 @@
       <key>Value</key>
       <string>http://www.secondlife.com/</string>
     </map>
+    <key>SearchURL</key>
+    <map>
+      <key>Comment</key>
+      <string>URL for Search website, displayed in the Find floater</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_KEY]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
+    </map>
     <key>HighResSnapshot</key>
     <map>
       <key>Comment</key>
@@ -7539,45 +7550,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>SearchURLDefault</key>
-    <map>
-      <key>Comment</key>
-      <string>URL to load for empty searches</string>
-      <key>Persist</key>
-      <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>http://search.secondlife.com/client_search.php?</string>
-    </map>
-    <key>SearchURLQuery</key>
-    <map>
-      <key>Comment</key>
-      <string>URL to use for searches</string>
-      <key>Persist</key>
-      <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>http://search.secondlife.com/client_search.php?q=[QUERY]&amp;s=[COLLECTION]&amp;</string>
-    </map>
-    <key>SearchURLSuffix2</key>
-    <map>
-      <key>Comment</key>
-      <string>Parameters added to end of search queries</string>
-      <key>Persist</key>
-      <integer>1</integer>
-	  <key>HideFromEditor</key>
-	  <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>lang=[LANG]&amp;mat=[MATURITY]&amp;t=[TEEN]&amp;region=[REGION]&amp;x=[X]&amp;y=[Y]&amp;z=[Z]&amp;session=[SESSION]</string>
-    </map>
     <key>SelectMovableOnly</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index c658963708..b197ed0ac6 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -38,6 +38,8 @@
 #include "lluri.h"
 #include "llagent.h"
 #include "llui.h"
+#include "llviewercontrol.h"
+#include "llweb.h"
 
 LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
 	LLFloater(key),
@@ -65,7 +67,6 @@ BOOL LLFloaterSearch::postBuild()
 	{
 		mBrowser->addObserver(this);
 		mBrowser->setTrusted(true);
-		mBrowser->setHomePageUrl(getString("search_url"));
 	}
 
 	return TRUE;
@@ -113,33 +114,27 @@ void LLFloaterSearch::search(const LLSD &key)
 	childHide("refresh_search");
 	mSearchGodLevel = gAgent.getGodLevel();
 
-	// get the URL for the search page
-	std::string url = getString("search_url");
-	if (! LLStringUtil::endsWith(url, "/"))
-	{
-		url += "/";
-	}
-
 	// work out the subdir to use based on the requested category
+	LLSD subs;
 	std::string category = key.has("category") ? key["category"].asString() : "";
 	if (mCategoryPaths.has(category))
 	{
-		url += mCategoryPaths[category].asString();
+		subs["CATEGORY"] = mCategoryPaths[category].asString();
 	}
 	else
 	{
-		url += mCategoryPaths["all"].asString();
+		subs["CATEGORY"] = mCategoryPaths["all"].asString();
 	}
 
-	// append the search query string
+	// add the search query string
 	std::string search_text = key.has("id") ? key["id"].asString() : "";
-	url += std::string("?q=") + LLURI::escape(search_text);
+	subs["QUERY"] = LLURI::escape(search_text);
 
-	// append the permissions token that login.cgi gave us
+	// add the permissions token that login.cgi gave us
 	LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
-	url += "&p=" + search_token.asString();
+	subs["AUTH_KEY"] = search_token.asString();
 
-	// also append the user's preferred maturity (can be changed via prefs)
+	// add the user's preferred maturity (can be changed via prefs)
 	std::string maturity;
 	if (gAgent.prefersAdult())
 	{
@@ -153,14 +148,15 @@ void LLFloaterSearch::search(const LLSD &key)
 	{
 		maturity = "13";  // PG
 	}
-	url += "&r=" + maturity;
-
-	// add the current localization information
-	url += "&lang=" + LLUI::getLanguage();
+	subs["MATURITY"] = maturity;
 
 	// add the user's god status
-	std::string godlike = gAgent.isGodlike() ? "1" : "0";
-	url += "&g=" + godlike;
+	subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0";
+
+	// get the search URL and expand all of the substitutions
+	// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
+	std::string url = gSavedSettings.getString("SearchURL");
+	url = LLWeb::expandURLSubstitutions(url, subs);
 
 	// and load the URL in the web view
 	mBrowser->navigateTo(url);
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index b8f91697e5..5af79b4fd3 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -81,8 +81,7 @@ void LLViewerHelp::showTopic(const std::string &topic)
 
 	// work out the URL for this topic and display it 
 	showHelp();
-	const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo();
-	std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo );
+	std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic );
 	setRawURL( helpURL );
 }
 
diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp
index df08470518..5ba4fc834c 100644
--- a/indra/newview/llviewerhelputil.cpp
+++ b/indra/newview/llviewerhelputil.cpp
@@ -34,12 +34,11 @@
 #include "llviewerprecompiledheaders.h"
 #include "llviewerhelputil.h"
 
-#include "llcontrol.h"
+#include "llsd.h"
 #include "llstring.h"
-#include "llsys.h"
 #include "lluri.h"
-#include "llversioninfo.h"
-
+#include "llweb.h"
+#include "llviewercontrol.h"
 
 //////////////////////////////////////////////
 // Build a help URL from a topic and formatter
@@ -59,40 +58,14 @@ std::string LLViewerHelpUtil::helpURLEncode( const std::string &component )
 	return escaped;
 }
 
-static std::string buildHelpVersion( const U32 ver_int )
-{
-	std::ostringstream ver_str;
-	ver_str << ver_int;
-	return ver_str.str(); // not encoded - numbers are rfc3986-safe
-}
-
 //static
-std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic,
-					    LLControlGroup &savedSettings,
-					    const LLOSInfo &osinfo )
+std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic)
 {
-	std::string helpURL = savedSettings.getString("HelpURLFormat");
 	LLSD substitution;
 	substitution["TOPIC"] = helpURLEncode(topic);
 	
-	substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName"));
-
-	substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion());
-	substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor());
-	substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor());
-	substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch());
-	substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild());
-	
-	substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple());
-
-	std::string language = savedSettings.getString("Language");
-	if( language.empty() || language == "default" )
-	{
-		language = savedSettings.getString("SystemLanguage");
-	}
-	substitution["LANGUAGE"] = helpURLEncode(language);
-		
-	LLStringUtil::format(helpURL, substitution);
-
-	return helpURL;
+	// get the help URL and expand all of the substitutions
+	// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
+	std::string helpURL = gSavedSettings.getString("HelpURLFormat");
+	return LLWeb::expandURLSubstitutions(helpURL, substitution);
 }
diff --git a/indra/newview/llviewerhelputil.h b/indra/newview/llviewerhelputil.h
index 8ee0d96023..95e6744842 100644
--- a/indra/newview/llviewerhelputil.h
+++ b/indra/newview/llviewerhelputil.h
@@ -41,9 +41,7 @@ class LLViewerHelpUtil
 {
  public:
 	static std::string helpURLEncode( const std::string &component );
-	static std::string buildHelpURL( const std::string &topic,
-					 LLControlGroup &savedSettings,
-					 const LLOSInfo &osinfo);
+	static std::string buildHelpURL( const std::string &topic );
 };
 
 #endif // header guard
diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp
index 58630978c4..2bae07f665 100644
--- a/indra/newview/llviewerhome.cpp
+++ b/indra/newview/llviewerhome.cpp
@@ -35,12 +35,11 @@
 #include "llviewerhome.h"
 
 #include "lllogininstance.h"
+#include "llsd.h"
 #include "llui.h"
 #include "lluri.h"
-#include "llsd.h"
-#include "llversioninfo.h"
 #include "llviewercontrol.h"
-#include "llviewernetwork.h"
+#include "llweb.h"
 
 //static
 std::string LLViewerHome::getHomeURL()
@@ -49,16 +48,12 @@ std::string LLViewerHome::getHomeURL()
 	// this value from settings.xml and support various substitutions
 
 	LLSD substitution;
-	substitution["VERSION"] = LLVersionInfo::getVersion();
-	substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName"));
-	substitution["LANGUAGE"] = LLUI::getLanguage();
 	substitution["AUTH_KEY"] = LLURI::escape(getAuthKey());
-	substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
 
+	// get the home URL and expand all of the substitutions
+	// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
 	std::string homeURL = gSavedSettings.getString("HomeSidePanelURL");
-	LLStringUtil::format(homeURL, substitution);
-		
-	return homeURL;	
+	return LLWeb::expandURLSubstitutions(homeURL, substitution);
 }
 
 //static
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 72431bd22f..045bef294e 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -38,12 +38,19 @@
 // Library includes
 #include "llwindow.h"	// spawnWebBrowser()
 
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
+#include "llalertdialog.h"
+#include "llappviewer.h"
 #include "llfloatermediabrowser.h"
 #include "llfloaterreg.h"
-#include "llalertdialog.h"
+#include "lllogininstance.h"
+#include "llsd.h"
 #include "lltoastalertpanel.h"
+#include "llui.h"
+#include "lluri.h"
+#include "llversioninfo.h"
+#include "llviewercontrol.h"
+#include "llviewernetwork.h"
+#include "llviewerwindow.h"
 
 class URLLoader : public LLAlertURLLoader
 {
@@ -124,3 +131,24 @@ std::string LLWeb::escapeURL(const std::string& url)
 	}
 	return escaped_url;
 }
+
+//static
+std::string LLWeb::expandURLSubstitutions(const std::string &url,
+										  const LLSD &default_subs)
+{
+	LLSD substitution = default_subs;
+	substitution["VERSION"] = LLVersionInfo::getVersion();
+	substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor();
+	substitution["VERSION_MINOR"] = LLVersionInfo::getMinor();
+	substitution["VERSION_PATCH"] = LLVersionInfo::getPatch();
+	substitution["VERSION_BUILD"] = LLVersionInfo::getBuild();
+	substitution["CHANNEL"] = LLVersionInfo::getChannel();
+	substitution["LANGUAGE"] = LLUI::getLanguage();
+	substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
+	substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+
+	std::string expanded_url = url;
+	LLStringUtil::format(expanded_url, substitution);
+
+	return LLWeb::escapeURL(expanded_url);
+}
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index 96a53db2ca..f4666c9280 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -57,8 +57,11 @@ public:
 	/// Load the given url in the operating system's web browser
 	static void loadURLExternal(const std::string& url);
 
-	// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
+	/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
 	static std::string escapeURL(const std::string& url);
+	/// Expands various strings like [LANG], [VERSION], etc. in a URL
+	static std::string expandURLSubstitutions(const std::string &url,
+											  const LLSD &default_subs);
 };
 
 #endif
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index e6bdcdf78e..9c1a5499db 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -12,10 +12,6 @@
  single_instance="true"
  title="FIND"
  width="670">
-    <floater.string
-     name="search_url">
-        http://int.searchwww-phx0.damballah.lindenlab.com/viewer
-    </floater.string>
     <floater.string
      name="loading_text">
         Loading...
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 68743357a6..ec612c4606 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -36,54 +36,59 @@
 #include "../test/lltut.h"
 
 #include "../llviewerhelputil.h"
-#include "../llversioninfo.h"
+#include "../llweb.h"
 #include "llcontrol.h"
-#include "llsys.h"
 
 #include <iostream>
 
-//----------------------------------------------------------------------------
-// Implementation of enough of LLControlGroup to support the tests:
+// values for all of the supported substitutions parameters
+static std::string gHelpURL;
+static std::string gVersion;
+static std::string gChannel;
+static std::string gLanguage;
+static std::string gGrid;
+static std::string gOS;
 
-static std::map<std::string,std::string> test_stringvec;
+//----------------------------------------------------------------------------
+// Mock objects for the dependencies of the code we're testing
 
 LLControlGroup::LLControlGroup(const std::string& name)
-	: LLInstanceTracker<LLControlGroup, std::string>(name)
-{
-}
-
-LLControlGroup::~LLControlGroup()
-{
-}
-
-// Implementation of just the LLControlGroup methods we requre
+	: LLInstanceTracker<LLControlGroup, std::string>(name) {}
+LLControlGroup::~LLControlGroup() {}
 BOOL LLControlGroup::declareString(const std::string& name,
 				   const std::string& initial_val,
 				   const std::string& comment,
-				   BOOL persist)
-{
-	test_stringvec[name] = initial_val;
-	return true;
-}
-
-void LLControlGroup::setString(const std::string& name, const std::string& val)
+				   BOOL persist) {return TRUE;}
+void LLControlGroup::setString(const std::string& name, const std::string& val){}
+std::string LLControlGroup::getString(const std::string& name)
 {
-	test_stringvec[name] = val;
+	if (name == "HelpURLFormat")
+		return gHelpURL;
+	return "";
 }
+LLControlGroup gSavedSettings("test");
 
-std::string LLControlGroup::getString(const std::string& name)
+static void substitute_string(std::string &input, const std::string &search, const std::string &replace)
 {
-	return test_stringvec[name];
+	size_t pos = input.find(search);
+	while (pos != std::string::npos)
+	{
+		input = input.replace(pos, search.size(), replace);
+		pos = input.find(search);
+	}
 }
 
-S32 LLVersionInfo::getMajor() { return 2; }
-S32 LLVersionInfo::getMinor() { return 0; }
-S32 LLVersionInfo::getPatch() { return 0; }
-S32 LLVersionInfo::getBuild() { return 200099; }
-const std::string &LLVersionInfo::getVersion()
+std::string LLWeb::expandURLSubstitutions(const std::string &url,
+										  const LLSD &default_subs)
 {
-	static std::string version = "2.0.0.200099";
-	return version;
+	std::string new_url = url;
+	substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString());
+	substitute_string(new_url, "[VERSION]", gVersion);
+	substitute_string(new_url, "[CHANNEL]", gChannel);
+	substitute_string(new_url, "[LANGUAGE]", gLanguage);
+	substitute_string(new_url, "[GRID]", gGrid);
+	substitute_string(new_url, "[OS]", gOS);
+	return new_url;
 }
 
 //----------------------------------------------------------------------------
@@ -101,41 +106,52 @@ namespace tut
 	template<> template<>
 	void viewerhelputil_object_t::test<1>()
 	{
-		LLOSInfo osinfo;
-		LLControlGroup cgr("test");
-		cgr.declareString("HelpURLFormat", "fooformat", "declared_for_test", FALSE);
-		cgr.declareString("VersionChannelName", "foochannelname", "declared_for_test", FALSE);
-		cgr.declareString("Language", "foolanguage", "declared_for_test", FALSE);
 		std::string topic("test_topic");
-
 		std::string subresult;
 
-		cgr.setString("HelpURLFormat", "fooformat");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "fooformat";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("no substitution tags", subresult, "fooformat");
 
-		cgr.setString("HelpURLFormat", "");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("blank substitution format", subresult, "");
 
-		cgr.setString("HelpURLFormat", "[LANGUAGE]");
-		cgr.setString("Language", "");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "[TOPIC]";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
+		ensure_equals("topic name", subresult, "test_topic");
+
+		gHelpURL = "[LANGUAGE]";
+		gLanguage = "";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("simple substitution with blank", subresult, "");
 
-		cgr.setString("HelpURLFormat", "[LANGUAGE]");
-		cgr.setString("Language", "Esperanto");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "[LANGUAGE]";
+		gLanguage = "Esperanto";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("simple substitution", subresult, "Esperanto");
 
-		cgr.setString("HelpURLFormat", "[XXX]");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "http://secondlife.com/[LANGUAGE]";
+		gLanguage = "Gaelic";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
+		ensure_equals("simple substitution with url", subresult, "http://secondlife.com/Gaelic");
+
+		gHelpURL = "[XXX]";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("unknown substitution", subresult, "[XXX]");
 
-		cgr.setString("HelpURLFormat", "[LANGUAGE]/[LANGUAGE]");
-		cgr.setString("Language", "Esperanto");
-		subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo);
+		gHelpURL = "[LANGUAGE]/[LANGUAGE]";
+		gLanguage = "Esperanto";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
 		ensure_equals("multiple substitution", subresult, "Esperanto/Esperanto");
+
+		gHelpURL = "http://[CHANNEL]/[VERSION]/[LANGUAGE]/[OS]/[GRID]/[XXX]";
+		gChannel = "Second Life Test";
+		gVersion = "2.0";
+		gLanguage = "gaelic";
+		gOS = "AmigaOS 2.1";
+		gGrid = "mysim";
+		subresult = LLViewerHelpUtil::buildHelpURL(topic);
+		ensure_equals("complex substitution", subresult, "http://Second Life Test/2.0/gaelic/AmigaOS 2.1/mysim/[XXX]");
 	}
-    
 }
-- 
cgit v1.2.3


From 045e3e06579d533619208fb415399e68714244e3 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 15 Dec 2009 11:48:55 -0500
Subject: EXT-3199 : Re-enable task inspection inventory sidepanel

Re-added the task sidepanel.
Fixed bottom button layout.
Edit mode now always returns true for inventory sidepanels.

--HG--
branch : avatar-pipeline
---
 indra/newview/llsidepanelinventorysubpanel.cpp     |   4 +-
 indra/newview/llsidepaneliteminfo.cpp              |  14 +-
 indra/newview/llsidepaneltaskinfo.cpp              | 246 +++++++++++++--------
 indra/newview/llsidepaneltaskinfo.h                |  36 +--
 .../skins/default/xui/en/sidepanel_task_info.xml   |  20 +-
 5 files changed, 182 insertions(+), 138 deletions(-)

diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp
index 793904faa8..56e342c3ce 100644
--- a/indra/newview/llsidepanelinventorysubpanel.cpp
+++ b/indra/newview/llsidepanelinventorysubpanel.cpp
@@ -95,7 +95,9 @@ void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit)
 
 BOOL LLSidepanelInventorySubpanel::getIsEditing() const
 {
-	return mIsEditing;
+
+	return TRUE; // Default everything to edit mode since we're not using an edit button anymore.
+	// return mIsEditing;
 }
 
 void LLSidepanelInventorySubpanel::reset()
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 25518d87d6..1965e634b6 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -172,7 +172,7 @@ void LLSidepanelItemInfo::refresh()
 		}
 	}
 
-	if (!getIsEditing())
+	if (!getIsEditing() || !item)
 	{
 		const std::string no_item_names[]={
 			"LabelItemName",
@@ -261,18 +261,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLInventoryItem* item)
 											   GP_OBJECT_MANIPULATE)
 		&& is_obj_modify && is_complete;
 
-	const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
-	bool item_in_trash = item->getUUID() == trash_id || gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
-
-	if (is_modifiable && !item_in_trash)
-	{
-		setIsEditing(TRUE);
-	}
-	else
-	{
-		setIsEditing(FALSE);
-	}
-
 	childSetEnabled("LabelItemNameTitle",TRUE);
 	childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
 	childSetText("LabelItemName",item->getName());
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 2c40e948de..50cec3184d 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -101,13 +101,25 @@ BOOL LLSidepanelTaskInfo::postBuild()
 	mBuyBtn = getChild<LLButton>("buy_btn");
 	mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this));
 
-	childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe);
-	childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe);
-
 	mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
 
-	childSetCommitCallback("checkbox for sale",onClickForSale,this);
-
+	childSetCommitCallback("Object Name",						LLSidepanelTaskInfo::onCommitName,this);
+	childSetPrevalidate("Object Name",							LLLineEditor::prevalidateASCIIPrintableNoPipe);
+	childSetCommitCallback("Object Description",				LLSidepanelTaskInfo::onCommitDesc,this);
+	childSetPrevalidate("Object Description",					LLLineEditor::prevalidateASCIIPrintableNoPipe);
+	getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this));
+	childSetCommitCallback("checkbox share with group",			&LLSidepanelTaskInfo::onCommitGroupShare,this);
+	childSetAction("button deed",								&LLSidepanelTaskInfo::onClickDeedToGroup,this);
+	childSetCommitCallback("checkbox allow everyone move",		&LLSidepanelTaskInfo::onCommitEveryoneMove,this);
+	childSetCommitCallback("checkbox allow everyone copy",		&LLSidepanelTaskInfo::onCommitEveryoneCopy,this);
+	childSetCommitCallback("checkbox for sale",					&LLSidepanelTaskInfo::onCommitSaleInfo,this);
+	childSetCommitCallback("sale type",							&LLSidepanelTaskInfo::onCommitSaleType,this);
+	childSetCommitCallback("Edit Cost", 						&LLSidepanelTaskInfo::onCommitSaleInfo, this);
+	childSetCommitCallback("checkbox next owner can modify",	&LLSidepanelTaskInfo::onCommitNextOwnerModify,this);
+	childSetCommitCallback("checkbox next owner can copy",		&LLSidepanelTaskInfo::onCommitNextOwnerCopy,this);
+	childSetCommitCallback("checkbox next owner can transfer",	&LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this);
+	childSetCommitCallback("clickaction",						&LLSidepanelTaskInfo::onCommitClickAction,this);
+	childSetCommitCallback("search_check",						&LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
 	return TRUE;
 }
 
@@ -860,7 +872,7 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
 	return FALSE;
 }
 
-void LLSidepanelTaskInfo::onClickDeedToGroup()
+void LLSidepanelTaskInfo::onClickDeedToGroup(void *data)
 {
 	LLNotificationsUtil::add("DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
 }
@@ -869,121 +881,149 @@ void LLSidepanelTaskInfo::onClickDeedToGroup()
 /// Permissions checkboxes
 ///----------------------------------------------------------------------------
 
-void LLSidepanelTaskInfo::onCommitPerm(LLCheckBoxCtrl *ctrl, U8 field, U32 perm)
+// static
+void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm)
 {
-	const LLViewerObject* object = mObjectSelection->getFirstRootObject();
-	if (!object) return;
+	LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
+	if(!object) return;
 
-	BOOL new_state = ctrl->get();
+	// Checkbox will have toggled itself
+	// LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+	LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
+	BOOL new_state = check->get();
+	
 	LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm);
 }
 
-void LLSidepanelTaskInfo::onCommitGroupShare()
+// static
+void LLSidepanelTaskInfo::onCommitGroupShare(LLUICtrl *ctrl, void *data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox share with group");
-	onCommitPerm(ctrl, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY);
+	onCommitPerm(ctrl, data, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY);
 }
 
-void LLSidepanelTaskInfo::onCommitEveryoneMove()
+// static
+void LLSidepanelTaskInfo::onCommitEveryoneMove(LLUICtrl *ctrl, void *data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone move");
-	onCommitPerm(ctrl, PERM_EVERYONE, PERM_MOVE);
+	onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_MOVE);
 }
 
 
-void LLSidepanelTaskInfo::onCommitEveryoneCopy()
+// static
+void LLSidepanelTaskInfo::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone copy");
-	onCommitPerm(ctrl, PERM_EVERYONE, PERM_COPY);
+	onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY);
 }
 
-void LLSidepanelTaskInfo::onCommitNextOwnerModify()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can modify");
-	onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_MODIFY);
+	//llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << llendl;
+	onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY);
 }
 
-void LLSidepanelTaskInfo::onCommitNextOwnerCopy()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can copy");
-	onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_COPY);
+	//llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << llendl;
+	onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY);
 }
 
-void LLSidepanelTaskInfo::onCommitNextOwnerTransfer()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can transfer");
-	onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_TRANSFER);
+	//llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << llendl;
+	onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER);
 }
 
-void LLSidepanelTaskInfo::onCommitName()
+// static
+void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data)
 {
-	LLLineEditor* tb = getChild<LLLineEditor>("Object Name");
-	LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText());
+	//llinfos << "LLSidepanelTaskInfo::onCommitName()" << llendl;
+	LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+	LLLineEditor*	tb = self->getChild<LLLineEditor>("Object Name");
+	if(tb)
+	{
+		LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText());
+//		LLSelectMgr::getInstance()->selectionSetObjectName(self->mLabelObjectName->getText());
+	}
 }
 
-void LLSidepanelTaskInfo::onCommitDesc()
+
+// static
+void LLSidepanelTaskInfo::onCommitDesc(LLUICtrl*, void* data)
 {
-	LLLineEditor* le = getChild<LLLineEditor>("Object Description");
-	LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText());
+	//llinfos << "LLSidepanelTaskInfo::onCommitDesc()" << llendl;
+	LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+	LLLineEditor*	le = self->getChild<LLLineEditor>("Object Description");
+	if(le)
+	{
+		LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText());
+	}
 }
 
-void LLSidepanelTaskInfo::onCommitSaleInfo()
+// static
+void LLSidepanelTaskInfo::onCommitSaleInfo(LLUICtrl*, void* data)
 {
-	setAllSaleInfo();
+	LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+	self->setAllSaleInfo();
 }
 
-void LLSidepanelTaskInfo::onCommitSaleType()
+// static
+void LLSidepanelTaskInfo::onCommitSaleType(LLUICtrl*, void* data)
 {
-	setAllSaleInfo();
+	LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+	self->setAllSaleInfo();
 }
 
+
 void LLSidepanelTaskInfo::setAllSaleInfo()
 {
-	llinfos << "LLSidepanelTaskInfo::setAllSaleInfo()" << llendl;
-
 	LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT;
+
 	LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale");
+	
 	// Set the sale type if the object(s) are for sale.
-	if (checkPurchase && checkPurchase->get())
+	if(checkPurchase && checkPurchase->get())
 	{
 		sale_type = static_cast<LLSaleInfo::EForSale>(getChild<LLComboBox>("sale type")->getValue().asInteger());
 	}
 
 	S32 price = -1;
-	const LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+	
+	LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
 	price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger();
+
 	// If somehow an invalid price, turn the sale off.
 	if (price < 0)
 		sale_type = LLSaleInfo::FS_NOT;
-	LLSaleInfo sale_info(sale_type, price);
-	LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info);
 
-	// If turned off for-sale, make sure click-action buy is turned
-	// off as well
-	if (sale_type == LLSaleInfo::FS_NOT)
-	{
-		U8 click_action = 0;
-		LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
-		if (click_action == CLICK_ACTION_BUY)
-		{
-			LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH);
-		}
-	}
-}
+	LLSaleInfo old_sale_info;
+	LLSelectMgr::getInstance()->selectGetSaleInfo(old_sale_info);
 
-// static
-void LLSidepanelTaskInfo::onClickForSale(LLUICtrl* ctrl, void* data)
-{
-	LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
-	self->updateUIFromSaleInfo();
-}
+	LLSaleInfo new_sale_info(sale_type, price);
+	LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info);
+	
+	U8 old_click_action = 0;
+	LLSelectMgr::getInstance()->selectionGetClickAction(&old_click_action);
 
-void LLSidepanelTaskInfo::updateUIFromSaleInfo()
-{
-	/* 
-	   TODO: Update sale button enable/disable state and default 
-	   sale button settings when this sale button is enabled/disabled.
-	*/
+	if (old_sale_info.isForSale()
+		&& !new_sale_info.isForSale()
+		&& old_click_action == CLICK_ACTION_BUY)
+	{
+		// If turned off for-sale, make sure click-action buy is turned
+		// off as well
+		LLSelectMgr::getInstance()->
+			selectionSetClickAction(CLICK_ACTION_TOUCH);
+	}
+	else if (new_sale_info.isForSale()
+		&& !old_sale_info.isForSale()
+		&& old_click_action == CLICK_ACTION_TOUCH)
+	{
+		// If just turning on for-sale, preemptively turn on one-click buy
+		// unless user have a different click action set
+		LLSelectMgr::getInstance()->
+			selectionSetClickAction(CLICK_ACTION_BUY);
+	}
 }
 
 struct LLSelectionPayable : public LLSelectedObjectFunctor
@@ -997,8 +1037,35 @@ struct LLSelectionPayable : public LLSelectedObjectFunctor
 	}
 };
 
+static U8 string_value_to_click_action(std::string p_value)
+{
+	if (p_value == "Touch")
+		return CLICK_ACTION_TOUCH;
+	if (p_value == "Sit")
+		return CLICK_ACTION_SIT;
+	if (p_value == "Buy")
+		return CLICK_ACTION_BUY;
+	if (p_value == "Pay")
+		return CLICK_ACTION_PAY;
+	if (p_value == "Open")
+		return CLICK_ACTION_OPEN;
+	if (p_value == "Zoom")
+		return CLICK_ACTION_ZOOM;
+	return CLICK_ACTION_TOUCH;
+}
+
+// static
+void LLSidepanelTaskInfo::onCommitClickAction(LLUICtrl* ctrl, void*)
+{
+	LLComboBox* box = (LLComboBox*)ctrl;
+	if (!box) return;
+	std::string value = box->getValue().asString();
+	U8 click_action = string_value_to_click_action(value);
+	doClickAction(click_action);
+}
+
 // static
-void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
+void LLSidepanelTaskInfo::doClickAction(U8 click_action)
 {
 	if (click_action == CLICK_ACTION_BUY)
 	{
@@ -1020,7 +1087,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
 	{
 		// Verify object has script with money() handler
 		LLSelectionPayable payable;
-		const BOOL can_pay = mObjectSelection->applyToObjects(&payable);
+		bool can_pay = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&payable);
 		if (!can_pay)
 		{
 			// Warn, but do it anyway.
@@ -1031,10 +1098,11 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
 }
 
 // static
-void LLSidepanelTaskInfo::onCommitIncludeInSearch()
+void LLSidepanelTaskInfo::onCommitIncludeInSearch(LLUICtrl* ctrl, void* data)
 {
-	LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("search_check");
-	LLSelectMgr::getInstance()->selectionSetIncludeInSearch(ctrl->get());
+	LLCheckBoxCtrl* box = (LLCheckBoxCtrl*)ctrl;
+	llassert(box);
+	LLSelectMgr::getInstance()->selectionSetIncludeInSearch(box->get());
 }
 
 // virtual
@@ -1042,13 +1110,15 @@ void LLSidepanelTaskInfo::updateVerbs()
 {
 	LLSidepanelInventorySubpanel::updateVerbs();
 
+	/*
 	mOpenBtn->setVisible(!getIsEditing());
 	mPayBtn->setVisible(!getIsEditing());
 	mBuyBtn->setVisible(!getIsEditing());
-
-	mOpenBtn->setEnabled(enable_object_open());
 	//const LLViewerObject *obj = getFirstSelectedObject();
 	//mEditBtn->setEnabled(obj && obj->permModify());
+	*/
+
+	mOpenBtn->setEnabled(enable_object_open());
 }
 
 void LLSidepanelTaskInfo::onOpenButtonClicked()
@@ -1061,28 +1131,28 @@ void LLSidepanelTaskInfo::onOpenButtonClicked()
 
 void LLSidepanelTaskInfo::onPayButtonClicked()
 {
-	onCommitClickAction(CLICK_ACTION_PAY);
+	doClickAction(CLICK_ACTION_PAY);
 }
 
 void LLSidepanelTaskInfo::onBuyButtonClicked()
 {
-	onCommitClickAction(CLICK_ACTION_BUY);
+	doClickAction(CLICK_ACTION_BUY);
 }
 
 // virtual
 void LLSidepanelTaskInfo::save()
 {
-	onCommitGroupShare();
-	onCommitEveryoneMove();
-	onCommitEveryoneCopy();
-	onCommitNextOwnerModify();
-	onCommitNextOwnerCopy();
-	onCommitNextOwnerTransfer();
-	onCommitName();
-	onCommitDesc();
-	onCommitSaleInfo();
-	onCommitSaleType();
-	onCommitIncludeInSearch();
+	onCommitGroupShare(getChild<LLCheckBoxCtrl>("checkbox share with group"), this);
+	onCommitEveryoneMove(getChild<LLCheckBoxCtrl>("checkbox allow everyone move"), this);
+	onCommitEveryoneCopy(getChild<LLCheckBoxCtrl>("checkbox allow everyone copy"), this);
+	onCommitNextOwnerModify(getChild<LLCheckBoxCtrl>("checkbox next owner can modify"), this);
+	onCommitNextOwnerCopy(getChild<LLCheckBoxCtrl>("checkbox next owner can copy"), this);
+	onCommitNextOwnerTransfer(getChild<LLCheckBoxCtrl>("checkbox next owner can transfer"), this);
+	onCommitName(getChild<LLLineEditor>("Object Name"), this);
+	onCommitDesc(getChild<LLLineEditor>("Object Description"), this);
+	onCommitSaleInfo(NULL, this);
+	onCommitSaleType(NULL, this);
+	onCommitIncludeInSearch(getChild<LLCheckBoxCtrl>("search_check"), this);
 }
 
 void LLSidepanelTaskInfo::setObjectSelection(LLObjectSelectionHandle selection)
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 7c6d9983ae..cf36c20767 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -72,28 +72,30 @@ protected:
 	static void onClickRelease(void*);
 		   void onClickGroup();
 		   void cbGroupID(LLUUID group_id);
+	static void onClickDeedToGroup(void*);
 
-	void onClickDeedToGroup();
-	void onCommitPerm(LLCheckBoxCtrl* ctrl, U8 field, U32 perm);
-	void onCommitGroupShare();
-	void onCommitEveryoneMove();
-	void onCommitEveryoneCopy();
-	void onCommitNextOwnerModify();
-	void onCommitNextOwnerCopy();
-	void onCommitNextOwnerTransfer();
-	void onCommitName();
-	void onCommitDesc();
-	void onCommitSaleInfo();
-	void onCommitSaleType();
-
-	void onCommitClickAction(U8 click_action);
-	void onCommitIncludeInSearch();
+	static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm);
 
+	static void onCommitGroupShare(LLUICtrl *ctrl, void *data);
+
+	static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
+	static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
+
+	static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
+	static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
+	static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data);
+	
+	static void onCommitName(LLUICtrl* ctrl, void* data);
+	static void onCommitDesc(LLUICtrl* ctrl, void* data);
+
+	static void onCommitSaleInfo(LLUICtrl* ctrl, void* data);
+	static void onCommitSaleType(LLUICtrl* ctrl, void* data);	
 	void setAllSaleInfo();
 
-	static void onClickForSale(LLUICtrl* ctrl, void *data);
-	void updateUIFromSaleInfo();
+	static void	onCommitClickAction(LLUICtrl* ctrl, void* data);
+	static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*);
 
+	static void	doClickAction(U8 click_action);
 	void disableAll();
 
 private:
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index eff2ca1fcd..5b379b54e3 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -487,7 +487,7 @@
 		     height="25"
 		     label="Open"
 		     layout="topleft"
-		     left_pad="5"
+		     left="5"
 		     name="open_btn"
 		     top="0"
 		     width="60" />
@@ -509,23 +509,5 @@
 		     name="buy_btn"
 		     top="0"
 		     width="60" />
-	    <button
-		     follows="bottom|right"
-		     height="25"
-		     label="Cancel"
-		     layout="topleft"
-		     name="cancel_btn"
-		     right="-1"
-		     top="0"
-		     width="70" />
-	    <button
-		     follows="bottom|right"
-		     height="25"
-		     label="Save"
-		     layout="topleft"
-		     name="save_btn"
-		     left_pad="-135"
-		     top="0"
-		     width="60" />
 	</panel>
 </panel>
\ No newline at end of file
-- 
cgit v1.2.3


From 5eb82cdeaa4202ee696308b421d68061d4029b8c Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 15 Dec 2009 18:56:38 +0200
Subject: Work on task EXT-3147 (Implement new states for message indicators) 
 -- Implemented requirement: Opening either Message Well will clear the "new
 messages" state (and thus the "lit" status),  even though there may still be
 unread messages

--HG--
branch : product-engine
---
 indra/newview/llchiclet.cpp       |  4 +++-
 indra/newview/llchiclet.h         |  4 ++--
 indra/newview/llsyswellwindow.cpp | 17 +++++++++++++++++
 indra/newview/llsyswellwindow.h   |  9 +++++++++
 4 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 08782abf0d..c7f77810df 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -239,6 +239,8 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p)
 	LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
 
 	LLIMMgr::getInstance()->addSessionObserver(this);
+
+	LLIMWellWindow::getInstance()->setSysWellChiclet(this);
 }
 
 LLIMWellChiclet::~LLIMWellChiclet()
@@ -266,7 +268,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
 
 	// ensure that notification well window exists, to synchronously
 	// handle toast add/delete events.
-	LLNotificationWellWindow::getInstance();
+	LLNotificationWellWindow::getInstance()->setSysWellChiclet(this);
 }
 
 void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type)
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index a2fda483f0..353fc01c34 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -791,6 +791,8 @@ public:
 
 	void setToggleState(BOOL toggled);
 
+	void setNewMessagesState(bool new_messages);
+
 protected:
 
 	LLSysWellChiclet(const Params& p);
@@ -804,8 +806,6 @@ protected:
 	 */
 	void changeLitState();
 
-	void setNewMessagesState(bool new_messages);
-
 protected:
 	class FlashToLitTimer;
 	LLButton* mButton;
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index ca7cb0f59f..ae13071b6b 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -51,6 +51,7 @@
 LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key),
 													mChannel(NULL),
 													mMessageList(NULL),
+													mSysWellChiclet(NULL),
 													mSeparator(NULL),
 													NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"),
 													IM_WELL_ANCHOR_NAME("im_well_panel")
@@ -80,6 +81,9 @@ BOOL LLSysWellWindow::postBuild()
 
 	mMessageList->addItem(mSeparator);
 
+	// click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147.
+	setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this));
+
 	return LLDockableFloater::postBuild();
 }
 
@@ -174,6 +178,11 @@ void LLSysWellWindow::setVisible(BOOL visible)
 		mChannel->updateShowToastsState();
 		mChannel->redrawToasts();
 	}
+
+	if (visible)
+	{
+		releaseNewMessagesState();
+	}
 }
 
 //---------------------------------------------------------------------------------
@@ -227,6 +236,14 @@ void LLSysWellWindow::reshapeWindow()
 	}
 }
 
+void LLSysWellWindow::releaseNewMessagesState()
+{
+	if (NULL != mSysWellChiclet)
+	{
+		mSysWellChiclet->setNewMessagesState(false);
+	}
+}
+
 //---------------------------------------------------------------------------------
 bool LLSysWellWindow::isWindowEmpty()
 {
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 43b2723df0..fea145a17e 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -47,6 +47,7 @@ class LLFlatListView;
 class LLChiclet;
 class LLIMChiclet;
 class LLScriptChiclet;
+class LLSysWellChiclet;
 
 
 class LLSysWellWindow : public LLDockableFloater
@@ -78,6 +79,8 @@ public:
 
 	void onStartUpToastClick(S32 x, S32 y, MASK mask);
 
+	void setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; }
+
 	// size constants for the window and for its elements
 	static const S32 MAX_WINDOW_HEIGHT		= 200;
 	static const S32 MIN_WINDOW_WIDTH		= 318;
@@ -104,11 +107,17 @@ protected:
 	virtual const std::string& getAnchorViewName() = 0;
 
 	void reshapeWindow();
+	void releaseNewMessagesState();
 
 	// pointer to a corresponding channel's instance
 	LLNotificationsUI::LLScreenChannel*	mChannel;
 	LLFlatListView*	mMessageList;
 
+	/**
+	 * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147
+	 */
+	LLSysWellChiclet* mSysWellChiclet;
+
 	/**
 	 *	Special panel which is used as separator of Notifications & IM Rows.
 	 *	It is always presents in the list and shown when it is necessary.
-- 
cgit v1.2.3


From d19a9f7cb2d14f1b4a41a4f14542e84742df25f0 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 15 Dec 2009 12:10:36 -0500
Subject: EXT-3199 : Re-enable task inspection inventory sidepanel

Re-enabled right click menu option for bringing up this sidepanel.

--HG--
branch : avatar-pipeline
---
 indra/newview/llviewermenu.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 36d9e7935f..e38d03c60b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2519,8 +2519,6 @@ void handle_object_edit()
 
 void handle_object_inspect()
 {
-	// Disable sidepanel inspector
-	/*
 	LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
 	LLViewerObject* selected_objectp = selection->getFirstRootObject();
 	if (selected_objectp)
@@ -2529,9 +2527,11 @@ void handle_object_inspect()
 		key["task"] = "task";
 		LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
 	}
-	*/
 
+	/*
+	// Old floater properties
 	LLFloaterReg::showInstance("inspect", LLSD());
+	*/
 }
 
 //---------------------------------------------------------------------------
-- 
cgit v1.2.3


From 06f8017674295191d3c4400eacb36e34a167ffa5 Mon Sep 17 00:00:00 2001
From: Mike Antipov <mantipov@productengine.com>
Date: Tue, 15 Dec 2009 19:32:22 +0200
Subject: added more comments to code

--HG--
branch : product-engine
---
 indra/newview/llsyswellwindow.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index ae13071b6b..ea49f9c32e 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -82,6 +82,7 @@ BOOL LLSysWellWindow::postBuild()
 	mMessageList->addItem(mSeparator);
 
 	// click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147.
+	// mouse up callback is not called in this case.
 	setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this));
 
 	return LLDockableFloater::postBuild();
-- 
cgit v1.2.3


From fbf5d1a99221d54c242b67ffcf13d5510b5ce0a7 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 15 Dec 2009 13:47:31 -0500
Subject: EXT-3304 : Can't reorder items in the Favorites accordions EXT-3476 :
 Dragging and item in the PlacesSP brings up the InventorySP EXT-1916 :
 Landmarks are not sorted in the Favorites Accordion

Added a new LLInventoryObserver::SORT request for resorting folder contents.
Landmarks no longer use the same sorting as accordions.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfolderview.cpp      | 20 ++++++++++++++++++++
 indra/newview/llfolderview.h        |  1 +
 indra/newview/llinventorybridge.cpp |  9 ++++++---
 indra/newview/llinventoryobserver.h |  1 +
 indra/newview/llinventorypanel.cpp  | 14 +++++++++++++-
 5 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 321982ceb6..adf7f08702 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -1939,6 +1939,26 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
 	return NULL;
 }
 
+LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id)
+{
+	if (id.isNull())
+	{
+		return this;
+	}
+
+	for (folders_t::iterator iter = mFolders.begin();
+		 iter != mFolders.end();
+		 ++iter)
+	{
+		LLFolderViewFolder *folder = (*iter);
+		if (folder->getListener()->getUUID() == id)
+		{
+			return folder;
+		}
+	}
+	return NULL;
+}
+
 bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata)
 {
 	std::string action = userdata.asString();
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index d18ba385d8..2598af4df4 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -248,6 +248,7 @@ public:
 	void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
 	void removeItemID(const LLUUID& id);
 	LLFolderViewItem* getItemByID(const LLUUID& id);
+	LLFolderViewFolder* getFolderByID(const LLUUID& id);
 	
 	bool doToSelected(LLInventoryModel* model, const LLSD& userdata);
 	
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ab06ac1691..1b374a15a0 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2930,6 +2930,10 @@ void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcIt
 
 	items.erase(findItemByUUID(items, srcItem->getUUID()));
 	items.insert(findItemByUUID(items, destItem->getUUID()), srcItem);
+
+	// Refresh the folder view.
+	gInventory.addChangedMask(LLInventoryObserver::SORT, srcItem->getParentUUID());
+	gInventory.notifyObservers();
 }
 
 BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
@@ -2998,8 +3002,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 		}
 
 		const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
-		const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
-		const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id));
+		const BOOL folder_allows_reorder = (mUUID == favorites_id);
 	   
 		// we can move item inside a folder only if this folder is Favorites. See EXT-719
 		accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder);
@@ -3014,7 +3017,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 			// everything in the active window so that we don't follow
 			// the selection to its new location (which is very
 			// annoying).
-			LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+			LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
 			if (active_panel)
 			{
 				LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 99e6dbe3c8..c1f192e2bf 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -62,6 +62,7 @@ public:
 		STRUCTURE = 16,		// structural change (eg item or folder moved)
 		CALLING_CARD = 32,	// (eg online, grant status, cancel)
 		REBUILD = 64, 		// item UI changed (eg item type different)
+		SORT = 128, 		// folder needs to be resorted.
 		ALL = 0xffffffff
 	};
 	LLInventoryObserver();
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 92b9dc427f..ef7069195e 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -278,6 +278,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
 		const LLUUID& item_id = (*items_iter);
 		const LLInventoryObject* model_item = model->getObject(item_id);
 		LLFolderViewItem* view_item = mFolders->getItemByID(item_id);
+		LLFolderViewFolder* view_folder = mFolders->getFolderByID(item_id);
 
 		//////////////////////////////
 		// LABEL Operation
@@ -320,7 +321,18 @@ void LLInventoryPanel::modelChanged(U32 mask)
 				view_item->refresh();
 			}
 		}
-	
+
+		//////////////////////////////
+		// SORT Operation
+		// Sort the folder.
+		if (mask & LLInventoryObserver::SORT)
+		{
+			if (view_folder)
+			{
+				view_folder->requestSort();
+			}
+		}	
+
 		// We don't typically care which of these masks the item is actually flagged with, since the masks
 		// may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into
 		// Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks
-- 
cgit v1.2.3


From 1f7bf9216869682aa88c9c92b6c15d2d5278902d Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Tue, 15 Dec 2009 12:41:20 -0800
Subject: New mac build of llqtwebkit.

This build is based on the following:

http://bitbucket.org/girish/llqtwebkit-4.6/
	revision 08c337619f50
	local change: comment out the definition of qt_sendSpontaneousEvent() in llembeddedbrowserwindow.cpp

git://gitorious.org/~girish/qt/girishs-qt.git
	branch lindenqt
	revision b4820037eac5c52d44df99ec37a50edd1796c897
---
 install.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.xml b/install.xml
index 2d60f07c11..8f56811634 100644
--- a/install.xml
+++ b/install.xml
@@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard</string>
           <key>darwin</key>
           <map>
             <key>md5sum</key>
-            <string>7f818f13faf7c02838fe66f7d27e1913</string>
+            <string>e854fd009feeeb617ecfa68f7614ec17</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-darwin-20091124.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+flash-darwin-20091215.tar.bz2</uri>
           </map>
           <key>linux</key>
           <map>
-- 
cgit v1.2.3


From 0905d857614153e682032ab4630468708812707a Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 15 Dec 2009 16:10:29 -0500
Subject: For EXT-3448: New attachments detach after relog.  This fixes the
 most common problem, failing to create COF link to new attachment.

--HG--
branch : avatar-pipeline
---
 indra/newview/llappearancemgr.cpp | 40 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c06098689d..73fd50f9ea 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -871,10 +871,48 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor
 			(a->getWearableType() == b->getWearableType()));
 }
 
+class LLDeferredCOFLinkObserver: public LLInventoryObserver
+{
+public:
+	LLDeferredCOFLinkObserver(const LLUUID& item_id, bool do_update):
+		mItemID(item_id),
+		mDoUpdate(do_update)
+	{
+	}
+
+	~LLDeferredCOFLinkObserver()
+	{
+	}
+	
+	/* virtual */ void changed(U32 mask)
+	{
+		const LLInventoryItem *item = gInventory.getItem(mItemID);
+		if (item)
+		{
+			gInventory.removeObserver(this);
+			LLAppearanceManager::instance().addCOFItemLink(item,mDoUpdate);
+			delete this;
+		}
+	}
+
+private:
+	const LLUUID mItemID;
+	bool mDoUpdate;
+};
+
+
 void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update )
 {
 	const LLInventoryItem *item = gInventory.getItem(item_id);
-	addCOFItemLink(item, do_update);
+	if (!item)
+	{
+		LLDeferredCOFLinkObserver *observer = new LLDeferredCOFLinkObserver(item_id, do_update);
+		gInventory.addObserver(observer);
+	}
+	else
+	{
+		addCOFItemLink(item, do_update);
+	}
 }
 
 void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update )
-- 
cgit v1.2.3


From 0f5a7575407bcab51678a4f05884835e502cd3d3 Mon Sep 17 00:00:00 2001
From: Ramzi Linden <ramzi@lindenlab.com>
Date: Tue, 15 Dec 2009 13:12:16 -0800
Subject: L10N: some legacy strings were left in panel_preferences_setup.xml.
 At least I will make them consistent.

---
 indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index a7def5306e..a65f7d3a54 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -3,7 +3,7 @@
  border="true"
  follows="left|top|right|bottom"
  height="408"
- label="Input &amp; Camera"
+ label="Setup"
  layout="topleft"
  left="102"
  name="Input panel"
@@ -223,7 +223,7 @@
      follows="left|top"
      height="23"
      label="Reset"
-     label_selected="Set"
+     label_selected="Reset"
      layout="topleft"
      left_pad="3"
      name="reset_cache"
-- 
cgit v1.2.3


From eafd52200d1c101c918384066465638f400aa033 Mon Sep 17 00:00:00 2001
From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com>
Date: Tue, 15 Dec 2009 16:20:17 -0500
Subject: fix for post merge compile error (minor)

---
 indra/newview/llweb.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 18f61501dc..f8bb7336db 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -38,7 +38,6 @@
 // Library includes
 #include "llwindow.h"	// spawnWebBrowser()
 
-#include "llalertdialog.h"
 #include "llappviewer.h"
 #include "llfloatermediabrowser.h"
 #include "llfloaterreg.h"
-- 
cgit v1.2.3


From bff2f1d6f09201ec7adf2da5dd10614a6e1fd109 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Dec 2009 14:19:33 -0800
Subject: EXT-3140 and build performance enhancements. Move the
 message_template check and manifest checking to the package step. Moved the
 dll copy from a post-build step its own target for dependency checking.
 Disabled copy of art/xui, etc in viewer manifest for non-package builds.

---
 indra/cmake/TemplateCheck.cmake  |   2 +-
 indra/newview/CMakeLists.txt     | 255 +++++++++++++++------------------------
 indra/newview/viewer_manifest.py | 199 ++++++++++++++++++------------
 3 files changed, 218 insertions(+), 238 deletions(-)

diff --git a/indra/cmake/TemplateCheck.cmake b/indra/cmake/TemplateCheck.cmake
index 3b73dc82df..fa4e387dd5 100644
--- a/indra/cmake/TemplateCheck.cmake
+++ b/indra/cmake/TemplateCheck.cmake
@@ -5,7 +5,7 @@ include(Python)
 macro (check_message_template _target)
   add_custom_command(
       TARGET ${_target}
-      PRE_LINK
+      POST_BUILD
       COMMAND ${PYTHON_EXECUTABLE}
       ARGS ${SCRIPTS_DIR}/template_verifier.py
            --mode=development --cache_master
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index be6bce8054..0fc34ee248 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1351,7 +1351,6 @@ add_executable(${VIEWER_BINARY_NAME}
     MACOSX_BUNDLE
     ${viewer_SOURCE_FILES}
     )
-check_message_template(${VIEWER_BINARY_NAME})
 
 if (LLKDU_LIBRARY)
   add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
@@ -1388,45 +1387,79 @@ if (WINDOWS)
             )
     endif(USE_PRECOMPILED_HEADERS)
 
-    # sets the 'working directory' for debugging from visual studio.
-    if (NOT UNATTENDED)
-        add_custom_command(
-            TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-            COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
-            ARGS
-              --solution 
-              ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
-              --workingdir
-              ${VIEWER_BINARY_NAME}
-              "${CMAKE_CURRENT_SOURCE_DIR}"
-            COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
-            )
-    endif (NOT UNATTENDED)
-
-    add_custom_command(
-        TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
-        COMMAND ${CMAKE_COMMAND}
-        ARGS
-          -E
-          copy_if_different
-          ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/messages/message_template.msg
-          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message_template.msg
-        COMMENT "Copying message_template.msg to the runtime folder."
-        )
-
-    add_custom_command(
-      TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
-      COMMAND ${CMAKE_COMMAND}
-      ARGS
-        -E
-        copy_if_different
-        ${CMAKE_CURRENT_SOURCE_DIR}/../../etc/message.xml
-        ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml
-      COMMENT "Copying message.xml to the runtime folder."
+    # If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
+    # here.
+    # *NOTE:Mani - This is a crappy hack to have important dependecies for the viewer_manifest copy action
+    # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing.
+    # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
+    # and have the build deps get tracked *please* tell me about it.
+    set(COPY_INPUT_DEPENDECIES
+      # The following commented dependencies are determined at variably at build time. Can't do this here.
+      #llkdu.dll => llkdu.dll
+      #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
+      ${CMAKE_SOURCE_DIR}/../etc/message.xml
+      ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
+      ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll
+      ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll
+      ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll
+      ${SHARED_LIB_STAGING_DIR}/Release/msvcr80.dll
+      ${SHARED_LIB_STAGING_DIR}/Release/msvcp80.dll
+      ${SHARED_LIB_STAGING_DIR}/Release/Microsoft.VC80.CRT.manifest
+      ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcr80.dll
+      ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp80.dll
+      ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
+      ${SHARED_LIB_STAGING_DIR}/Debug/msvcr80d.dll
+      ${SHARED_LIB_STAGING_DIR}/Debug/msvcp80d.dll
+      ${SHARED_LIB_STAGING_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/zlib1.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll
+      ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll
+      ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
+      ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
+      ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll
+      ${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll
+      ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll
+      ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtnetwork4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtopengl4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtwebkit4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qgif4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qico4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qjpeg4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qmng4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qsvg4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qtiff4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtcored4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtguid4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtnetworkd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtopengld4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtwebkitd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qgifd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qicod4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qjpegd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qmngd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qsvgd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qtiffd4.dll
+      windows-crash-logger
+      windows-updater
       )
-       
+
     add_custom_command(
-      TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+      OUTPUT  ${CMAKE_CFG_INTDIR}/copy_touched.bat
       COMMAND ${PYTHON_EXECUTABLE}
       ARGS
         ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -1437,11 +1470,16 @@ if (WINDOWS)
         --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
         --grid=${GRID}
         --source=${CMAKE_CURRENT_SOURCE_DIR}
-      DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+	--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
+      DEPENDS 
+	${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+	${COPY_INPUT_DEPENDECIES}
       COMMENT "Performing viewer_manifest copy"
       )
+    
+    add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat) 
 
-    add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon)
+    add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
     
     if(LLKDU_LIBRARY)
       # kdu may not exist!
@@ -1460,6 +1498,21 @@ if (WINDOWS)
       windows-crash-logger
       )
 
+    # sets the 'working directory' for debugging from visual studio.
+    if (NOT UNATTENDED)
+        add_custom_command(
+            TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+            COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
+            ARGS
+              --solution 
+              ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
+              --workingdir
+              ${VIEWER_BINARY_NAME}
+              "${CMAKE_CURRENT_SOURCE_DIR}"
+            COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
+            )
+    endif (NOT UNATTENDED)
+
     if (PACKAGE)
       add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
@@ -1474,7 +1527,7 @@ if (WINDOWS)
           ${EVENT_HOST_SCRIPTS}
           ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
         )
-
+    
       add_custom_command(
         OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
         COMMAND ${PYTHON_EXECUTABLE}
@@ -1497,6 +1550,8 @@ if (WINDOWS)
         # sorted out on the parabuild cluster...
         #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
 
+      check_message_template(package)
+
     endif (PACKAGE)
 endif (WINDOWS)
 
@@ -1578,6 +1633,7 @@ if (LINUX)
     add_custom_target(package ALL DEPENDS ${product}.tar.bz2)
     add_dependencies(package linux-crash-logger-strip-target)
     add_dependencies(package linux-updater-strip-target)
+    check_message_template(package)
   endif (NOT INSTALL)
 endif (LINUX)
 
@@ -1616,6 +1672,7 @@ if (DARWIN)
 
   if (PACKAGE)
       add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) 
+      check_message_template(package)
       add_dependencies(package mac-updater mac-crash-logger)
 
       add_custom_command(
@@ -1719,119 +1776,3 @@ if (LL_TESTS)
 endif (LL_TESTS)
 
 
-# Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py
-if (WINDOWS)
-  add_custom_command(
-      TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-      COMMAND ${CMAKE_COMMAND}
-      ARGS
-        -E
-        make_directory
-        ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
-      COMMENT "Creating llplugin dir."
-      )
-
-  get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION)
-  add_custom_command(
-      TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-      COMMAND ${CMAKE_COMMAND}
-      ARGS
-        -E
-        copy_if_different
-        ${BUILT_SLPLUGIN}
-        ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
-      COMMENT "Copying SLPlugin executable to the runtime folder."
-      )
-
-  get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION)
-    add_custom_command(
-        TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-        COMMAND ${CMAKE_COMMAND}
-        ARGS
-          -E
-          copy_if_different
-          ${BUILT_WEBKIT_PLUGIN}
-          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
-        COMMENT "Copying WebKit Plugin to the runtime folder."
-        )
-
-  get_target_property(BUILT_QUICKTIME_PLUGIN media_plugin_quicktime LOCATION)
-    add_custom_command(
-        TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-        COMMAND ${CMAKE_COMMAND}
-        ARGS
-          -E
-          copy_if_different
-          ${BUILT_QUICKTIME_PLUGIN}
-          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
-        COMMENT "Copying Quicktime Plugin to the runtime folder."
-        )
-
-  #*******************************
-  # Copy media plugin support dlls
-  # Debug config runtime files required for the plugins
-  set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
-  set(plugins_debug_files
-    libeay32.dll
-    qtcored4.dll
-    qtguid4.dll
-    qtnetworkd4.dll
-    qtopengld4.dll
-    qtwebkitd4.dll
-    ssleay32.dll
-    )
-  copy_if_different(
-    ${plugins_debug_src_dir}
-    "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
-    out_targets
-    ${plugins_debug_files}
-    )
-  set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-  
-  # Release & ReleaseDebInfo config runtime files required for the plugins
-  set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
-  set(plugins_release_files
-    libeay32.dll
-    qtcore4.dll
-    qtgui4.dll
-    qtnetwork4.dll
-    qtopengl4.dll
-    qtwebkit4.dll
-    ssleay32.dll
-    )
-  copy_if_different(
-    ${plugins_release_src_dir}
-    "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
-    out_targets
-    ${plugins_release_files}
-    )
-  set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-
-  copy_if_different(
-    ${plugins_release_src_dir}
-    "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
-    out_targets
-    ${plugins_release_files}
-    )
-  set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-  
-  add_custom_target(copy_media_plugin_libs ALL
-    DEPENDS 
-    ${media_plugin_targets}
-    )
-
-  add_custom_command(
-    TARGET ${VIEWER_BINARY_NAME} POST_BUILD
-    COMMAND ${CMAKE_COMMAND}
-    ARGS
-      -E
-      copy_directory
-      ${CMAKE_BINARY_DIR}/test_apps/llplugintest/${CMAKE_CFG_INTDIR}/imageformats
-      ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin/imageformats
-    COMMENT "Copying llpluging imageformat libs."
-    )
-
-  add_dependencies(${VIEWER_BINARY_NAME} llmediaplugintest copy_media_plugin_libs)
-
-endif (WINDOWS)
-
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 4133315480..1e13d6a031 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -40,67 +40,73 @@ sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
 from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
 
 class ViewerManifest(LLManifest):
+    def is_packaging_viewer(self):
+        # This is overridden by the WindowsManifest sub-class,
+        # which has different behavior if it is not packaging the viewer.
+        return True
+    
     def construct(self):
         super(ViewerManifest, self).construct()
         self.exclude("*.svn*")
         self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
         self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
 
-        if self.prefix(src="app_settings"):
-            self.exclude("logcontrol.xml")
-            self.exclude("logcontrol-dev.xml")
-            self.path("*.pem")
-            self.path("*.ini")
-            self.path("*.xml")
-            self.path("*.db2")
-
-            # include the entire shaders directory recursively
-            self.path("shaders")
-            # ... and the entire windlight directory
-            self.path("windlight")
-            self.end_prefix("app_settings")
-
-        if self.prefix(src="character"):
-            self.path("*.llm")
-            self.path("*.xml")
-            self.path("*.tga")
-            self.end_prefix("character")
-
-        # Include our fonts
-        if self.prefix(src="fonts"):
-            self.path("*.ttf")
-            self.path("*.txt")
-            self.end_prefix("fonts")
-
-        # skins
-        if self.prefix(src="skins"):
-                self.path("paths.xml")
-                # include the entire textures directory recursively
-                if self.prefix(src="*/textures"):
-                        self.path("*/*.tga")
-                        self.path("*/*.j2c")
-                        self.path("*/*.jpg")
-                        self.path("*/*.png")
-                        self.path("*.tga")
-                        self.path("*.j2c")
-                        self.path("*.jpg")
-                        self.path("*.png")
-                        self.path("textures.xml")
-                        self.end_prefix("*/textures")
-                self.path("*/xui/*/*.xml")
-                self.path("*/xui/*/widgets/*.xml")
-                self.path("*/*.xml")
-                
-                # Local HTML files (e.g. loading screen)
-                if self.prefix(src="*/html"):
-                        self.path("*.png")
-                        self.path("*/*/*.html")
-                        self.path("*/*/*.gif")
-                        self.end_prefix("*/html")
-                self.end_prefix("skins")
-        
-        # Files in the newview/ directory
-        self.path("gpu_table.txt")
+        if self.is_packaging_viewer():
+            if self.prefix(src="app_settings"):
+                self.exclude("logcontrol.xml")
+                self.exclude("logcontrol-dev.xml")
+                self.path("*.pem")
+                self.path("*.ini")
+                self.path("*.xml")
+                self.path("*.db2")
+
+                # include the entire shaders directory recursively
+                self.path("shaders")
+                # ... and the entire windlight directory
+                self.path("windlight")
+                self.end_prefix("app_settings")
+
+            if self.prefix(src="character"):
+                self.path("*.llm")
+                self.path("*.xml")
+                self.path("*.tga")
+                self.end_prefix("character")
+
+            # Include our fonts
+            if self.prefix(src="fonts"):
+                self.path("*.ttf")
+                self.path("*.txt")
+                self.end_prefix("fonts")
+
+            # skins
+            if self.prefix(src="skins"):
+                    self.path("paths.xml")
+                    # include the entire textures directory recursively
+                    if self.prefix(src="*/textures"):
+                            self.path("*/*.tga")
+                            self.path("*/*.j2c")
+                            self.path("*/*.jpg")
+                            self.path("*/*.png")
+                            self.path("*.tga")
+                            self.path("*.j2c")
+                            self.path("*.jpg")
+                            self.path("*.png")
+                            self.path("textures.xml")
+                            self.end_prefix("*/textures")
+                    self.path("*/xui/*/*.xml")
+                    self.path("*/xui/*/widgets/*.xml")
+                    self.path("*/*.xml")
+
+                    # Local HTML files (e.g. loading screen)
+                    if self.prefix(src="*/html"):
+                            self.path("*.png")
+                            self.path("*/*/*.html")
+                            self.path("*/*/*.gif")
+                            self.end_prefix("*/html")
+                    self.end_prefix("skins")
+
+            # Files in the newview/ directory
+            self.path("gpu_table.txt")
 
     def login_channel(self):
         """Channel reported for login and upgrade purposes ONLY;
@@ -163,6 +169,12 @@ class WindowsManifest(ViewerManifest):
         else:
             return ''.join(self.channel().split()) + '.exe'
 
+    def is_packaging_viewer(self):
+        # Some commands, files will only be included
+        # if we are packaging the viewer on windows.
+        # This manifest is also used to copy
+        # files during the build.
+        return 'package' in self.args['actions']
 
     def test_msvcrt_and_copy_action(self, src, dst):
         # This is used to test a dll manifest.
@@ -211,22 +223,25 @@ class WindowsManifest(ViewerManifest):
             print "Doesn't exist:", src
         
     def enable_crt_manifest_check(self):
-        WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
+        if self.is_packaging_viewer():
+           WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
 
     def enable_no_crt_manifest_check(self):
-        WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
+        if self.is_packaging_viewer():
+            WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
 
     def disable_manifest_check(self):
-        del WindowsManifest.copy_action
+        if self.is_packaging_viewer():
+            del WindowsManifest.copy_action
 
     def construct(self):
         super(WindowsManifest, self).construct()
 
         self.enable_crt_manifest_check()
 
-        # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
-        self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
-
+        if self.is_packaging_viewer():
+            # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
+            self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
 
         # Plugin host application
         self.path(os.path.join(os.pardir,
@@ -316,26 +331,47 @@ class WindowsManifest(ViewerManifest):
         if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"):
             self.path("media_plugin_webkit.dll")
             self.end_prefix()
-            
-        if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"):
-            self.path("libeay32.dll")
-            self.path("qtcore4.dll")
-            self.path("qtgui4.dll")
-            self.path("qtnetwork4.dll")
-            self.path("qtopengl4.dll")
-            self.path("qtwebkit4.dll")
-            self.path("ssleay32.dll")
-            self.end_prefix()
 
-        # For WebKit/Qt plugin runtimes (image format plugins)
-        if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"):
-            self.path("qgif4.dll")
-            self.path("qico4.dll")
-            self.path("qjpeg4.dll")
-            self.path("qmng4.dll")
-            self.path("qsvg4.dll")
-            self.path("qtiff4.dll")
-            self.end_prefix()
+        if self.args['configuration'].lower() == 'debug':
+            if self.prefix(src="../../libraries/i686-win32/lib/debug", dst="llplugin"):
+                self.path("libeay32.dll")
+                self.path("qtcored4.dll")
+                self.path("qtguid4.dll")
+                self.path("qtnetworkd4.dll")
+                self.path("qtopengld4.dll")
+                self.path("qtwebkitd4.dll")
+                self.path("ssleay32.dll")
+                self.end_prefix()
+
+            # For WebKit/Qt plugin runtimes (image format plugins)
+            if self.prefix(src="../../libraries/i686-win32/lib/debug/imageformats", dst="llplugin/imageformats"):
+                self.path("qgif4d.dll")
+                self.path("qico4d.dll")
+                self.path("qjpeg4d.dll")
+                self.path("qmng4d.dll")
+                self.path("qsvg4d.dll")
+                self.path("qtiff4d.dll")
+                self.end_prefix()
+        else:
+            if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"):
+                self.path("libeay32.dll")
+                self.path("qtcore4.dll")
+                self.path("qtgui4.dll")
+                self.path("qtnetwork4.dll")
+                self.path("qtopengl4.dll")
+                self.path("qtwebkit4.dll")
+                self.path("ssleay32.dll")
+                self.end_prefix()
+
+            # For WebKit/Qt plugin runtimes (image format plugins)
+            if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"):
+                self.path("qgif4.dll")
+                self.path("qico4.dll")
+                self.path("qjpeg4.dll")
+                self.path("qmng4.dll")
+                self.path("qsvg4.dll")
+                self.path("qtiff4.dll")
+                self.end_prefix()
 
         self.disable_manifest_check()
 
@@ -346,6 +382,9 @@ class WindowsManifest(ViewerManifest):
         self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
                   dst="updater.exe")
 
+        if not self.is_packaging_viewer():
+            self.package_file = "copied_deps"    
+
     def nsi_file_commands(self, install=True):
         def wpath(path):
             if path.endswith('/') or path.endswith(os.path.sep):
-- 
cgit v1.2.3


From e92a88159c7af972c8edd53e50d6ec2d3592a3dd Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 15 Dec 2009 17:29:05 -0500
Subject: For EXT-3448: New attachments detach after relog. Added a check that
 the only objects deleted by LLAppearanceManager are links.  Probably not the
 cause of disappearing objects in this bug, but a good safety feature.

--HG--
branch : avatar-pipeline
---
 indra/newview/llappearancemgr.cpp | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 73fd50f9ea..43b2f34ecd 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit
 		LLViewerInventoryItem *item = items.get(i);
 		if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
 			continue;
-		gInventory.purgeObject(item->getUUID());
+		if (item->getIsLinkType())
+		{
+			gInventory.purgeObject(item->getUUID());
+		}
 	}
 }
 
@@ -947,7 +950,10 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
 		else if (areMatchingWearables(vitem,inv_item))
 		{
 			gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
-			gInventory.purgeObject(inv_item->getUUID());
+			if (inv_item->getIsLinkType())
+			{
+				gInventory.purgeObject(inv_item->getUUID());
+			}
 		}
 	}
 	if (linked_already)
@@ -996,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda
 	for (S32 i=0; i<item_array.count(); i++)
 	{
 		const LLInventoryItem* item = item_array.get(i).get();
-		if (item->getLinkedUUID() == item_id)
+		if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
 		{
-			const LLUUID& item_id = item_array.get(i)->getUUID();
-			gInventory.purgeObject(item_id);
+			gInventory.purgeObject(item->getUUID());
 		}
 	}
 	if (do_update)
-- 
cgit v1.2.3


From 2dd09062d199ebfe7af8d67c59ec1bdc26e124a9 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 15 Dec 2009 17:33:59 -0500
Subject: menu separator fix

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1b374a15a0..78e84c9216 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2496,7 +2496,10 @@ void LLFolderBridge::folderOptionsMenu()
 		checkFolderForContentsOfType(model, is_object) ||
 		checkFolderForContentsOfType(model, is_gesture) )
 	{
-		mItems.push_back(std::string("Folder Wearables Separator"));
+		if (!is_sidepanel)
+		{
+			mItems.push_back(std::string("Folder Wearables Separator"));
+		}
 
 		// Only enable add/replace outfit for non-default folders.
 		if (!is_default_folder)
-- 
cgit v1.2.3


From 710d2a6db367e0bc57b098f8ceced68b533674de Mon Sep 17 00:00:00 2001
From: Steve Bennetts <steve@lindenlab.com>
Date: Tue, 15 Dec 2009 14:44:41 -0800
Subject: Fixed an edge case that was triggering an error check when doing HTTP
 texture fetches.

---
 indra/newview/lltexturefetch.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 85259fdc1e..9f69ed3964 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -887,6 +887,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				}
 				else
 				{
+					// mFormattedImage gauranteed to not be NULL since cur_size != 0
+					mLoadedDiscard = mFormattedImage->getDiscardLevel();
 					mState = DECODE_IMAGE;
 					return false; // use what we have
 				}
-- 
cgit v1.2.3


From a81a2f19b21134fb52df1e1a735988a04aa0688a Mon Sep 17 00:00:00 2001
From: Runitai <>
Date: Tue, 15 Dec 2009 16:47:48 -0600
Subject: EXT-3488 Fix for sky not being reflected in water any more.

---
 indra/newview/pipeline.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 282eddf380..73b5222ee3 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7268,13 +7268,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
 					updateCull(camera, ref_result, 1);
 					stateSort(camera, ref_result);
 				}
-				else
-				{
-					gGL.setColorMask(true, true);
-					mWaterRef.clear();
-					gGL.setColorMask(true, false);
-				}
-
+				
 				ref_mask = mRenderTypeMask;
 				mRenderTypeMask = mask;
 			}
-- 
cgit v1.2.3


From dec9e56afe404ac8cbf2bacae87062bf091fdab1 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Tue, 15 Dec 2009 23:18:42 +0000
Subject: EXT-3180: Update Home sidetray to temporary URL.

---
 indra/newview/app_settings/settings.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f00b100217..032efb0c1a 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3585,7 +3585,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://www.secondlife.com/</string>
+      <string>http://lecs.viewer-sidebar.secondlife.com.s3.amazonaws.com/sidebar.html</string>
     </map>
     <key>SearchURL</key>
     <map>
-- 
cgit v1.2.3


From 9d4c0c28a384651ccf72fcd65c740538ae489ee3 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Dec 2009 15:25:09 -0800
Subject: Added missing dependecies to the viewer manifest copy target.

---
 indra/newview/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0fc34ee248..502af01ead 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1454,6 +1454,7 @@ if (WINDOWS)
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qmngd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qsvgd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qtiffd4.dll
+      SLPlugin
       windows-crash-logger
       windows-updater
       )
@@ -1473,6 +1474,7 @@ if (WINDOWS)
 	--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
       DEPENDS 
 	${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+	stage_third_party_libs
 	${COPY_INPUT_DEPENDECIES}
       COMMENT "Performing viewer_manifest copy"
       )
-- 
cgit v1.2.3


From 931591c0ab434cc330cfdfa324a27278bc4a1270 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Tue, 15 Dec 2009 23:45:38 +0000
Subject: EXT-3496: Add a common authentication key for search and home.

Search and the Home sidetray now have their own specific
authentication keys that they support from login.cgi, but they
fallback to a common key as follows:

Search: "search_token", fallback to "auth_token"
Home: "home_sidetray_token", fallback to "auth_token"
---
 indra/newview/app_settings/settings.xml |  2 +-
 indra/newview/llfloatersearch.cpp       |  7 ++++++-
 indra/newview/llviewerhome.cpp          | 12 +++++++++---
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 032efb0c1a..ff569ecffa 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3596,7 +3596,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_KEY]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
+      <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
     </map>
     <key>HighResSnapshot</key>
     <map>
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index b197ed0ac6..595d84f9f0 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -131,8 +131,13 @@ void LLFloaterSearch::search(const LLSD &key)
 	subs["QUERY"] = LLURI::escape(search_text);
 
 	// add the permissions token that login.cgi gave us
+	// We use "search_token", and fallback to "auth_token" if not present.
 	LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
-	subs["AUTH_KEY"] = search_token.asString();
+	if (search_token.asString().empty())
+	{
+		search_token = LLLoginInstance::getInstance()->getResponse("auth_token");
+	}
+	subs["AUTH_TOKEN"] = search_token.asString();
 
 	// add the user's preferred maturity (can be changed via prefs)
 	std::string maturity;
diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp
index 2bae07f665..6299b4fabd 100644
--- a/indra/newview/llviewerhome.cpp
+++ b/indra/newview/llviewerhome.cpp
@@ -48,7 +48,7 @@ std::string LLViewerHome::getHomeURL()
 	// this value from settings.xml and support various substitutions
 
 	LLSD substitution;
-	substitution["AUTH_KEY"] = LLURI::escape(getAuthKey());
+	substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey());
 
 	// get the home URL and expand all of the substitutions
 	// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
@@ -62,7 +62,13 @@ std::string LLViewerHome::getAuthKey()
 	// return the value of the (optional) auth token returned by login.cgi
 	// this lets the server provide an authentication token that we can
 	// blindly pass to the Home web page for it to perform authentication.
-	static const std::string authKeyName("home_sidetray_token");
-	return LLLoginInstance::getInstance()->getResponse(authKeyName);
+	// We use "home_sidetray_token", and fallback to "auth_token" if not
+	// present.
+	LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token");
+	if (auth_token.asString().empty())
+	{
+		auth_token = LLLoginInstance::getInstance()->getResponse("auth_token");
+	}
+	return auth_token.asString();
 }
 
-- 
cgit v1.2.3


From a162d6afdae3c15641f90cee8aae29ea9e92dd98 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 15 Dec 2009 19:16:42 -0500
Subject: EXT-3304 : Can't reorder items in the Favorites accordions

Fixed a bug where addChangedMask(LLInventoryObserver::SORT) was being called before the new sort order was established.

--HG--
branch : avatar-pipeline
---
 indra/newview/llinventorybridge.cpp |  7 +++----
 indra/newview/llinventorypanel.cpp  | 10 ----------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1b374a15a0..050676c242 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2902,6 +2902,9 @@ void saveItemsOrder(LLInventoryModel::item_array_t& items)
 		item->updateServer(FALSE);
 
 		gInventory.updateItem(item);
+
+		// Tell the parent folder to refresh its sort order.
+		gInventory.addChangedMask(LLInventoryObserver::SORT, item->getParentUUID());
 	}
 
 	gInventory.notifyObservers();
@@ -2930,10 +2933,6 @@ void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcIt
 
 	items.erase(findItemByUUID(items, srcItem->getUUID()));
 	items.insert(findItemByUUID(items, destItem->getUUID()), srcItem);
-
-	// Refresh the folder view.
-	gInventory.addChangedMask(LLInventoryObserver::SORT, srcItem->getParentUUID());
-	gInventory.notifyObservers();
 }
 
 BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index ef7069195e..3c34ba32e2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -397,16 +397,6 @@ void LLInventoryPanel::modelChanged(U32 mask)
 			}
 		}
 	}
-
-	/* I don't think we need this code, but not positive -- Seraph
-	if (!handled)
-	{
-		// It's a small change that only requires a refresh.
-		// *TODO: figure out a more efficient way to do the refresh
-		// since it is expensive on large inventories
-		mFolders->refresh();
-	}
-	*/
 }
 
 // static
-- 
cgit v1.2.3


From f92030d548a73cde5adc89aec3c3995fe7b46875 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Dec 2009 16:31:59 -0800
Subject: Yet again adding missed dependecies to the viewer copy command.

---
 indra/newview/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 502af01ead..c808ec44df 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1455,6 +1455,8 @@ if (WINDOWS)
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qsvgd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qtiffd4.dll
       SLPlugin
+      media_plugin_quicktime
+      media_plugin_webkit
       windows-crash-logger
       windows-updater
       )
-- 
cgit v1.2.3


From fc40740e1e5a7fcb1ed8bf3b4b6eaffe7d3d9c07 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 15 Dec 2009 17:04:09 -0800
Subject: Add a PrimMediaMasterEnabled debug flag to allow us to disable the
 media data client

Conceptually reviewed by Monroe
---
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llvovolume.cpp            | 35 +++++++++++++++++++--------------
 2 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f00b100217..9dfce27fad 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5470,6 +5470,17 @@
       <string>U32</string>
       <key>Value</key>
 	  <integer>13</integer>
+    </map>
+	<key>PrimMediaMasterEnabled</key>
+	<map>
+	  <key>Comment</key>
+      <string>Whether or not Media on a Prim is enabled.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
     </map>
 	<key>PrimMediaControlsUseHoverControlSet</key>
 	<map>
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d24edacd13..f98aa361e0 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -204,8 +204,8 @@ void LLVOVolume::markDead()
 	if (!mDead)
 	{
 		LLMediaDataClientObject::ptr_t obj = new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false);
-		sObjectMediaClient->removeFromQueue(obj);
-		sObjectMediaNavigateClient->removeFromQueue(obj);
+		if (sObjectMediaClient) sObjectMediaClient->removeFromQueue(obj);
+		if (sObjectMediaNavigateClient) sObjectMediaNavigateClient->removeFromQueue(obj);
 		
 		// Detach all media impls from this object
 		for(U32 i = 0 ; i < mMediaImplList.size() ; i++)
@@ -222,15 +222,18 @@ void LLVOVolume::markDead()
 void LLVOVolume::initClass()
 {
 	// gSavedSettings better be around
-	const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay");
-	const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay");
-	const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries");
-	const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize");
-	const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize");
-    sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, 
-													 max_sorted_queue_size, max_round_robin_queue_size);
-    sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, 
-																 max_retries, max_sorted_queue_size, max_round_robin_queue_size);
+	if (gSavedSettings.getBOOL("PrimMediaMasterEnabled"))
+	{
+		const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay");
+		const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay");
+		const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries");
+		const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize");
+		const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize");
+		sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, 
+														 max_sorted_queue_size, max_round_robin_queue_size);
+		sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, 
+																	 max_retries, max_sorted_queue_size, max_round_robin_queue_size);
+	}
 }
 
 // static
@@ -1719,14 +1722,15 @@ LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id)
 
 void LLVOVolume::requestMediaDataUpdate(bool isNew)
 {
-    sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew));
+    if (sObjectMediaClient)
+		sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew));
 }
 
 bool LLVOVolume::isMediaDataBeingFetched() const
 {
 	// I know what I'm doing by const_casting this away: this is just 
 	// a wrapper class that is only going to do a lookup.
-	return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false));
+	return (sObjectMediaClient) ? sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)) : false;
 }
 
 void LLVOVolume::cleanUpMediaImpls()
@@ -1925,7 +1929,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu
 		// "bounce back" to the current URL from the media entry
 		mediaNavigateBounceBack(face_index);
 	}
-	else
+	else if (sObjectMediaNavigateClient)
 	{
 		
 		llinfos << "broadcasting navigate with URI " << new_location << llendl;
@@ -1994,7 +1998,8 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin,
 
 void LLVOVolume::sendMediaDataUpdate()
 {
-    sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false));
+    if (sObjectMediaClient)
+		sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false));
 }
 
 void LLVOVolume::removeMediaImpl(S32 texture_index)
-- 
cgit v1.2.3


From f923f896bca0d0d8459c35a5ef8e0d0171cbe664 Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Tue, 15 Dec 2009 17:50:16 -0800
Subject: client changes to work with new version of Qt (4.6) and to do some
 cleanup at plugin exit so that cookies more betterer than what they did
 before.

---
 indra/media_plugins/webkit/media_plugin_webkit.cpp | 7 +++++--
 indra/newview/CMakeLists.txt                       | 2 ++
 indra/newview/viewer_manifest.py                   | 1 +
 indra/test_apps/llplugintest/CMakeLists.txt        | 1 +
 install.xml                                        | 4 ++--
 5 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 276ad39dfb..76e2c080be 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -626,7 +626,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
 			}
 			else if(message_name == "cleanup")
 			{
-				// TODO: clean up here
+				// DTOR most likely won't be called but the recent change to the way this process
+				// is (not) killed means we see this message and can do what we need to here.
+				// Note: this cleanup is ultimately what writes cookies to the disk
+				LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this );
+				LLQtWebKit::getInstance()->reset();
 			}
 			else if(message_name == "shm_added")
 			{
@@ -635,7 +639,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
 				info.mSize = (size_t)message_in.getValueS32("size");
 				std::string name = message_in.getValue("name");
 				
-				
 //				std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name 
 //					<< ", size: " << info.mSize 
 //					<< ", address: " << info.mAddress 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 72630cc413..a6679c5fbf 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1784,6 +1784,7 @@ if (WINDOWS)
     qtnetworkd4.dll
     qtopengld4.dll
     qtwebkitd4.dll
+    qtxmlpatternsd4.dll
     ssleay32.dll
     )
   copy_if_different(
@@ -1803,6 +1804,7 @@ if (WINDOWS)
     qtnetwork4.dll
     qtopengl4.dll
     qtwebkit4.dll
+    qtxmlpatterns4.dll    
     ssleay32.dll
     )
   copy_if_different(
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 32fdd41be2..5090dc9ce4 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -324,6 +324,7 @@ class WindowsManifest(ViewerManifest):
             self.path("qtnetwork4.dll")
             self.path("qtopengl4.dll")
             self.path("qtwebkit4.dll")
+            self.path("qtxmlpatternsd4.dll")
             self.path("ssleay32.dll")
             self.end_prefix()
 
diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 0011daaec6..12310f9ecd 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -435,6 +435,7 @@ if(WINDOWS)
     qtnetwork4.dll
     qtopengl4.dll
     qtwebkit4.dll
+    qtxmlpatterns4.dll
     ssleay32.dll
     )
   copy_if_different(
diff --git a/install.xml b/install.xml
index 2d60f07c11..3ce7a37bde 100644
--- a/install.xml
+++ b/install.xml
@@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard</string>
           <key>windows</key>
           <map>
             <key>md5sum</key>
-            <string>92cff05661b5547caae7cc6c66d09870</string>
+            <string>3846354e2e20a98c0401317eb114ff5e</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091123.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20091215.tar.bz2</uri>
           </map>
         </map>
       </map>
-- 
cgit v1.2.3


From c9a284fc69020f499ccb6d9fa877dad6864ec66f Mon Sep 17 00:00:00 2001
From: Monroe Linden <monroe@lindenlab.com>
Date: Tue, 15 Dec 2009 17:48:52 -0800
Subject: Updated llqtwebkit 4.6 build, with link-target and cookie-saving
 patches applied.

---
 install.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.xml b/install.xml
index ede43ab4c8..2e317755da 100644
--- a/install.xml
+++ b/install.xml
@@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard</string>
           <key>darwin</key>
           <map>
             <key>md5sum</key>
-            <string>e854fd009feeeb617ecfa68f7614ec17</string>
+            <string>44fe5bca65db2951ce91b5b6c8596ee0</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+flash-darwin-20091215.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20091215.tar.bz2</uri>
           </map>
           <key>linux</key>
           <map>
-- 
cgit v1.2.3


From 491e93f898ed1a6e825ea487b918c0103dec42e3 Mon Sep 17 00:00:00 2001
From: "Mark Palange (Mani)" <palange@lindenlab.com>
Date: Tue, 15 Dec 2009 18:57:26 -0800
Subject: Fixed misspelled debug qt names

---
 indra/newview/viewer_manifest.py | 44 ++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 1e13d6a031..24d92c37ad 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -333,7 +333,8 @@ class WindowsManifest(ViewerManifest):
             self.end_prefix()
 
         if self.args['configuration'].lower() == 'debug':
-            if self.prefix(src="../../libraries/i686-win32/lib/debug", dst="llplugin"):
+            if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),
+                           dst="llplugin"):
                 self.path("libeay32.dll")
                 self.path("qtcored4.dll")
                 self.path("qtguid4.dll")
@@ -341,19 +342,21 @@ class WindowsManifest(ViewerManifest):
                 self.path("qtopengld4.dll")
                 self.path("qtwebkitd4.dll")
                 self.path("ssleay32.dll")
-                self.end_prefix()
 
-            # For WebKit/Qt plugin runtimes (image format plugins)
-            if self.prefix(src="../../libraries/i686-win32/lib/debug/imageformats", dst="llplugin/imageformats"):
-                self.path("qgif4d.dll")
-                self.path("qico4d.dll")
-                self.path("qjpeg4d.dll")
-                self.path("qmng4d.dll")
-                self.path("qsvg4d.dll")
-                self.path("qtiff4d.dll")
+                # For WebKit/Qt plugin runtimes (image format plugins)
+                if self.prefix(src="imageformats", dst="llplugin/imageformats"):                
+                    self.path("qgifd4.dll")
+                    self.path("qicod4.dll")
+                    self.path("qjpegd4.dll")
+                    self.path("qmngd4.dll")
+                    self.path("qsvgd4.dll")
+                    self.path("qtiffd4.dll")
+                    self.end_prefix()
+
                 self.end_prefix()
         else:
-            if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"):
+            if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'release'),
+                           dst="llplugin"):
                 self.path("libeay32.dll")
                 self.path("qtcore4.dll")
                 self.path("qtgui4.dll")
@@ -361,16 +364,17 @@ class WindowsManifest(ViewerManifest):
                 self.path("qtopengl4.dll")
                 self.path("qtwebkit4.dll")
                 self.path("ssleay32.dll")
-                self.end_prefix()
 
-            # For WebKit/Qt plugin runtimes (image format plugins)
-            if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"):
-                self.path("qgif4.dll")
-                self.path("qico4.dll")
-                self.path("qjpeg4.dll")
-                self.path("qmng4.dll")
-                self.path("qsvg4.dll")
-                self.path("qtiff4.dll")
+                # For WebKit/Qt plugin runtimes (image format plugins)
+                if self.prefix(src="imageformats", dst="llplugin/imageformats"):
+                    self.path("qgif4.dll")
+                    self.path("qico4.dll")
+                    self.path("qjpeg4.dll")
+                    self.path("qmng4.dll")
+                    self.path("qsvg4.dll")
+                    self.path("qtiff4.dll")
+                    self.end_prefix()
+
                 self.end_prefix()
 
         self.disable_manifest_check()
-- 
cgit v1.2.3


From 966b2ebfe28d096791395188552f3fc18154247c Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Tue, 15 Dec 2009 21:02:16 -0800
Subject: Misnamed additional Qt/WebKit DLL.

---
 indra/newview/viewer_manifest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 5090dc9ce4..d6d6aa48d1 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -324,7 +324,7 @@ class WindowsManifest(ViewerManifest):
             self.path("qtnetwork4.dll")
             self.path("qtopengl4.dll")
             self.path("qtwebkit4.dll")
-            self.path("qtxmlpatternsd4.dll")
+            self.path("qtxmlpatterns4.dll")
             self.path("ssleay32.dll")
             self.end_prefix()
 
-- 
cgit v1.2.3


From 3eea3281af4277e9b0201dab60f6579b6140a9d0 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Wed, 16 Dec 2009 12:26:52 +0000
Subject: DEV-44351: Add a new secondlife:///app/classified/create SLapp.

Also cleaned up the code for the existing app/classified/{UUID}
support. Much nicer now.
---
 indra/newview/llpanelpicks.cpp   | 85 ++++++++++++++++++++++------------------
 indra/newview/llpanelpicks.h     |  7 ++--
 indra/newview/llpanelprofile.cpp | 28 +++++++++++++
 3 files changed, 79 insertions(+), 41 deletions(-)

diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 498782fb44..0a13180c73 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -57,7 +57,6 @@
 #include "llpanelprofile.h"
 #include "llpanelpick.h"
 #include "llpanelclassified.h"
-#include "llpanelprofileview.h"
 #include "llsidetray.h"
 
 static const std::string XML_BTN_NEW = "new_btn";
@@ -88,6 +87,14 @@ public:
 
 	bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
 	{
+		// handle app/classified/create urls first
+		if (params.size() == 1 && params[0].asString() == "create")
+		{
+			createClassified();
+			return true;
+		}
+
+		// then handle the general app/classified/{UUID}/{CMD} urls
 		if (params.size() < 2)
 		{
 			return false;
@@ -114,6 +121,31 @@ public:
 		return false;
 	}
 
+	void createClassified()
+	{
+		// open the new classified panel on the Me > Picks sidetray
+		LLSD params;
+		params["id"] = gAgent.getID();
+		params["open_tab_name"] = "panel_picks";
+		params["show_tab_panel"] = "create_classified";
+		LLSideTray::getInstance()->showPanel("panel_me", params);
+	}
+
+	void openClassified(LLAvatarClassifiedInfo* c_info)
+	{
+		// open the classified info panel on the Me > Picks sidetray
+		LLSD params;
+		params["id"] = c_info->creator_id;
+		params["open_tab_name"] = "panel_picks";
+		params["show_tab_panel"] = "classified_details";
+		params["classified_id"] = c_info->classified_id;
+		params["classified_avatar_id"] = c_info->creator_id;
+		params["classified_snapshot_id"] = c_info->snapshot_id;
+		params["classified_name"] = c_info->name;
+		params["classified_desc"] = c_info->description;
+		LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+	}
+
 	/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
 	{
 		if (APT_CLASSIFIED_INFO != type)
@@ -128,22 +160,8 @@ public:
 			return;
 		}
 
-		// open the people profile page for the classified's owner
-		LLSD params;
-		params["id"] = c_info->creator_id;
-		params["classified"] = c_info->classified_id;
-		params["open_tab_name"] = "panel_profile";
-		LLPanelProfileView *profile = dynamic_cast<LLPanelProfileView*>(LLSideTray::getInstance()->showPanel("panel_profile_view", params));
-
-		// then open the classified panel on this user's profile panel
-		if (profile)
-		{
-			LLPanelPicks* panel_picks = profile->getChild<LLPanelPicks>("panel_picks");
-			if (panel_picks)
-			{
-				panel_picks->openClassifiedInfo(c_info);
-			}
-		}
+		// open the detail side tray for this classified
+		openClassified(c_info);
 
 		// remove our observer now that we're done
 		mClassifiedIds.erase(c_info->classified_id);
@@ -693,33 +711,24 @@ void LLPanelPicks::openClassifiedInfo()
 
 	LLClassifiedItem* c_item = getSelectedClassifiedItem();
 
-	createClassifiedInfoPanel();
-
-	LLSD params;
- 	params["classified_id"] = c_item->getClassifiedId();
- 	params["avatar_id"] = c_item->getAvatarId();
- 	params["snapshot_id"] = c_item->getSnapshotId();
- 	params["name"] = c_item->getClassifiedName();
- 	params["desc"] = c_item->getDescription();
-
-	getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
+	openClassifiedInfo(c_item->getClassifiedId(), c_item->getAvatarId(),
+					   c_item->getSnapshotId(), c_item->getClassifiedName(),
+					   c_item->getDescription());
 }
 
-void LLPanelPicks::openClassifiedInfo(LLAvatarClassifiedInfo *c_info)
+void LLPanelPicks::openClassifiedInfo(const LLUUID &classified_id, 
+									  const LLUUID &avatar_id,
+									  const LLUUID &snapshot_id,
+									  const std::string &name, const std::string &desc)
 {
-	if (! c_info)
-	{
-		return;
-	}
-
 	createClassifiedInfoPanel();
 
 	LLSD params;
-	params["classified_id"] = c_info->classified_id;
-	params["avatar_id"] = c_info->creator_id;
-	params["snapshot_id"] = c_info->snapshot_id;
-	params["name"] = c_info->name;
-	params["desc"] = c_info->description;
+	params["classified_id"] = classified_id;
+	params["avatar_id"] = avatar_id;
+	params["snapshot_id"] = snapshot_id;
+	params["name"] = name;
+	params["desc"] = desc;
 
 	getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
 }
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 893a0c53a3..0ebf9e26dd 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -86,9 +86,6 @@ public:
 	// parent panels failed to work (picks related code was in my profile panel)
 	void setProfilePanel(LLPanelProfile* profile_panel);
 
-	// display the info panel for the given classified
-	void openClassifiedInfo(LLAvatarClassifiedInfo *c_info);
-
 protected:
 	/*virtual*/void updateButtons();
 
@@ -120,6 +117,10 @@ private:
 
 	void openPickInfo();
 	void openClassifiedInfo();
+	void openClassifiedInfo(const LLUUID &classified_id, const LLUUID &avatar_id,
+							const LLUUID &snapshot_id, const std::string &name,
+							const std::string &desc);
+	friend class LLPanelProfile;
 
 	void showAccordion(const std::string& name, bool show);
 
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3274820174..c73ade53c8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -144,6 +144,7 @@ BOOL LLPanelProfile::postBuild()
 
 void LLPanelProfile::onOpen(const LLSD& key)
 {
+	// open the desired panel
 	if (key.has("open_tab_name"))
 	{
 		getTabContainer()[PANEL_PICKS]->onClosePanel();
@@ -155,6 +156,33 @@ void LLPanelProfile::onOpen(const LLSD& key)
 	{
 		getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
 	}
+
+	// support commands to open further pieces of UI
+	if (key.has("show_tab_panel"))
+	{
+		std::string panel = key["show_tab_panel"].asString();
+		if (panel == "create_classified")
+		{
+			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+			if (picks)
+			{
+				picks->createNewClassified();
+			}
+		}
+		else if (panel == "classified_details")
+		{
+			LLUUID classified_id = key["classified_id"].asUUID();
+			LLUUID avatar_id     = key["classified_avatar_id"].asUUID();
+			LLUUID snapshot_id   = key["classified_snapshot_id"].asUUID();
+			std::string name     = key["classified_name"].asString();
+			std::string desc     = key["classified_desc"].asString();
+			LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+			if (picks)
+			{
+				picks->openClassifiedInfo(classified_id, avatar_id, snapshot_id, name, desc);
+			}
+		}
+	}
 }
 
 //*TODO redo panel toggling
-- 
cgit v1.2.3


From 5d7cb423604554bf652487c2783b3e213966bf45 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Wed, 16 Dec 2009 17:10:29 +0000
Subject: EXT-3517: Update mic/speaker volume scaling.

We now scale the mic and speaker volume levels to the Vivox range 30
to 70 (default of 50), as recommended by Vivox for their V3 SDK.
---
 indra/newview/llvoiceclient.cpp | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 1889ca78c3..cfa1f05ec0 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -113,23 +113,15 @@ static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str)
 static int scale_mic_volume(float volume)
 {
 	// incoming volume has the range [0.0 ... 2.0], with 1.0 as the default.
-	// Map it as follows: 0.0 -> 40, 1.0 -> 44, 2.0 -> 75
-
-	volume -= 1.0f;		// offset volume to the range [-1.0 ... 1.0], with 0 at the default.
-	int scaled_volume = 44;	// offset scaled_volume by its default level
-	if(volume < 0.0f)
-		scaled_volume += ((int)(volume * 4.0f));	// (44 - 40)
-	else
-		scaled_volume += ((int)(volume * 31.0f));	// (75 - 44)
-	
-	return scaled_volume;
+	// Map it to Vivox levels as follows: 0.0 -> 30, 1.0 -> 50, 2.0 -> 70
+	return 30 + (int)(volume * 20.0f);
 }
 
 static int scale_speaker_volume(float volume)
 {
 	// incoming volume has the range [0.0 ... 1.0], with 0.5 as the default.
-	// Map it as follows: 0.0 -> 0, 0.5 -> 50, 1.0 -> 100
-	return (int)(volume * 100.0f);
+	// Map it to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70
+	return 30 + (int)(volume * 40.0f);
 }
 
 class LLViewerVoiceAccountProvisionResponder :
-- 
cgit v1.2.3


From 0c0cb6fd79d12016b32bb74ce0e9d2c656143902 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 16 Dec 2009 11:24:46 -0800
Subject: oops, fix for merge bug in newview/CMakeLists.txt

---
 indra/newview/CMakeLists.txt | 2 --
 1 file changed, 2 deletions(-)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 431add2ab1..3ecc35cc8e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1782,5 +1782,3 @@ if (LL_TESTS)
 endif (LL_TESTS)
 
 
-    qtxmlpatternsd4.dll
-    qtxmlpatterns4.dll    
-- 
cgit v1.2.3


From ed3bcac5dd7a2dedb8b908f698d14c3e51083350 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 16 Dec 2009 12:07:19 -0800
Subject: Fix for another merge bug.

---
 indra/newview/viewer_manifest.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 59b674b1b8..fafcbcc970 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -341,10 +341,11 @@ class WindowsManifest(ViewerManifest):
                 self.path("qtnetworkd4.dll")
                 self.path("qtopengld4.dll")
                 self.path("qtwebkitd4.dll")
+                self.path("qtxmlpatternsd4.dll")
                 self.path("ssleay32.dll")
 
                 # For WebKit/Qt plugin runtimes (image format plugins)
-                if self.prefix(src="imageformats", dst="llplugin/imageformats"):                
+                if self.prefix(src="imageformats", dst="llplugin/imageformats"):
                     self.path("qgifd4.dll")
                     self.path("qicod4.dll")
                     self.path("qjpegd4.dll")
@@ -363,7 +364,7 @@ class WindowsManifest(ViewerManifest):
                 self.path("qtnetwork4.dll")
                 self.path("qtopengl4.dll")
                 self.path("qtwebkit4.dll")
-            self.path("qtxmlpatterns4.dll")
+                self.path("qtxmlpatterns4.dll")
                 self.path("ssleay32.dll")
 
                 # For WebKit/Qt plugin runtimes (image format plugins)
-- 
cgit v1.2.3


From 2541072b0639c1ada7c6cb7efa8876edc250edc9 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Wed, 16 Dec 2009 15:23:40 -0500
Subject: Fix Windows build error due to tab issues in viewer_manifest.py.

---
 indra/newview/viewer_manifest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 59b674b1b8..db2100b6bb 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -363,7 +363,7 @@ class WindowsManifest(ViewerManifest):
                 self.path("qtnetwork4.dll")
                 self.path("qtopengl4.dll")
                 self.path("qtwebkit4.dll")
-            self.path("qtxmlpatterns4.dll")
+                self.path("qtxmlpatterns4.dll")
                 self.path("ssleay32.dll")
 
                 # For WebKit/Qt plugin runtimes (image format plugins)
-- 
cgit v1.2.3


From 8128ede6ffc632670848abf27dfe7a5fb2f97721 Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 16 Dec 2009 14:21:55 -0800
Subject: DEV-43972 	 breed a good openal for voice+audio

---
 install.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.xml b/install.xml
index 2e317755da..fafbe816ba 100644
--- a/install.xml
+++ b/install.xml
@@ -1159,9 +1159,9 @@ anguage Infrstructure (CLI) international standard</string>
           <key>linux</key>
           <map>
             <key>md5sum</key>
-            <string>f0d9a8d1318b519cffe6c40c9cac4e21</string>
+            <string>c8223e9454223e3d519fe40d71c3ddd2</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-linux-20081010c-59a71b14-plughw.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-linux-20091216-56cc0386.tar.bz2</uri>
           </map>
           <key>linux64</key>
           <map>
-- 
cgit v1.2.3


From 63983ea3bca1ed43b67857d9644b06d723d7fa83 Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 16 Dec 2009 14:41:25 -0800
Subject: Linux voice 'readme' update.

---
 indra/newview/linux_tools/client-readme-voice.txt | 46 +++++++++--------------
 1 file changed, 17 insertions(+), 29 deletions(-)

diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt
index 23a42f484b..57310e0d4c 100644
--- a/indra/newview/linux_tools/client-readme-voice.txt
+++ b/indra/newview/linux_tools/client-readme-voice.txt
@@ -4,36 +4,24 @@ Second Life - Linux Voice Support README
 WHAT IS IT?
 -=-=-=-=-=-
 
-Linux Voice Support is a new feature in testing which allows users
-of the Linux Second Life client to participate in voice-chat with other
-residents and groups inside Second Life, with an appropriate
-headset/microphone.
-
-Linux Voice Support is currently EXPERIMENTAL and is known to still
-have some compatibility issues.
+Linux Voice Support is a feature in testing which allows users of the Linux
+Second Life client to participate in voice-chat with other residents and
+groups inside Second Life, with an appropriate headset/microphone.
 
 REQUIREMENTS
 -=-=-=-=-=-=
 
 * A headset/microphone supported by your chosen version of Linux
-* The ALSA sound system (you probably already have this -
-  i.e. the alsa-base and alsa-utils packages on Ubuntu)
-
-Success with Linux Voice support has been reported on the following
-systems:
-* Ubuntu 6.06 (Dapper) with Intel ICH5/CMI9761A+ audio chipset
-* Ubuntu 6.06 (Dapper) with SigmaTel STAC2997 audio chipset
-* Ubuntu 6.06 (Dapper) with Creative EMU10K1 audio chipset
-* Ubuntu 7.04 (Feisty) with USB Plantronics headset
-* Ubuntu 7.04 (Feisty) with Intel HDA audio chipset
-* Fedora Core 6 with (unknown) audio chipset
-* Ubuntu 8.04 (Hardy) with (unknown) audio chipset
+* At this time, the PulseAudio audio system is recommended; this software
+  is already part of most modern (2009+) Linux desktop systems.  Alternatively,
+  the ALSA audio system may be used on systems installed from around
+  2007 onwards (again this is likely already installed on your system).
 
 KNOWN PROBLEMS
 -=-=-=-=-=-=-=
 
-* The 'Input Level' meter in the Voice Chat Device Settings dialog
-  does not respond to audio input.
+* Compatibility with old ALSA-based audio systems (such as Ubuntu Dapper
+  from 2006) is poor.
 
 TROUBLESHOOTING
 -=-=-=-=-=-=-=-
@@ -41,12 +29,11 @@ TROUBLESHOOTING
 PROBLEM 1: I don't see a white dot over the head of my avatar or other
   Voice-using avatars.
 SOLUTION:
-a. Ensure that 'Enable voice chat' is enabled in the Voice Chat
-  preferences window and that you are in a voice-enabled area (you
-  will see a blue headphone icon in the SL menu-bar).
+a. Ensure that 'Enable voice' is enabled in the 'Sound' section of the
+  Preferences window, and that you are in a voice-enabled area.
 b. If the above does not help, exit Second Life and ensure that any
   remaining 'SLVoice' processes (as reported by 'ps', 'top' or similar)
-  are killed.
+  are killed before restarting.
 
 PROBLEM 2: I have a white dot over my head but I never see (or hear!) anyone
   except myself listed in the Active Speakers dialog when I'm sure that other
@@ -65,12 +52,13 @@ c. Update to the latest version of ALSA manually.  For a guide, see the
 
 PROBLEM 3: I can hear other people, but they cannot hear me.
 SOLUTION:
-a. Ensure that you have the 'Talk' button activated while you are trying to
-  speak.
+a. Ensure that you have the 'Speak' button (at the bottom of the Second Life
+   window) activated while you are trying to speak.
 b. Ensure that your microphone jack is inserted into the correct socket of your
   sound card, where appropriate.
-c. Use your system mixer-setting program or the 'alsamixer' program to ensure
-  that microphone input is set as the active input source and is not muted.
+c. Use your system mixer-setting program (such as the PulseAudio 'volume
+  control' applet or the ALSA 'alsamixer' program) to ensure that microphone
+  input is set as the active input source and is not muted.
 d. Verify that audio input works in other applications, i.e. Audacity
 
 PROBLEM 4: Other people just hear bursts of loud noise when I speak.
-- 
cgit v1.2.3


From 8a6ba9dd6621085084b9ac374d3907fa7bc476c6 Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 16 Dec 2009 14:43:20 -0800
Subject: Add a note about 'Voice Echo Canyon' to the linux voice readme.

---
 indra/newview/linux_tools/client-readme-voice.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt
index 57310e0d4c..bfefdf3471 100644
--- a/indra/newview/linux_tools/client-readme-voice.txt
+++ b/indra/newview/linux_tools/client-readme-voice.txt
@@ -17,6 +17,13 @@ REQUIREMENTS
   the ALSA audio system may be used on systems installed from around
   2007 onwards (again this is likely already installed on your system).
 
+TESTING YOUR SETTINGS
+-=-=-=-=-=-=-=-=-=-=-
+
+* The Second Life region 'Voice Echo Canyon' is a great place for testing
+your hardware settings and quality - it will 'echo' your voice back to you
+when you speak.
+
 KNOWN PROBLEMS
 -=-=-=-=-=-=-=
 
-- 
cgit v1.2.3


From f6f263440771923ee2c7f1fbc3722a99746ead0d Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 16 Dec 2009 15:06:30 -0800
Subject: Update packager to grok that we're replacing the vivox openal with
 our own one one linux.

---
 indra/newview/viewer_manifest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d6d6aa48d1..2373ebe813 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -823,6 +823,7 @@ class Linux_i686Manifest(LinuxManifest):
             self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
             self.path("libalut.so")
             self.path("libopenal.so", "libopenal.so.1")
+            self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
             try:
                     self.path("libkdu_v42R.so", "libkdu.so")
                     pass
@@ -844,7 +845,7 @@ class Linux_i686Manifest(LinuxManifest):
             if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
                     self.path("libortp.so")
                     self.path("libsndfile.so.1")
-                    self.path("libvivoxoal.so.1")
+                    #self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OAL lib
                     self.path("libvivoxsdk.so")
                     self.path("libvivoxplatform.so")
                     self.end_prefix("lib")
-- 
cgit v1.2.3


From 2757a05bc638a68b108f638d87aa82cafa833eb5 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Wed, 16 Dec 2009 15:15:43 -0800
Subject: Add new library qtxmlpatterns4.dll to dependecies list for the new
 copy_w_viewer_manifest target (missed in the merge) Reivewed by mani.

---
 indra/newview/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3ecc35cc8e..8953682fae 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1436,6 +1436,7 @@ if (WINDOWS)
       ${ARCH_PREBUILT_DIRS_RELEASE}/qtnetwork4.dll
       ${ARCH_PREBUILT_DIRS_RELEASE}/qtopengl4.dll
       ${ARCH_PREBUILT_DIRS_RELEASE}/qtwebkit4.dll
+      ${ARCH_PREBUILT_DIRS_RELEASE}/qtxmlpatterns4.dll
       ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll
       ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qgif4.dll
       ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qico4.dll
@@ -1449,6 +1450,7 @@ if (WINDOWS)
       ${ARCH_PREBUILT_DIRS_DEBUG}/qtnetworkd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/qtopengld4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/qtwebkitd4.dll
+      ${ARCH_PREBUILT_DIRS_DEBUG}/qtxmlpatternsd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qgifd4.dll
       ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qicod4.dll
-- 
cgit v1.2.3


From c9ea0f5097e32d27c3ffe6f5e5cd36cc4283978e Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 16 Dec 2009 15:24:36 -0800
Subject: Slightly update the linux README.

---
 indra/newview/linux_tools/client-readme.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index 07a8f951ee..92d321d8c0 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -55,10 +55,13 @@ Minimum requirements:
           is required.  If you are running a 64-bit Linux distribution then
           you will need its 32-bit compatibility environment installed, but
           this configuration is not currently supported.
+    * PulseAudio or ALSA Linux system sound software.  A recent PulseAudio
+      is the recommended configuration; see README-linux-voice.txt for more
+      information.
     * Video/Graphics Card:
           o nVidia GeForce 2, GeForce 4mx, or better (recommend one of the
             following: 6700, 6800, 7600, 7800, 7900, 8400, 8500, 8600,
-            8800, Go 7400, Go 7600, Go 7800, Go 7900)
+            8800, Go 7400, Go 7600, Go 7800, Go 7900, +)
           o OR ATI Radeon 8500, 9250, or better
           (nVidia cards are recommended for the Linux client)
 
-- 
cgit v1.2.3


From c08699f900bf1560f61ea05e44449e90bb02c708 Mon Sep 17 00:00:00 2001
From: Ramzi Linden <ramzi@lindenlab.com>
Date: Wed, 16 Dec 2009 16:27:47 -0800
Subject: L10N: harmless commit to test the Viewer Localization Tool, which has
 been broken for 46 days.

---
 indra/newview/skins/default/xui/en/floater_aaa.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index f89ad2f997..6956b73371 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -18,6 +18,7 @@
  single_instance="true"
  width="320">
   <string name="nudge_parabuild">Nudge 1</string>
+  <string name="test_the_vlt">This string is extracted.</string>
   <chat_history
    allow_html="true"
    bg_readonly_color="ChatHistoryBgColor"
-- 
cgit v1.2.3